Public report of apache/pekko, published 14 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 14 November 2026, 08:41 UTC · Survey ID cd_c7b5a9f7b7384069ae6be0cdf347e005

apache/pekko

Measured 14 November 2026, 08:40 UTC, at code version e1210c2

CAI score 68out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey

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

A large codebase: 255,411 lines of product code in 33 projects, tests not counted · Estimated rebuild effort: about 5.7 person-years · Weakest lens: Code Health, 63

Findings by how serious they are

152 critical 1322 serious 465 minor

12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 08: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 the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

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

61of 61 dimensions measured by tools.
1923of 1939 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
61dimensions across 6 lenses, read from 255,411 lines of product code in 33 projects.
Chapters

Executive summary

apache/pekko falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 68 out of 100 and is rated Adequate, and 129 of its 152 critical findings are security problems.

Code Health, at 63, is the weakest lens and counts most in the score. The best first step is declaring which values may be missing, worth about 4 points. Simplifying the hardest methods comes next, worth about 1 point. Raising Code Health to 70 would lift the score to about 70.

122 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Three passwords or keys in the code's history and one in the code are open to anyone who can read the repository, and twenty-one parts of the code are no longer understood by anyone working on it. Pinning each tool to an exact version, replacing each exposed password or key and having someone learn the forgotten files would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and passing outside input through environment variables would deal with the pipeline step that puts outside input straight into a shell command. The loop of parts of the code that depend on each other needs breaking by moving the shared parts into a project of their own.

The product code is 255,411 lines, about €830,000 to rebuild.

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.
Code Health 63 · counts for 46%Maturity 65 · counts for 25%Security and Compliance 74 · counts for 14%Production Readiness 80 · counts for 8%Architecture 93 · counts for 4%Performance 94 · counts for 2%

If Code Health rose from 63 to 70, the lowest score rated Strong, the score would rise from 68 to about 70.

Code composition: what the lines of code are
Product code 46%Tests 54%
New since the last survey: 308 findings

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

  • Cognitive Complexity · LoggingBus.startDefaultLoggers (cognitive 22) actor/src/main/scala/org/apache/pekko/event/Logging.scala
  • Cognitive Complexity · ResizableMultiReaderRingBuffer.updateReadIx (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/ResizableMultiReaderRingBuffer.scala
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala
  • Code Duplication · Edited copy of a member (61 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala
  • Code Duplication · Edited copy of a member (74 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala
  • Code Duplication · Edited copy of a member (103 corresponding lines) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala
  • Code Duplication · Edited copy of a member (76 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala
  • Code Duplication · Edited copy of a member (42 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala
  • Code Duplication · Edited copies of one member (3 members, 48+ corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala
  • Code Duplication · Edited copy of a member (68 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala
  • Code Duplication · Edited copy of a member (58 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala
  • Code Duplication · Edited copy of a member (69 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala
  • Code Duplication · Edited copy of a member (57 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala
  • Code Duplication · Edited copy of a member (58 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala
  • Code Duplication · Edited copy of a member (51 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala
  • Code Duplication · Edited copy of a member (52 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala
  • Code Duplication · Edited copy of a member (21 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
  • Code Duplication · Edited copy of a member (45 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala
  • Code Duplication · Edited copy of a member (40 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/FSM.scala
  • Code Duplication · Edited copy of a member (35 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala
  • Code Duplication · Edited copy of a member (21 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala
  • Code Duplication · Edited copy of a member (35 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala
  • Code Duplication · Edited copy of a member (23 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala
  • Code Duplication · Edited copy of a member (24 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
  • Code Duplication · Edited copy of a member (30 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala
  • Code Duplication · Edited copy of a member (30 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala
  • Code Duplication · Edited copy of a member (25 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala
  • Code Duplication · Edited copy of a member (22 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala
  • Code Duplication · Edited copy of a member (27 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
  • Code Duplication · Edited copy of a member (25 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Edited copy of a member (32 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala
  • Code Duplication · Edited copy of a member (30 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala
  • Code Duplication · Edited copy of a member (21 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
  • Code Duplication · Edited copies of one member (4 members, 25+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala
  • Code Duplication · Edited copy of a member (30 corresponding lines) cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala
  • Code Duplication · Edited copy of a member (24 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala
  • Code Duplication · Edited copy of a member (21 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala
  • Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala
  • Code Duplication · Edited copy of a member (11 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
  • Code Duplication · Edited copy of a member (30 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Edited copy of a member (24 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala
  • Code Duplication · Edited copy of a member (30 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala
  • Code Duplication · Edited copy of a member (11 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala
  • Code Duplication · Edited copy of a member (26 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala
  • Code Duplication · Edited copy of a member (24 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala
  • Code Duplication · Edited copy of a member (29 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala
  • Code Duplication · Edited copy of a member (17 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala
  • Code Duplication · Edited copy of a member (21 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala
  • Code Duplication · Edited copy of a member (16 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala
  • Code Duplication · Edited copy of a member (21 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala
  • Code Duplication · Edited copy of a member (25 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala
  • Code Duplication · Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala
  • Code Duplication · Edited copy of a member (15 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala
  • Code Duplication · Edited copy of a member (26 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala
  • Code Duplication · Edited copy of a member (8 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Edited copy of a member (15 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala
  • Code Duplication · Edited copy of a member (31 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
  • Code Duplication · Edited copy of a member (11 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala
  • Code Duplication · Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala
  • Code Duplication · Edited copy of a member (27 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala
  • Code Duplication · Edited copy of a member (16 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) actor/src/main/scala/org/apache/pekko/routing/Resizer.scala
  • Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala
  • Code Duplication · Edited copy of a member (26 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala
  • Code Duplication · Edited copy of a member (29 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Edited copy of a member (15 corresponding lines) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala
  • Code Duplication · Edited copy of a member (14 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala
  • Code Duplication · Edited copy of a member (14 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala
  • Code Duplication · Edited copy of a member (15 corresponding lines) actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala
  • Code Duplication · Edited copy of a member (25 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala
  • Code Duplication · Edited copy of a member (16 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala
  • Code Duplication · Edited copy of a member (19 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala
  • Code Duplication · Edited copy of a member (18 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala
  • Code Duplication · Edited copy of a member (16 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala
  • Code Duplication · Edited copy of a member (20 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala
  • Code Duplication · Edited copy of a member (11 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
  • Code Duplication · Edited copy of a member (14 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala
  • Code Duplication · Edited copy of a member (9 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala
  • Code Duplication · Edited copy of a member (14 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ImmutableIntMap.scala
  • Code Duplication · Edited copy of a member (22 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala
  • Code Duplication · Edited copy of a member (10 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Edited copy of a member (11 corresponding lines) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala
  • Code Duplication · Edited copy of a member (12 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala
  • Code Duplication · Edited copy of a member (13 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala
  • Code Duplication · Edited copy of a member (23 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala
  • Code Duplication · Edited copy of a member (18 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala
  • Code Duplication · Edited copy of a member (16 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala

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

Fixed since the last survey: 17 findings

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

  • Cyclomatic Complexity · TLSActor.doInbound (cyclomatic 16) stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala
  • Code Duplication · Edited copy of a member (16 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala
  • Code Duplication · Duplicated block (16–20 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala
  • Code Duplication · Duplicated block (12 lines × 2) cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sbr/SbrTestLeaseActor.scala
  • Code Duplication · Duplicated block (6 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala
  • Code Duplication · Duplicated block (5 lines × 4) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala
  • Code Duplication · Duplicated block (5 lines × 2) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala
  • Explicit Debt · TodoComment cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala
  • Knowledge Freshness · Orphaned knowledge multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala
  • Knowledge Freshness · Orphaned knowledge cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala
  • Documentation (README) · README may be stale
  • Exception handling · Swallowed exception (empty catch) actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala
  • Exception handling · Swallowed exception (caught, then discarded) actor/src/main/java/org/apache/pekko/util/Unsafe.java
  • Exception handling · Swallowed exception (caught, then discarded) actor/src/main/java/org/apache/pekko/util/Unsafe.java
  • Incompleteness & stubs · Empty method body — does nothing with its inputs stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala
Rebuild cost: about €830,000 · Estimate
Cost to rebuild€270,000 to €1,400,000, for 4,576 to 14,516 hours of work, about 5.7 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×1.0 at a score of 68. 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.
SizeLarge: 255,411 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`.
Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it.
Raises the score by about 4 points · Medium effort · Nullable reference types
2
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with TlsGraphStage.createLogic (cognitive 369), EventWriter.apply (cognitive 148).
Raises the score by about 1 point · Medium effort · Cognitive Complexity
3
Resolve the 3 Off-boarding risk finding(s) in Bus Factor.
Raises the score by about 1 point · Low effort · Bus Factor

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 €830,000 to build again, about 5.7 person-years of work. Its weakest lens is Code Health, at 63 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 37,043 lines over the last 90 days, which is about 150,230 lines a year. At that pace, the extra work comes to an estimated 10.8 to 65 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch actor actor actorTestkitTyped actorTestkitTyped actorTyped actorTyped testkit testkit actorTestkitTyped->testkit actorTyped->actor actorTyped->actorTestkitTyped cluster cluster actorTyped->cluster clusterSharding clusterSharding actorTyped->clusterSharding clusterTools clusterTools actorTyped->clusterTools clusterTyped clusterTyped actorTyped->clusterTyped distributedData distributedData actorTyped->distributedData persistence persistence actorTyped->persistence persistenceQuery persistenceQuery actorTyped->persistenceQuery persistenceTyped persistenceTyped actorTyped->persistenceTyped remote remote actorTyped->remote stream stream actorTyped->stream streamTyped streamTyped actorTyped->streamTyped actorTyped->testkit coordination coordination cluster->coordination cluster->remote clusterSharding->cluster clusterSharding->clusterTools clusterSharding->distributedData clusterSharding->persistence clusterShardingTyped clusterShardingTyped clusterShardingTyped->clusterSharding clusterShardingTyped->clusterTyped clusterShardingTyped->persistenceTyped clusterTools->cluster clusterTools->coordination clusterTyped->cluster clusterTyped->clusterTools clusterTyped->distributedData coordination->actor distributedData->cluster jackson jackson jackson->actor jackson->actorTyped jackson->stream jackson3 jackson3 jackson3->actor jackson3->actorTyped jackson3->stream multiNodeTestkit multiNodeTestkit multiNodeTestkit->remote multiNodeTestkit->testkit persistence->actor persistence->stream persistenceQuery->persistence persistenceQuery->remote persistenceQuery->stream persistenceTyped->persistence persistenceTyped->persistenceQuery persistenceTyped->remote persistenceTyped->streamTyped remote->actor remote->stream stream->actor streamTyped->stream testkit->actor __more__ +13 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.

766 modules, with 516 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 726 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 pekko2 pekko.cluster3 pekko.dispatch4 pekko.io5 pekko.io.dns6 pekko.persistence7 pekko.persistence.typed8 pekko.util9 pekko.actor10 pekko.cluster.ddata11 pekko.cluster.sharding12 pekko.cluster.sharding.typed13 pekko.persistence.journal14 pekko.persistence.query15 pekko.persistence.testkit16 pekko.persistence.typed.internal17 pekko.persistence.typed.javadsl18 pekko.persistence.typed.state.internal19 pekko.remote20 pekko.stream21 pekko.actor.CoordinatedShutdown22 pekko.actor.testkit.typed23 pekko.actor.typed24 pekko.cluster.sharding.typed.internal25 pekko.persistence.query.typed26 pekko.persistence.testkit.scaladsl27 pekko.persistence.typed.internal.Running28 pekko.remote.artery29 pekko.remote.transport30 pekko.stream.impl31 pekko.stream.impl.fusing32 pekko.stream.javadsl33 pekko.stream.scaladsl34 pekko.actor.CoordinatedShutdown.tasks35 pekko.actor.typed.delivery.internal36 pekko.actor.typed.internal37 pekko.persistence.query.typed.javadsl38 pekko.persistence.query.typed.scaladsl39 pekko.actor.typed.delivery.internal.ProducerControllerImpl40 pekko.actor.typed.internal.adapter
1 pekko
2 pekko.cluster
3 pekko.dispatch
4 pekko.io
5 pekko.io.dns
6 pekko.persistence
7 pekko.persistence.typed
8 pekko.util
9 pekko.actor9
10 pekko.cluster.ddata11
11 pekko.cluster.sharding2
12 pekko.cluster.sharding.typed1
13 pekko.persistence.journal17
14 pekko.persistence.query1
15 pekko.persistence.testkit111
16 pekko.persistence.typed.internal1710
17 pekko.persistence.typed.javadsl1510
18 pekko.persistence.typed.state.internal15
19 pekko.remote6
20 pekko.stream11
21 pekko.actor.CoordinatedShutdown11
22 pekko.actor.testkit.typed1
23 pekko.actor.typed27
24 pekko.cluster.sharding.typed.internal2216
25 pekko.persistence.query.typed12
26 pekko.persistence.testkit.scaladsl122
27 pekko.persistence.typed.internal.Running11113
28 pekko.remote.artery716
29 pekko.remote.transport45
30 pekko.stream.impl4140
31 pekko.stream.impl.fusing392
32 pekko.stream.javadsl3850
33 pekko.stream.scaladsl2576
34 pekko.actor.CoordinatedShutdown.tasks211
35 pekko.actor.typed.delivery.internal39
36 pekko.actor.typed.internal842
37 pekko.persistence.query.typed.javadsl9969
38 pekko.persistence.query.typed.scaladsl9969
39 pekko.actor.typed.delivery.internal.ProducerControllerImpl313
40 pekko.actor.typed.internal.adapter110257
Uses a module listed above itPart of a loopThe module itself
1 pekko2 pekko.cluster3 pekko.dispatch4 pekko.io5 pekko.io.dns6 pekko.persistence7 pekko.persistence.typed8 pekko.util9 pekko.actor10 pekko.cluster.ddata11 pekko.cluster.sharding12 pekko.cluster.sharding.typed13 pekko.persistence.journal14 pekko.persistence.query15 pekko.persistence.testkit16 pekko.persistence.typed.internal17 pekko.persistence.typed.javadsl18 pekko.persistence.typed.state.internal19 pekko.remote20 pekko.stream21 pekko.actor.CoordinatedShutdown22 pekko.actor.testkit.typed23 pekko.actor.typed24 pekko.cluster.sharding.typed.internal25 pekko.persistence.query.typed26 pekko.persistence.testkit.scaladsl27 pekko.persistence.typed.internal.Running28 pekko.remote.artery29 pekko.remote.transport30 pekko.stream.impl31 pekko.stream.impl.fusing32 pekko.stream.javadsl33 pekko.stream.scaladsl34 pekko.actor.CoordinatedShutdown.tasks35 pekko.actor.typed.delivery.internal36 pekko.actor.typed.internal37 pekko.persistence.query.typed.javadsl38 pekko.persistence.query.typed.scaladsl39 pekko.actor.typed.delivery.internal.ProducerControllerImpl40 pekko.actor.typed.internal.adapterpekko1pekko.cluster2pekko.dispatch3pekko.io4pekko.io.dns5pekko.persistence6pekko.persistence.typed7pekko.util8pekko.actor9pekko.cluster.ddata10pekko.cluster.sharding11pekko.cluster.sharding.typed12pekko.persistence.journal13pekko.persistence.query14pekko.persistence.testkit15pekko.persistence.typed.internal16pekko.persistence.typed.javadsl17pekko.persistence.typed.state.internal18pekko.remote19pekko.stream20pekko.actor.CoordinatedShutdown21pekko.actor.testkit.typed22pekko.actor.typed23pekko.cluster.sharding.typed.internal24pekko.persistence.query.typed25pekko.persistence.testkit.scaladsl26pekko.persistence.typed.internal.Running27pekko.remote.artery28pekko.remote.transport29pekko.stream.impl30pekko.stream.impl.fusing31pekko.stream.javadsl32pekko.stream.scaladsl33pekko.actor.CoordinatedShutdown.tasks34pekko.actor.typed.delivery.internal35pekko.actor.typed.internal36pekko.persistence.query.typed.javadsl37pekko.persistence.query.typed.scaladsl38pekko.actor.typed.delivery.internal.ProducerControllerImpl39pekko.actor.typed.internal.adapter409112117111117101510156111112722161212211113716454140392385025762113984299699969313110257+726 more modules (most-connected shown)

At a glance — Code Health · 63% · Adequate · gated by X5 ·

At a glance — Architecture · 93% · Exemplary ·

At a glance — Maturity · 65% · Adequate ·

At a glance — Readiness · 80% · Strong ·

At a glance — Security · 74% · Strong ·

At a glance — Performance · 94% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection125High / Critical
A02:2025 — Security Misconfiguration26High / Critical
A07:2025 — Authentication Failures5High / Critical
A03:2025 — Software Supply Chain Failures3Medium

Roadmap

Top priorities: On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it; Resolve the 382 Orphaned file finding(s) in Knowledge Freshness — start with package.scala (3), DistributedData.scala (3), ActorContext.scala (2); Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.

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

Do thisHelpsEffortDimension
On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it.+4.2 ptsMediumNullable reference types
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with TlsGraphStage.createLogic (cognitive 369), EventWriter.apply (cognitive 148).+1.3 ptsMediumCognitive Complexity
Resolve the 3 Off-boarding risk finding(s) in Bus Factor.+1.2 ptsLowBus Factor
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+1.2 ptsLowREDACTED Scanning
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+2.4 ptsMediumArchitecture documentation
Swallowed exception (caught, then discarded)+2.2 ptsMediumException handling
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with TlsGraphStage.createLogic (cyclomatic 287).+1.1 ptsMediumCyclomatic Complexity
Reconcile the README with reality: CONTRIBUTING.md links to `org.apache.pekko.stream.scaladsl.Flow`, but `org.apache.pekko.stream.scaladsl.Flow` does not exist; CONTRIBUTING.md links to `org.apache.pekko.stream.javadsl.Flow`, but `org.apache.pekko.stream.javadsl.Flow` does not exist.+1.8 ptsMediumDocumentation accuracy

File quality

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

FileScoreBandWorst signal
REDACTED1.7SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala5.5MixedGod Classes: TooManyMethods: ReplicatedDataSerializer
remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala5.7MixedGod Classes: TooManyMethods: MiscMessageSerializer
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: 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 — 152

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

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

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

Could not be resolved — 12

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 61 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 61 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D21D23D28D29D30D31D34D35D36D37D40D41D43AX10AX3AX5AX6AX8GD1IC1M1M2M3M4P1P2P3P4P6PF1PF3S1X1X12X14X15X16X18X20X21X23X24X25X26X27X3X30X4X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1d937-148e-7b13-a9d5-4bc1d4d5ebef.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.scala, .java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.scala, .java) and this repository declares an sbt build (repository root, 1421 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. A language sidecar this run needed FAILED, so the code model the non-MSBuild public-API collector reads was never built — this is a DEGRADED run, not a settled gap, and the surface may well be collectable on a re-run: The Java sidecar STALLED after 210s — no output for 180s — so its process tree was killed and the Java code model degraded to null.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (250667 LoC, 4183 module-visible types across 182 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala`, `cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala`, `distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala`, `docs/src/main/java-jdk-21/docs/actors/classical/OptimizedActorWithJava21.java`, `persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala, whose lifetimes are not modelled 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.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • 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.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • 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

109 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TlsGraphStage.createLogic at 287. A further 18 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ClusterShardingMessageSerializer.manifest at 43 — they are counted neither in the figure above nor in this dimension's score. 8 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala (ClusterShardingMessageSerializer.manifest at 43), remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala (MiscMessageSerializer.toBinary at 35), distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala (ReplicatedDataSerializer.manifest at 33), cluster/src/main/scala/org/apache/pekko/cluster/Member.scala (Member.highestPriorityOf at 20), cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala (SplitBrainResolverBase.receive at 19), and 3 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.

VersionVector.compareOnlyTo (cyclomatic 20) · ×2distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:192
JacksonSerializer.fromBinary (cyclomatic 20) · ×2serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:390
TlsGraphStage.createLogic (cyclomatic 287)stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:65
WorkPullingProducerControllerImpl.active (cyclomatic 76)actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:302
EventWriter.apply (cyclomatic 75)persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventWriter.scala:248

+ 102 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 TlsGraphStage.createLogic (cyclomatic 287). — Refactoring it lifts Cyclomatic Complexity from 4.9 to about 5.8/10.

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

D2 · Cognitive Complexity4.6 / 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.6 / 10 · rule-coverage 100% · ceiling Prevented

233 method(s) exceeded the cognitive complexity threshold of 15; the worst was TlsGraphStage.createLogic at 369.

VersionVector.compareOnlyTo (cognitive 47) · ×2distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:192
ByteStrings.lastIndexOf (cognitive 26) · ×2actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1969
ORSet.mergeCommonKeys (cognitive 26) · ×2distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:201
JacksonSerializer.fromBinary (cognitive 20) · ×2serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:390
ByteString2.indexOf (cognitive 18) · ×2actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1253

+ 222 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 TlsGraphStage.createLogic (cognitive 369), EventWriter.apply (cognitive 148). — 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.6 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D3 · God Classes8.6 / 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.6 / 10 · rule-coverage 100% · ceiling Prevented

102 god class(es) detected.

TooManyMethods: Source · ×52stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:898
FileTooLong: util/ByteString.scala · ×43actor/src/main/scala/org/apache/pekko/util/ByteString.scala
MethodTooLong: TlsGraphStage.initialAttributes · ×6stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:63
ClassTooLong: MiscMessageSerializerremote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:43

What to do

  1. Resolve the 52 TooManyMethods finding(s) in God Classes — start with Source.scala (3), Flow.scala (2), TestKit.scala (2). — One of this dimension's main actionable groups (52 warning-level).
  2. Resolve the 43 FileTooLong finding(s) in God Classes — start with Flow.scala (2), ClusterShardingSettings.scala (2), ByteString.scala. — One of this dimension's main actionable groups (43 warning-level).
  3. Resolve the 6 MethodTooLong finding(s) in God Classes — start with TlsGraphStage.scala (2), StreamOfStreams.scala (2), EventWriter.scala. — One of this dimension's main actionable groups (6 warning-level).

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

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

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

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

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

203 duplicated block group(s) detected. 4.8 % of the production lines (12,147 of 255,411) are in a reported copy. A further 308 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Edited copy of a member (8 corresponding lines) · ×21actor/src/main/scala/org/apache/pekko/util/ByteString.scala:3072
Edited copy of a member (7 corresponding lines) · ×20actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:590
Edited copy of a member (9 corresponding lines) · ×19actor/src/main/scala/org/apache/pekko/util/ByteString.scala:639
Duplicated block (8 lines × 2) · ×19actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:453
Edited copy of a member (4 corresponding lines) · ×17actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala:86

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

What to do

  1. Resolve the 21 Edited copy of a member (8 corresponding lines) finding(s) in Code Duplication — start with Patterns.scala (2), ByteIterator.scala (2), ByteString.scala. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 20 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with ReplicatorMessageAdapter.scala (3), ByteIterator.scala (2), StreamRefModule.scala (2). — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 19 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with ByteString.scala, FSM.scala, TestAppender.scala. — One of this dimension's main actionable groups (19 warning-level).

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

D5 · Coupling6.5 / 10Adequate✓ 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 6.5 / 10 · rule-coverage 100% · ceiling Prevented

33 production modules (sbt), 1 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a dependsOn spread (deps: _*) and a project whose directory a helper computes are not visible there; 2 module(s) off the main sequence, with abstractness counted on 29 of the 33 (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).

Circular dependency
Off the main sequence: actor · ×2

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Circular dependency finding(s) in Coupling. — One of this dimension's main actionable groups (1 issue-level).

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

D6 · Cohesion (LCOM4)9.7 / 10Stronggated by 14 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.7 / 10 · rule-coverage 100% · ceiling Verified

14 of 664 classes have LCOM4 above 3.

Low cohesion: ClusterShardingMessageSerializer (LCOM4 14) · ×14cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:48

What to do

  1. Resolve the 14 Low cohesion finding(s) in Cohesion (LCOM4) — start with ClusterShardingMessageSerializer.scala, ReplicatorMessageSerializer.scala, ActorContextAdapter.scala. — One of this dimension's main actionable groups (14 warning-level).

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

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

0 outdated direct sbt declarations. An sbt declaration names an EXACT version, so the remedy is an edit to the build file — there is no lockfile refresh that would move it. Test-, Provided- and it-scoped declarations are excluded, because a consumer of this project never receives them. A version held in a Scala val is read only when the val is one string literal: sbt is a program rather than a manifest, and evaluating a computed version would invent the measurement rather than take it. Whether any artifact is DEPRECATED or ABANDONED is not graded and cannot be — Maven Central publishes no such marker, and release age does not stand in for one: the most widely depended-upon libraries are routinely the stalest, being finished rather than abandoned. Known CVEs in this dependency graph are D30's question.

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md.

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.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 30 declared sbt dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the production coordinates this repository's 40 sbt build file(s) (build.sbt and project/*.scala) declare with a literal version, directly or through a string-literal val — `%%` resolved to the Scala binary suffix Central publishes under, test-scoped declarations excluded — the same declaration-site closure this analysis reads for dependency currency. sbt has no lockfile a checkout carries, so this is deliberately NOT the transitive closure. 3 further production coordinate(s) are declared with a version the build computes rather than writes as a literal — sbt is a program, and this pass does not run it — and are NOT graded: this verdict covers what the build pins literally or through a string-literal val, not the full graph.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 2 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.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala (7×287=2009) Repeated repair below the complexity floor: actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala (4 of 4 changes were fixes)

Hotspot: stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scalastream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:65
Repeated repair: actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scalaactor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala:82

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with TlsGraphStage.scala. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with ForkJoinExecutorConfigurator.scala. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

130 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala. Counted over 926 of the 1337 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 · ×3

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).

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

D17 · Explicit Debt9.8 / 10Stronggated by 276 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

276 deducted task-comment markers across 255411 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 · ×175testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricKeyDSL.scala:30
FixmeComment · ×94testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:88
HackComment · ×7stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala:143

What to do

  1. Resolve the 175 TodoComment finding(s) in Explicit Debt — start with JacksonSerializerSpec.scala (5), SbtMultiJvmPlugin.scala (5), Running.scala (5). — One of this dimension's main actionable groups (175 warning-level).
  2. Resolve the 94 FixmeComment finding(s) in Explicit Debt — start with TestKitApiTest.java (6), EventsBySliceFirehoseSpec.scala (6), Player.scala (4). — One of this dimension's main actionable groups (94 warning-level).
  3. Resolve the 7 HackComment finding(s) in Explicit Debt — start with JacksonSerializerSpec.scala (4), JsonObjectParser.scala, MultiNode.scala. — One of this dimension's main actionable groups (7 warning-level).

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

D21 · Naming Consistency9.4 / 10Exemplary✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

5 naming inconsistencies among 879 declarations measured against a convention their peers follow.

`skipID` spells `ID` where 886 names in the project spell it `Id`actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:249
`initSslContext` spells `Ssl` where 37 names in the project spell it `SSL`bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:198
`allMembersInDC` spells `DC` where 113 names in the project spell it `Dc`cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala:100
`PersistentFsmEvent` spells `Fsm` where 27 names in the project spell it `FSM`persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala:208
`setUID` spells `UID` where 83 names in the project spell it `Uid`remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1184

✓ On the Gold path — maintain.

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

D23 · Boundary Type-Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

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

No domain types leak across context boundaries (2 contexts). Contexts: persistence, persistence-typed.

✓ On the Gold path — maintain.

Detailed fixes: d23_recommendation.md.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ 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 7.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. 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)6.7 / 10Adequate✓ 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 6.7 / 10 · rule-coverage 100% · ceiling Documented

125 finding(s): 0 critical, 124 high, 1 medium, 0 low. 122 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 5 file(s) — `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala`, `cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala`, `distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala`, `docs/src/main/java-jdk-21/docs/actors/classical/OptimizedActorWithJava21.java` (line 36, line 37, line 38), `persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala` — 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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D31 · IaC & Container Security7.4 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

26 finding(s): 0 critical, 1 high, 22 medium, 3 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 22 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (22). — One of this dimension's main actionable groups (22 warning-level).
  2. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 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 Freshness5.6 / 10Adequate✓ 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 5.6 / 10 · rule-coverage 100% · ceiling Documented

403 of 926 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala. Counted over 926 of the 1337 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×21distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:1
Orphaned file · ×382remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala:1
Further orphaned files (smaller)

What to do

  1. Resolve the 382 Orphaned file finding(s) in Knowledge Freshness — start with package.scala (3), DistributedData.scala (3), ActorContext.scala (2). — One of this dimension's main actionable groups (382 recommendation-level).
  2. Resolve the 21 Orphaned knowledge finding(s) in Knowledge Freshness — start with ReplicatedDataSerializer.scala, ActorRef.scala, EntityPassivationStrategy.scala. — One of this dimension's main actionable groups (21 issue-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 Coupling10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: FlowWithContext.scala↔SourceWithContext.scala 82%; PersistenceTestKitPlugin.scala↔PersistenceTestKitReadJournal.scala 60%; SourceWithContext.scala↔FlowWithContext.scala 56%

Change coupling: FlowWithContext.scala ↔ SourceWithContext.scala · ×3stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with FlowWithContext.scala, PersistenceTestKitPlugin.scala, SourceWithContext.scala. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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:2

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. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition8.7 / 10Strong✓ Tool-verified

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

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

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

AX3 · Project dependency cycles6.9 / 10Adequate✓ 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.

  • The projects actorTestkitTyped → actorTyped → actorTestkitTyped (one cycle inside a mutually-dependent group of 5 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.

What to do

  • Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's Scala: methods whose whole body is still `???` or a "not implemented" throw where nothing overrides them, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Scala: methods whose body is `???` or only throws a "not implemented" error, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead. (×14) — actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala:53, actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala:60, actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala:68, …
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×4) — distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializerSpec.scala:251, remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorSelectionSpec.scala:59, remote/src/test/scala/org/apache/pekko/remote/artery/RemoteMessageSerializationSpec.scala:77, …

What to do

  • Clear the softer debt: re-enable or delete `ignore`d and `pending` tests, decide whether each empty method or UnsupportedOperationException is deliberate (and say so in a comment), and replace a bare `// scalastyle:off` or `@nowarn` with targeted, justified suppressions.
M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation5.0 / 10Adequate✓ 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.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy6.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

  • CONTRIBUTING.md links to `org.apache.pekko.stream.scaladsl.Flow`, but `org.apache.pekko.stream.scaladsl.Flow` 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. — CONTRIBUTING.md:358
  • CONTRIBUTING.md links to `org.apache.pekko.stream.javadsl.Flow`, but `org.apache.pekko.stream.javadsl.Flow` 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. — CONTRIBUTING.md:359

What to do

  • Reconcile the README with reality: CONTRIBUTING.md links to `org.apache.pekko.stream.scaladsl.Flow`, but `org.apache.pekko.stream.scaladsl.Flow` does not exist; CONTRIBUTING.md links to `org.apache.pekko.stream.javadsl.Flow`, but `org.apache.pekko.stream.javadsl.Flow` 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.

P2 · Observability9.0 / 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.

What to do

  • Add a health-check endpoint (Spring Boot Actuator's /actuator/health, or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling7.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

  • Your ecosystem's static analyzer is declared as a dependency but is not wired into CI — run it as a required step on push/PR (e.g. `composer phpstan` / `mix sobelow` / `bundle exec brakeman` / the spotbugs Gradle task / `sbt scalafixAll --check` / `golangci-lint run` / `rebar3 lint`) so a regression fails the build instead of relying on someone running it locally.
  • 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.
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.

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.

  • A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — bench-jmh/src/main/scala/org/apache/pekko/util/ArrayCopyOf_Benchmark.scala

What to do

  • Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ 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 each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Read from this repository's Scala source and the Java beside it: 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. This repository serves no HTTP of its own — no HTTP-server artifact (akka-http, pekko-http, http4s, Play, Finagle, zio-http, cask, Scalatra, a tapir server, Jetty, Undertow, …) outside test scope in its build, and no server package imported or server bound in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.

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.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×3) — cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala:300, cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:43, distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1949

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 3 sites, not one: `cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala:300` (MessageDigest.getInstance("SHA-1")), `cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:43` (MessageDigest.getInstance("MD5")), `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1949` (MessageDigest.getInstance("SHA-1")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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.

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.

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 reader3.5 / 10Weak✓ Tool-verified

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.

  • `length` is read from the bytes being parsed at line 173 (`readInt`), then used to size a `new Array[Byte]` at line 174 — and nowhere in its scope is `length` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `length` against the bytes actually remaining and a maximum the format allows before allocating. — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:174

What to do

  • Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
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.

X18 · Disposal-pattern correctness5.4 / 10Adequate✓ Tool-verified

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.

  • `scala.io.Source.fromFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.getLines` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(scala.io.Source.fromFile(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesBenchmark.scala:73

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.

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.

X23 · Unguarded diagnostic materialisation7.8 / 10Strong✓ Tool-verified

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.

  • `debug` at line 125 is called with an argument built by `sel.elements.mkString("…", "…", "…")` (line 129), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag. — remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:125
  • `debug` at line 114 is called with an argument built by `name.mkString("…", "…", "…")` (line 114), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag. — multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala:114
  • `debug` at line 187 is called with an argument built by `currentShardAllocations.keys.mkString("…")` (line 191), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag. — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala:187

What to do

  • In Scala, put the construction behind the logger's own check (`if (log.isDebugEnabled)`), or log through a logger that takes the message by name or by macro and so builds it only when the level is on — scala-logging's `LazyLogging`/`StrictLogging` (`logger.debug(s"rows: ${rows.mkString(", ")}")` expands to that check), log4s or log4cats. Interpolating into an `s"…"` is not the fix on SLF4J or Akka's `LoggingAdapter`: their `debug` takes a `String`, so the interpolation and every `mkString` inside it run before the call is entered.
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 an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` comprehension or `foreach` leaves the mutable collection it is walking alone — an `ArrayBuffer` or `ListBuffer` counts its changes and its iterator checks the count, an `ArrayDeque` (and `mutable.Queue`/`mutable.Stack`) is walked by index up to its starting length, and a `java.util` collection walked through `asScala` is fail-fast, so a body that adds to or removes from the very collection the loop is walking makes a later step throw `ConcurrentModificationException` (`IndexOutOfBoundsException` for a deque) and the remaining elements 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.

X3 · Exception handling6.1 / 10Adequate✓ Tool-verified

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

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

  • `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — testkit/src/main/scala/org/apache/pekko/testkit/SocketUtil.scala:39, remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:659, remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:1048, …
  • `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×6) — testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala:597, bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala:41, bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala:53, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×18) — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:719, stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:826, stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:844, …
  • `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — project/Jvm.scala:44, cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Provision.scala:52, actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:72, …

What to do

  • Swallowed exception (caught, then discarded)
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 logging10.0 / 10Exemplary○ Nothing flagged

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.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Scala's null is held to the type system and not undermined by assertions — a file compiled with `-Yexplicit-nulls` is one where `String` excludes null and `String | Null` admits it, a file under WartRemover's `Null` wart or Scalafix's `DisableSyntax.noNulls` is one whose code cannot write `null` and must say `Option`, and each `.nn`, `import scala.language.unsafeNulls` or null-lint suppression is the author overruling that.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • No build over this repository's 1238 Scala product file(s) passes `-Yexplicit-nulls`, enables WartRemover's `Null` wart or runs Scalafix's `DisableSyntax.noNulls`, so every reference type admits null and nothing reports a `null` written into the code or returned from a Java API — the first one to reach a method call is a `NullPointerException`. `Option` by convention is a habit no tool here holds the code to.

What to do

  • On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it.

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 Health63%Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture93%ExemplarySolid.
Maturity65%AdequateAcceptable, with room to improve.
Readiness80%StrongSolid.
Security74%StrongSolid.
Performance94%ExemplaryStrongest area.
Unscored — 1 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

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

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 52 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not 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
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Scala code is a Play controller, a Cask routes object, a Scalatra servlet, a Finatra controller, an Akka/Pekko HTTP routes holder or a JSR-330/Spring singleton, so no instance is shared between request threads.
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, a MongoDB or Cassandra driver, JDBC) imported 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~294531 lines of test source are present (.scala, .java) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .scala suite was found but not re-run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, .scala, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.scala), 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) — 5 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (3 signals for this style, 2 needed — the count is met but a required primary signal is absent): 3 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 1600 value object(s); 47 domain event(s); its 3 aggregate(s) are building blocks, test types or a library's examples — not the repository's own domain; its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 CQRS handler(s))
  • ED5 Idempotency — Not assessed, and this one is on us: 2 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.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Scala and Java were read, and no request in it can be cancelled by a caller — a Scala request takes no token: a Future cannot be cancelled, and cats-effect, ZIO and Monix interrupt the fiber that made the request from outside the call, not through a parameter; a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 152 finding(s)
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
  • + 97 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned knowledge · ×21
  • Orphaned knowledge distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EntityPassivationStrategy.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge stream/src/main/scala/org/apache/pekko/stream/impl/package.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala: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 cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge remote/src/main/scala/org/apache/pekko/remote/artery/EnvelopeBufferPool.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceTestKit.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Project dependency cycle · ×1
  • Project dependency cycle — The projects actorTestkitTyped → actorTyped → actorTestkitTyped (one cycle inside a mutually-dependent group of 5 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
D5 · Coupling · Circular dependency · ×1
  • Circular dependency — actorTestkitTyped → actorTyped → actorTestkitTyped (one cycle inside a mutually-dependent group of 5 modules)
Serious — 1322 finding(s)
D17 · Explicit Debt · TodoComment · ×175
  • TodoComment testkit/src/test/scala/org/apache/pekko/testkit/metrics/MetricKeyDSL.scala:30 — // todo not sure what else needs replacing, while keeping key as readable as can be — 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 stream-typed/src/main/scala/org/apache/pekko/stream/typed/scaladsl/ActorFlow.scala:33 — // TODO would be nice to provide Implicits to allow .ask() directly on Flow/Source — 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 stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CoderSpec.scala:209 — // TODO make it use remaining? — 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 stream-testkit/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpecKit.scala:277 — // TODO handler needed but should it do anything? — 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 stream-testkit/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterSpecKit.scala:290 — // TODO handler needed but should it do anything? — 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 stream/src/main/scala/org/apache/pekko/stream/scaladsl/StreamConverters.scala:188 — // TODO removing the QueueSink name, see issue #22523
  • TodoComment stream/src/main/scala/org/apache/pekko/stream/scaladsl/Tcp.scala:114 — // TODO maybe this should be a new setting, like `pekko.stream.tcp.bind.timeout` / `shutdown-timeout` instead? — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:1342 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:1362 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:1480 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:1722 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:3696 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:722 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:742 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:860 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:1099 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:712 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:732 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:850 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:1083 — // TODO optimize to one step — 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 stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala:34 — // TODO: buffer and batch sizing heuristics — 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 stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala:40 — // TODO: Amendshape changed the name of ports. Is it needed anymore? — 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 stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:740 — // TODO: bail on unknown types — 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 stream/src/main/scala/org/apache/pekko/stream/impl/streamref/StreamRefsMaster.scala:42 — // TODO introduce a master with which all stages running the streams register themselves? — 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 stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala:66 — // TODO: Timeout on bind — 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.
  • + 150 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×94
  • FixmeComment testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:88 — // FIXME why are these called PF when they take a total function, how are they supposed to be — 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 testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:108 — // FIXME how is this supposed to be used, scaladoc talks about a partial function but it accepts — 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 testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:117 — // FIXME how is this supposed to be used, scaladoc talks about a partial function but it accepts — 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 testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:131 — // FIXME how is this supposed to be used, scaladoc talks about a partial function but it accepts — 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 testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:139 — // FIXME how is this supposed to be used, scaladoc talks about a partial function but it accepts — 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 testkit/src/test/java/org/apache/pekko/testkit/javadsl/TestKitApiTest.java:150 — // FIXME how is this supposed to be used, scaladoc talks about a partial function but it accepts — 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 stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowSectionSpec.scala:70 — // FIXME: Flow has no simple toString anymore — 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 stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/GraphDSLCompileSpec.scala:138 — // FIXME needs cycle detection capability — 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 stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpHelper.scala:38 — // FIXME: Workaround object just to force a ResumeReading that will poll for a possibly pending close event — 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 stream-tests/src/test/scala/org/apache/pekko/stream/io/TcpHelper.scala:62 — // FIXME: various close scenarios — 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 stream-tests/src/test/scala/org/apache/pekko/stream/io/compression/CoderSpec.scala:94 — // FIXME: should we read as long as possible and only then report an error, that seems somewhat arbitrary — 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 stream-tests/src/test/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreterPortsSpec.scala:25 — // FIXME test failure scenarios — 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 stream-tests/src/test/java/org/apache/pekko/stream/javadsl/GraphDslTest.java:343 — // FIXME https://github.com/akka/akka/issues/30487
  • FixmeComment stream/src/main/scala/org/apache/pekko/stream/ActorMaterializer.scala:345 — // FIXME: make configurable, see https://github.com/akka/akka/issues/28000
  • FixmeComment stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:1022 — // FIXME `onClose` is a poor name for `onComplete` rename this at the earliest possible opportunity — 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 stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:1057 — // FIXME `onClose` is a poor name for `onComplete` rename this at the earliest possible opportunity — 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 stream/src/main/scala/org/apache/pekko/stream/snapshot/MaterializerState.scala:77 — // FIXME arbitrary timeout — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:843 — // FIXME make `PartitionOutOfBoundsException` a `final` class when possible — 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 stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:855 — // FIXME BC add `eagerCancel: Boolean = false` parameter — 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 stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:877 — // FIXME BC make this immutable.IndexedSeq as type + Vector as concrete impl — 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 stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:214 — // FIXME: Out => Unit should stay, right?? — 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 stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala:245 — // FIXME: Eliminate re-wraps — 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 stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala:236 — // FIXME: Eliminate re-wraps — 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 stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:126 — // FIXME why do we need a global unique name for the child? — 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 stream/src/main/scala/org/apache/pekko/stream/impl/Transfer.scala:81 — // FIXME: This is completely unnecessary, refactor MapFutureProcessorImpl — 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.
  • + 69 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×52
  • TooManyMethods: Source stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:898 — TooManyMethods — 188 methods. The bar is 30 methods; this is 158 over it, 6.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: Flow stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:381 — TooManyMethods — 183 methods. The bar is 30 methods; this is 153 over it, 6.10× 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: FlowOps stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:852 — TooManyMethods — 145 methods. The bar is 30 methods; this is 115 over it, 4.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SubFlow stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:55 — TooManyMethods — 137 methods. The bar is 30 methods; this is 107 over it, 4.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SubSource stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:50 — TooManyMethods — 137 methods. The bar is 30 methods; this is 107 over it, 4.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GraphStageLogic stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:550 — TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PersistenceTestKit persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceTestKit.scala:32 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.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: Replicator distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1282 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: MiscMessageSerializer remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:43 — TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TestKitBase testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:167 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TestKit testkit/src/main/scala/org/apache/pekko/testkit/javadsl/TestKit.scala:49 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ReplicatedDataSerializer distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:269 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 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.
  • TooManyMethods: ClusterCoreDaemon cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:340 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CachingConfig actor/src/main/scala/org/apache/pekko/dispatch/CachingConfig.scala:52 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ManualProbe stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala:423 — 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: ClusterShardingMessageSerializer cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:48 — 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: CircuitBreaker actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala:133 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ClusterMessageSerializer cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:65 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.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.
  • TooManyMethods: SourceWithContext stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala:88 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.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.
  • TooManyMethods: Source stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:274 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Source stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:49 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FlowWithContext stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:88 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Association remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:144 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GraphInterpreter stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:231 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ByteString actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2190 — 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.
  • + 27 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×43
  • FileTooLong: util/ByteString.scala actor/src/main/scala/org/apache/pekko/util/ByteString.scala — FileTooLong — 1997 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1497 over it, 3.99× 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: ddata/Replicator.scala distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala — FileTooLong — 1740 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1240 over it, 3.48× 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: fusing/Ops.scala stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala — FileTooLong — 1657 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1157 over it, 3.31× 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: sharding/ShardCoordinator.scala cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala — FileTooLong — 1256 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 756 over it, 2.51× 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: cluster/ClusterDaemon.scala cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala — FileTooLong — 1160 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 660 over it, 2.32× 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: scaladsl/Graph.scala stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala — FileTooLong — 1021 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 521 over it, 2.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: remote/Endpoint.scala remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala — FileTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 511 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: io/TlsGraphStage.scala stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala — FileTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 468 over it, 1.94× 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: event/Logging.scala actor/src/main/scala/org/apache/pekko/event/Logging.scala — FileTooLong — 944 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 444 over it, 1.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: stage/GraphStage.scala stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala — FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: GraphStageLogic (550-1881). The bar is 500 significant lines; this is 442 over it, 1.88× 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: javadsl/Source.scala stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala — FileTooLong — 912 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 412 over it, 1.82× 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: scaladsl/Flow.scala stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala — FileTooLong — 879 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 379 over it, 1.76× 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: sharding/Shard.scala cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala — FileTooLong — 864 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 364 over it, 1.73× 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: artery/Association.scala remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala — FileTooLong — 858 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: transport (145-1151). The bar is 500 significant lines; this is 358 over it, 1.72× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: protobuf/ReplicatedDataSerializer.scala distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala — FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: ReplicatedDataSerializer (269-990). The bar is 500 significant lines; this is 302 over it, 1.60× 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: javadsl/Flow.scala stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala — FileTooLong — 796 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 296 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: internal/Running.scala persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala — FileTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 292 over it, 1.58× 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: sharding/ShardRegion.scala cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala — FileTooLong — 786 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 286 over it, 1.57× 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: singleton/ClusterSingletonManager.scala cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala — FileTooLong — 780 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: ClusterSingletonManager (513-1281). The bar is 500 significant lines; this is 280 over it, 1.56× 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: remote/Remoting.scala remote/src/main/scala/org/apache/pekko/remote/Remoting.scala — FileTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 275 over it, 1.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: scaladsl/Hub.scala stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala — FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 254 over it, 1.51× 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: artery/ArteryTransport.scala remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala — FileTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 242 over it, 1.48× 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: fusing/ActorGraphInterpreter.scala stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala — FileTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 213 over it, 1.43× 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: impl/PhasedFusingActorMaterializer.scala stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala — FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 181 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sharding/ClusterShardingSettings.scala cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala — FileTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 180 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 18 more in this group — see findings.md.
D31 · IaC & Container Security · Medium IaC · ×22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×22
  • Swallowed exception (caught, then discarded) testkit/src/main/scala/org/apache/pekko/testkit/SocketUtil.scala:39 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala:597 — `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:659 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:1048 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala:149 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) project/Jvm.scala:44 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala:420 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Provision.scala:52 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala:41 — `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala:53 — `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala:69 — `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) bench-jmh/src/main/scala/org/apache/pekko/util/ByteStringParser_readNum_Benchmark.scala:81 — `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/LoggerClass.scala:80 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala:120 — `case _: Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/Reflect.scala:59 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:72 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:81 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:90 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:99 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:108 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:117 — `case _: Throwable` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:81 — `case NonFatal(_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×21
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:3072 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:3072-3079 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:3087-3094 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:962 — remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:962-969 | remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:981-992 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:384 — actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:384-391 | actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:402-409 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:90 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:90-97 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:61-71 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:152 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:152-160 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:380-387 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala:78 — stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala:78-86 | stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSink.scala:113-120 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:1401 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:1401-1408 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:1439-1446 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Queue.scala:92 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Queue.scala:92-104 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Queue.scala:108-115 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:63 — actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:63-70 | actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:262-269 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala:193 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala:193-200 | actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala:408-415 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala:629 — actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala:629-636 | actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala:673-683 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala:820 — actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala:820-827 | actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala:861-869 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:180 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:180-187 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:181-188 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:344 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:344-351 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:339-346 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala:106 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala:106-113 | actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestInboxImpl.scala:53-60 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/DurableStateBehaviorTestKit.scala:112 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/DurableStateBehaviorTestKit.scala:112-119 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/EventSourcedBehaviorTestKit.scala:118-126 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/DistributedData.scala:59 — cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/DistributedData.scala:59-69 | cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/DistributedData.scala:59-66 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:313 — cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:313-323 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:98-105 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:396 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:396-403 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:391-398 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/ClusterRemoteWatcher.scala:45 — cluster/src/main/scala/org/apache/pekko/cluster/ClusterRemoteWatcher.scala:45-52 | remote/src/main/scala/org/apache/pekko/remote/RemoteWatcher.scala:40-47 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRef.scala:110 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorRef.scala:110-118 | actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:451-458 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×20
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:590 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:590-596 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:586-592 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala:173 — actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala:173-179 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:853-859 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala:73 — distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala:73-79 | distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala:73-79 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala/org/apache/pekko/util/Reflect.scala:221 — actor/src/main/scala/org/apache/pekko/util/Reflect.scala:221-227 | remote/src/main/scala/org/apache/pekko/remote/serialization/ProtobufSerializer.scala:75-81 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala/org/apache/pekko/event/Logging.scala:467 — actor/src/main/scala/org/apache/pekko/event/Logging.scala:467-473 | actor/src/main/scala/org/apache/pekko/event/Logging.scala:481-487 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala:45 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala:45-52 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/PekkoSerializationModule.scala:48-54 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala:57 — bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala:57-63 | bench-jmh/src/main/scala/org/apache/pekko/actor/ReceiveTimeoutTypePollutionBenchmark.scala:66-72 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:380 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:380-388 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:877-883 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:590 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:590-596 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1237-1243 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala:75 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala:75-81 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/StreamRefModule.scala:75-81 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala:119 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/StreamRefModule.scala:119-125 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/StreamRefModule.scala:119-125 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:109 — cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:109-115 | cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala:112-118 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:148 — cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:148-154 | cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala:149-155 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala:178 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala:178-187 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala:189-195 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala:41 — stream/src/main/scala/org/apache/pekko/stream/impl/Modules.scala:41-47 | stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:68-74 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:167 — cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:167-173 | cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala:168-174 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/AddressModule.scala:64 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/AddressModule.scala:64-70 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/AddressModule.scala:64-70 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:129 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:129-135 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:125-131 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) persistence-query/src/main/scala/org/apache/pekko/persistence/query/EventEnvelope.scala:72 — persistence-query/src/main/scala/org/apache/pekko/persistence/query/EventEnvelope.scala:72-79 | persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/EventEnvelope.scala:305-311 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala:359 — actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala:359-367 | bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala:163-169 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×19
  • Edited copy of a member (9 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:639 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:639-647 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:650-658 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:1015 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:1015-1023 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:718-726 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala:128 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala:128-137 | testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala:601-609 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) actor/src/main/scala/org/apache/pekko/routing/ConsistentHash.scala:75 — actor/src/main/scala/org/apache/pekko/routing/ConsistentHash.scala:75-84 | actor/src/main/scala/org/apache/pekko/routing/ConsistentHash.scala:230-238 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala:523 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala:523-531 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala:533-541 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:912 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:912-920 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:922-931 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala:85 — remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala:85-93 | remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala:104-112 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1104 — remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1104-1112 | remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1123-1133 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala:117 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala:117-125 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala:139-147 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:168 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:168-177 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:207-215 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/util/FastFrequencySketchBenchmark.scala:40 — bench-jmh/src/main/scala/org/apache/pekko/util/FastFrequencySketchBenchmark.scala:40-48 | bench-jmh/src/main/scala/org/apache/pekko/util/FrequencySketchBenchmark.scala:40-48 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala:160 — bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala:160-168 | bench-jmh/src/main/scala/org/apache/pekko/actor/BenchmarkActors.scala:175-183 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala:76 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala:76-84 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeBehavior.scala:71-80 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:579 — stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:579-587 | stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:861-869 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:78 — cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:78-86 | cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala:81-89 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:233 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:233-241 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:229-237 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala:182 — stream/src/main/scala/org/apache/pekko/stream/impl/FanIn.scala:182-190 | stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala:159-167 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala:92 — bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala:92-100 | bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala:79-87 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:268 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:268-276 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:490-498 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×19
  • Duplicated block (8 lines × 2) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:453 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:453-460 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:448-455 — before extracting anything, compare `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala` and `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:585 — actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:585-592 | actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:633-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 (8 lines × 2) actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:417 — actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:417-424 | actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:496-503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:417` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:369 — actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:369-376 | actor/src/main/scala/org/apache/pekko/routing/RoutedActorCell.scala:209-216 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:369` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:313 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:313-320 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:745-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala:98 — cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala:98-105 | cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala:156-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:217 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:217-224 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala:145-152 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:225` calls `JournalResponse`, `SnapshotterResponse` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala:153` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:156 — bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:156-163 | bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:180-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:1016 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:1016-1023 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:719-726 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:610 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:610-617 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:307-314 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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 × 2) bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_asInputStream_Benchmark.scala:62 — bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_asInputStream_Benchmark.scala:62-69 | bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_toArray_Benchmark.scala:63-70 — 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) cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala:380 — cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala:380-387 | cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala:257-264 — 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) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala:196 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala:196-203 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala:249-256 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala:151 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala:151-158 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreInteractions.scala:98-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:287 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:287-294 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:122-129 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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 (8 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala:25 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala:25-32 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorSystemAccess.scala:25-32 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorSystemAccess.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorSystemAccess.scala` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:75 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:75-82 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:68-75 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala` as WHOLE FILES: this scan already matched 5 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 (8 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:70 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:70-77 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:71-78 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:499 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:499-506 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:500-507 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
X3 · Exception handling · Swallowed exception (empty catch) · ×18
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:719 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:826 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:844 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1440 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1459 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1472 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala:94 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/impl/JavaStreamConcat.scala:73 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:335 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:339 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:752 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/InflightSources.scala:85 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala:564 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:219 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala:147 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala:363 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala:750 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:1030 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×17
  • Edited copy of a member (4 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala:86 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala:86-89 | testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala:107-110 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:669 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:669-672 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:366-369 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/javadsl/PersistenceTestKitDurableStateStore.scala:79 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/javadsl/PersistenceTestKitDurableStateStore.scala:79-85 | persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala:494-497 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala:262 — cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala:262-265 | cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala:199-202 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:341 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:341-345 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:446-449 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:347 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:347-351 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:387-390 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala:86 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala:86-89 | cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala:242-245 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:81 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:81-85 | remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala:574-577 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Adapter.scala:157 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Adapter.scala:157-160 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/adapter/PropsAdapter.scala:33-36 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:113 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:113-116 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:87-90 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:121 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:121-124 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:95-98 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Effect.scala:107 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/Effect.scala:107-110 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/Effect.scala:114-117 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorRefImpl.scala:47 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorRefImpl.scala:47-50 | actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:181-184 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:784 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:784-787 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:485-488 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:562 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:562-565 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:500-504 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:321 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:321-324 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:316-319 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) actor/src/main/scala/org/apache/pekko/util/RecencyList.scala:83 — actor/src/main/scala/org/apache/pekko/util/RecencyList.scala:83-86 | actor/src/main/scala/org/apache/pekko/util/SegmentedRecencyList.scala:100-103 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×17
  • Duplicated block (7 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala:194 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala:194-200 | actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala:409-415 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:522 — actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:522-528 | persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala:165-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:522` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:270 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:270-276 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:701-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:270` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:287 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:287-293 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:718-724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:287` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:296 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:296-302 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:727-733 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:296` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:93 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:93-99 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:293-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:181 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:181-187 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:182-188 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:120 — stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:120-126 | stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:186-192 — both copies are in the same file, so extract the block into 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) stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:76 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:76-82 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:94-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) actor/src/main/scala/org/apache/pekko/io/UdpConnection.scala:170 — actor/src/main/scala/org/apache/pekko/io/UdpConnection.scala:170-176 | actor/src/main/scala/org/apache/pekko/io/UdpSender.scala:83-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:99 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:99-105 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:73-79 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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.
  • Duplicated block (7 lines × 2) persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceFirehoseQuery.scala:81 — persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/javadsl/EventsBySliceFirehoseQuery.scala:81-87 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/javadsl/PersistenceTestKitReadJournal.scala:100-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 (7 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala:161 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ExternalInteractions.scala:161-167 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateStoreInteractions.scala:108-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 (7 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:110 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:110-116 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala:110-116 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:118 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:118-124 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala:118-124 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:126 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:126-132 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala:126-132 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:114 — remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:114-120 | remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala:115-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×16
  • Edited copy of a member (6 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1428 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1428-1433 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1435-1440 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala:174 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala:174-179 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContextOps.scala:189-194 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala:82 — distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala:82-87 | distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala:82-87 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:129 — cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:129-135 | cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/ReplicatorMessageAdapter.scala:131-136 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala:85 — bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala:85-90 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:79-85 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:113 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:113-118 | testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:268-273 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2799 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2799-2804 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:4288-4293 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:138 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:138-143 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:134-139 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:146 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:146-151 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:154-159 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:143 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:143-148 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:153-158 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala:96 — bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala:96-101 | bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala:71-78 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistenceActorDeferBenchmark.scala:98 — bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistenceActorDeferBenchmark.scala:98-105 | bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorBenchmark.scala:147-152 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:50 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:50-55 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:49-54 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:145 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:145-150 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:141-146 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:152 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:152-157 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:148-153 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:159 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:159-164 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:155-160 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×15
  • Duplicated block (11 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:423 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:423-433 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:866-876 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:423` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2039 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2039-2049 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2065-2075 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2039` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2481 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2481-2491 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2543-2553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2479` calls `slice` and `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2542` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala:531 — cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala:531-541 | cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala:331-341 — 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) persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:236 — persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:236-246 | persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:348-358 — both copies are in the same file, so extract the block into 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) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:180 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:180-190 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:274-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:180` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:101 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:101-111 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala:94-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala:116 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala:116-126 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala:130-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:409 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:409-419 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:525-535 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala` as WHOLE FILES: this scan already matched 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:409` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:496 — stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:496-506 | stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:529-541 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:496` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:713 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:713-723 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1434-1444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:923 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:923-940 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1527-1537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:923` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:418 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:418-428 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala:51-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. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:418` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:430` calls `onPull` and `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala:63` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:873 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:873-883 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:574-584 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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 (11 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:546 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:546-556 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:547-557 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Edited copy of a member (13 corresponding lines) · ×14
  • Edited copy of a member (13 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:70 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:70-82 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/StatefulMapConcatAccumulator.scala:88-100 — 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) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:601 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:601-613 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:597-609 — 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) actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:361 — actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:361-376 | actor/src/main/scala/org/apache/pekko/routing/RoutedActorCell.scala:204-216 — 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) actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala:202 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/BehaviorBuilder.scala:202-214 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala:212-224 — 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) cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala:36 — cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala:36-48 | cluster/src/main/scala/org/apache/pekko/cluster/ConfigUtil.scala:50-62 — 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) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:307 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:307-319 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:257-269 — 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) stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala:131 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala:131-143 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/SourceWithContext.scala:118-130 — 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) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:421 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:421-433 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:864-876 — 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) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala:52 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceProbeBehavior.scala:52-68 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/scaladsl/PersistenceProbeBehavior.scala:50-62 — 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) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:407 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:407-419 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:523-535 — 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) bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala:100 — bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala:100-112 | bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala:121-133 — 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) actor/src/main/scala/org/apache/pekko/util/SubclassifiedIndex.scala:132 — actor/src/main/scala/org/apache/pekko/util/SubclassifiedIndex.scala:132-145 | actor/src/main/scala/org/apache/pekko/util/SubclassifiedIndex.scala:161-173 — 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) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:932 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:932-945 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:635-647 — 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) persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:403 — persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:403-417 | persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:453-465 — 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 · Duplicated block (6 lines × 2) · ×14
  • Duplicated block (6 lines × 2) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:385 — actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:385-390 | actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:403-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 (6 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:74 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:74-79 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala:71-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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:209 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:209-214 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:220-225 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `CommandHandlerCase` names `CommandHandlerBuilderByState.CommandHandlerCase` in one and `CommandHandlerWithReplyBuilderByState.CommandHandlerCase` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:211 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:211-216 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:220-225 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `CommandHandlerCase` names `CommandHandlerBuilderByState.CommandHandlerCase` in one and `CommandHandlerWithReplyBuilderByState.CommandHandlerCase` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:885 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:885-890 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1498-1503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:885` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:122 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:122-127 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:118-123 — before extracting anything, compare `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala` and `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:118` calls `nowarn` and `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:804 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:804-809 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:505-510 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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 (6 lines × 2) cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala:389 — cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala:389-394 | cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala:270-276 — 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) remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:713 — remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:713-718 | remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1097-1102 — 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) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala:99 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala:99-104 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonModule.scala:103-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonModule.scala:99` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:119 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:119-124 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:120-125 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:51 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:51-56 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala:51-56 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) actor/src/main/scala/org/apache/pekko/util/Reflect.scala:222 — actor/src/main/scala/org/apache/pekko/util/Reflect.scala:222-227 | remote/src/main/scala/org/apache/pekko/remote/serialization/ProtobufSerializer.scala:76-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala:74 — distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala:74-79 | distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala:74-79 — before extracting anything, compare `distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala` and `distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D6 · Cohesion (LCOM4) · Low cohesion · ×14
  • Low cohesion: ClusterShardingMessageSerializer (LCOM4 14) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:48 — ClusterShardingMessageSerializer's methods fall into 14 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 14 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: ReplicatorMessageSerializer (LCOM4 12) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala:161 — ReplicatorMessageSerializer'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: ActorContextAdapter (LCOM4 10) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorContextAdapter.scala:48 — ActorContextAdapter's methods fall into 10 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 10 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: ClusterSingletonManagerSpec (LCOM4 9) cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManagerSpec.scala:180 — ClusterSingletonManagerSpec'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: MultiNodeClusterSpec (LCOM4 9) cluster/src/multi-jvm/scala/org/apache/pekko/cluster/MultiNodeClusterSpec.scala:104 — MultiNodeClusterSpec'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: MiscMessageSerializer (LCOM4 7) remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:43 — MiscMessageSerializer's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ActorAdapter (LCOM4 6) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorAdapter.scala:65 — ActorAdapter'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: StubbedActorContext (LCOM4 5) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala:74 — StubbedActorContext'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: AbstractSupervisor (LCOM4 4) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala:72 — AbstractSupervisor'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: ChildActorPath (LCOM4 4) actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala:355 — ChildActorPath'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: DistributedPubSubMediatorSpec (LCOM4 4) cluster-tools/src/multi-jvm/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorSpec.scala:139 — DistributedPubSubMediatorSpec'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: ReplicatedDataSerializer (LCOM4 4) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:269 — ReplicatedDataSerializer'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: BehaviorSetup (LCOM4 4) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala:55 — BehaviorSetup'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: AssociationState (LCOM4 4) remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:135 — AssociationState'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 · Edited copy of a member (10 corresponding lines) · ×13
  • Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:357 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:357-366 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:808-817 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:319 — actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:319-328 | actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:330-339 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:435 — actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:435-444 | actor/src/main/scala/org/apache/pekko/util/SWARUtil.scala:446-455 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala:34 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala:34-43 | actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnitJupiterExtension.scala:33-42 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:133 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:133-142 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:105-114 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:1858 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:1858-1867 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:1902-1911 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:586 — remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:586-595 | remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:597-606 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:213 — actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:213-222 | actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:355-364 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) actor/src/main/scala/org/apache/pekko/util/Index.scala:163 — actor/src/main/scala/org/apache/pekko/util/Index.scala:163-178 | actor/src/main/scala/org/apache/pekko/util/Index.scala:188-197 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala:714 — stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala:714-723 | stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala:729-738 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala:36 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala:36-45 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ZipWithIndex.scala:57-66 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala:70 — remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala:70-79 | remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala:81-90 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/ActorMaterializerImpl.scala:62 — stream/src/main/scala/org/apache/pekko/stream/impl/ActorMaterializerImpl.scala:62-72 | stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:650-659 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×13
  • Duplicated block (5 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:362 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:362-366 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:813-817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:643 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:643-647 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:654-658 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:643` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:330 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:330-334 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:408-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 (5 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:163 — remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:163-167 | remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:195-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:163` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala:43 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala:43-47 | actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala:35-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 (5 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorRefImpl.scala:36 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorRefImpl.scala:36-40 | actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:127-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:951 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:951-955 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:653-657 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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 (5 lines × 2) actor/src/main/scala/org/apache/pekko/util/FrequencyList.scala:181 — actor/src/main/scala/org/apache/pekko/util/FrequencyList.scala:181-185 | actor/src/main/scala/org/apache/pekko/util/SegmentedRecencyList.scala:121-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 (5 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:125 — remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:125-129 | remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala:126-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 (5 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:105 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:105-109 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:106-110 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:166 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:166-170 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:167-171 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala:102 — cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala:102-106 | cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:167-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3829 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3829-3833 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3903-3907 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3829` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×11
  • Edited copy of a member (12 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:587 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:587-600 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:364-375 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:58 — stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:58-76 | stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:86-97 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1442 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1442-1453 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1455-1466 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:119 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:119-131 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:389-400 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala:502 — cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala:502-513 | cluster/src/main/scala/org/apache/pekko/cluster/ClusterEvent.scala:521-532 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala:62 — bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala:62-73 | bench-jmh/src/main/scala/org/apache/pekko/actor/ScheduleBenchmark.scala:76-87 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala:498 — cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala:498-509 | cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala:511-522 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/RepeatConcat.scala:42 — stream/src/main/scala/org/apache/pekko/stream/impl/RepeatConcat.scala:42-56 | stream/src/main/scala/org/apache/pekko/stream/impl/SingleConcat.scala:42-53 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala:152 — bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala:152-163 | bench-jmh/src/main/scala/org/apache/pekko/persistence/PersistentActorWithAtLeastOnceDeliveryBenchmark.scala:191-202 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:413 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:413-424 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:437-448 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala:234 — stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala:234-245 | stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala:97-108 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×10
  • Edited copy of a member (11 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:393 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:393-406 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/JavaFlowSupport.scala:97-107 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3829 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3829-3839 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3903-3913 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala:59 — actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala:59-69 | remote/src/main/scala/org/apache/pekko/remote/transport/ThrottlerTransportAdapter.scala:394-412 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:644 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:644-654 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:640-650 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala:75 — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala:75-85 | cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala:109-121 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:89 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:89-101 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala:290-300 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:404 — serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:404-414 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:422-433 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala:26 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/PekkoSerializationModule.scala:26-36 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/PekkoSerializationModule.scala:26-39 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala:220 — actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala:220-230 | actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala:232-242 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala:307 — multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala:307-317 | multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala:390-400 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×10
  • Edited copy of a member (5 corresponding lines) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:622 — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:622-626 | remote/src/main/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializer.scala:327-337 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) actor/src/main/scala/org/apache/pekko/event/Logging.scala:1608 — actor/src/main/scala/org/apache/pekko/event/Logging.scala:1608-1612 | actor/src/main/scala/org/apache/pekko/event/Logging.scala:2083-2087 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3575 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3575-3579 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3663-3667 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/Member.scala:352 — cluster/src/main/scala/org/apache/pekko/cluster/Member.scala:352-356 | remote/src/main/scala/org/apache/pekko/remote/UniqueAddress.scala:23-27 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:77 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:77-81 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:86-90 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:175 — cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:175-181 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:91-95 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:93 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:93-97 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:103-107 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala:125 — actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala:125-129 | actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala:175-180 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) actor/src/main/scala/org/apache/pekko/io/TcpListener.scala:101 — actor/src/main/scala/org/apache/pekko/io/TcpListener.scala:101-105 | actor/src/main/scala/org/apache/pekko/io/UdpListener.scala:78-82 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala:155 — cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala:155-159 | cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala:99-103 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×10
  • Duplicated block (13 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:790 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:790-802 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:491-503 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2371 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2371-2383 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2421-2433 — both copies are in the same file, so extract the block into 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala:55 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala:55-67 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateSettings.scala:58-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:398 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:398-410 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:410-422 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:398` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:396 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:396-408 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:410-422 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:396` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:87 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:87-99 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:88-100 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:43 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:43-55 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala:43-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:688 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:688-700 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:251-263 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:688` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:249` calls `handleDelete` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:686` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala:45 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala:45-57 | actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala:45-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 (13 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:278 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:278-290 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:245-257 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:278` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×9
  • Edited copy of a member (16 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:148 — bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:148-163 | bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:172-187 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala:183 — actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala:183-198 | actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala:200-216 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:900 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:900-917 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:920-935 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:887 — stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:887-908 | stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:929-944 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala:154 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala:154-170 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:310-325 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala:79 — bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala:79-96 | bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala:100-115 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:312 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:312-327 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:744-759 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala:390 — remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala:390-405 | remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala:471-486 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala:87 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala:87-102 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala:125-141 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×9
  • Edited copy of a member (15 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:569 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:569-585 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:348-362 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:344 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:344-358 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:386-400 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala:234 — persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala:234-256 | persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/scaladsl/LeveldbReadJournal.scala:264-278 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:229 — actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:229-243 | actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:366-380 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:375 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:375-389 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:370-384 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala:354 — remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala:354-368 | remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala:383-397 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:244 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:244-258 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:675-689 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala:36 — actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala:36-50 | actor/src/main/scala/org/apache/pekko/actor/dungeon/DeathWatch.scala:52-66 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala:50 — actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala:50-66 | actor/src/main/scala/org/apache/pekko/util/BoundedBlockingQueue.scala:99-113 — 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 (14 corresponding lines) · ×9
  • Edited copy of a member (14 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:360 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:360-373 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:800-813 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:161 — remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:161-174 | remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:193-206 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala:273 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala:273-290 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala:306-319 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ImmutableIntMap.scala:46 — actor/src/main/scala/org/apache/pekko/util/ImmutableIntMap.scala:46-61 | actor/src/main/scala/org/apache/pekko/util/ImmutableIntMap.scala:67-80 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:407 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:407-420 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:402-415 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala:115 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala:115-128 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala:129-142 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehavior.scala:116 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/scaladsl/EventSourcedBehavior.scala:116-129 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/scaladsl/DurableStateBehavior.scala:105-118 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:327 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:327-340 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:322-335 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:357 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:357-374 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:386-399 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×9
  • Duplicated block (12 lines × 2) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:206 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:206-217 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:202-213 — before extracting anything, compare `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala` and `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:206` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:273 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:273-284 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:299-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:273` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_append_Benchmark.scala:122 — bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_append_Benchmark.scala:122-133 | bench-jmh/src/main/scala/org/apache/pekko/util/ByteString_append_Benchmark.scala:138-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala:299 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala:299-310 | cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala:676-687 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `ShardAllocationStrategy` names `ShardCoordinator.ShardAllocationStrategy` in one and `pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 2) cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala:76 — cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala:76-87 | cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/ClusterSingleton.scala:243-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:227 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:227-238 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala:153-164 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:225` calls `JournalResponse`, `SnapshotterResponse` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala:152` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:95 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:95-106 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:88-99 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala` as WHOLE FILES: this scan already matched 5 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 (12 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:591 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:591-602 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:592-603 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala:173 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala:173-184 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala:202-213 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×9
  • Duplicated block (9 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:596 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:596-604 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:293-301 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:886 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:886-894 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:587-595 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/actor/FSM.scala:886` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1307 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1307-1315 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1318-1326 — both copies are in the same file, so extract the block into 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) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala:267 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala:267-275 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala:288-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:227 — cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:227-235 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:141-149 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:913 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:913-921 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1517-1525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:913` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:754 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:754-762 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:455-463 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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 (9 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:882 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:882-890 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:357-365 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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 (9 lines × 2) stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala:46 — stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala:46-54 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1329-1337 — 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 (10 lines × 2) · ×8
  • Duplicated block (10 lines × 2) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:411 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:411-420 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:406-415 — before extracting anything, compare `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala` and `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:411` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:141 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:141-150 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala:350-359 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:381 — actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:381-390 | actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:428-437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:122 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:122-131 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:184-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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:122` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:268 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:268-277 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:106-115 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:264` calls `alreadySeen`, `getOrElse` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:104` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:862 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:862-871 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:563-572 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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 (10 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:135 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:135-144 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:136-145 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:360 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:360-369 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:361-370 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · HackComment · ×7
  • HackComment stream/src/main/scala/org/apache/pekko/stream/impl/JsonObjectParser.scala:143 — // HACK: use arithmetic exception to cover error case — 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 serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonSerializerSpec.scala:1182 — // Hack the manifest to enforce the use a particular migration when deserializing the blob of Event1 — 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 serialization-jackson3/src/test/scala/org/apache/pekko/serialization/jackson3/JacksonSerializerSpec.scala:1408 — // Hack the manifest to enforce the use a particular migration when deserializing the blob of Event1 — 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 serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonSerializerSpec.scala:1237 — // Hack the manifest to enforce the use a particular migration when deserializing the blob of Event1 — 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 serialization-jackson/src/test/scala/org/apache/pekko/serialization/jackson/JacksonSerializerSpec.scala:1463 — // Hack the manifest to enforce the use a particular migration when deserializing the blob of Event1 — 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 project/MultiNode.scala:78 — // Hack because 'provided' dependencies by default are not picked up by the multi-jvm plugin: — 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 actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala:222 — // hack to allow programmatic set of capacity through props in pekko-typed but still share — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×7
  • Edited copy of a member (21 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:618 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:618-638 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:614-634 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:443 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:443-463 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:425-447 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:197 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:197-217 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:193-213 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:412 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:412-433 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/LazyFutureSource.scala:44-64 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:107 — stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:107-127 | stream/src/main/scala/org/apache/pekko/stream/impl/Timers.scala:137-162 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:370 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:370-390 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:310-330 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:380 — actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:380-401 | actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:427-447 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×7
  • Duplicated block (15 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:841 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:841-855 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:542-556 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/actor/FSM.scala:841` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1254 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1254-1268 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1271-1285 — both copies are in the same file, so extract the block into 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:296 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:296-310 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Recovering.scala:179-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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:296` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `RecoveryCompleted` names `pekko.persistence.typed.RecoveryCompleted` in one and `pekko.persistence.typed.state.RecoveryCompleted` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:1010 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:1010-1024 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:375-389 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:661 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:661-675 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:662-676 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:593 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:593-607 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala: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. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:593` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:369 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:369-383 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:789-803 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: TlsGraphStage.initialAttributes stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:63 — MethodTooLong — initialAttributes runs 897 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 797 over it, 8.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.
  • MethodTooLong: TlsGraphStage.createLogic stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:65 — MethodTooLong — createLogic runs 896 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 796 over it, 8.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EventWriter.apply persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventWriter.scala:248 — MethodTooLong — apply runs 418 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 318 over it, 4.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ClusterReceptionist.behavior cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala:272 — MethodTooLong — behavior runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • MethodTooLong: Split.initialAttributes stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:607 — MethodTooLong — initialAttributes runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.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: Split.createLogic stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:609 — MethodTooLong — createLogic runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×6
  • Edited copy of a member (30 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:484 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:484-514 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:465-494 — 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) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:397 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala:397-426 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:821-870 — 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) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:158 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:158-189 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:127-156 — 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) cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala:33 — cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala:33-62 | testkit/src/main/scala/org/apache/pekko/testkit/TestKitUtils.scala:35-65 — 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) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1468 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1468-1497 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1499-1529 — 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala:50 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala:50-79 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/RequestingRecoveryPermit.scala:49-78 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×6
  • Edited copies of one member (4 members, 4+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:807 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:807-810 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2786-2789 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:262-265 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:253-256 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:848 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:848-851 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2827-2830 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:303-306 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:294-297 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:297 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:297-300 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:305-308 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:297-300 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:308-311 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) actor/src/main/scala/org/apache/pekko/actor/Deployer.scala:158 — actor/src/main/scala/org/apache/pekko/actor/Deployer.scala:158-161 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessCommand.scala:52-55 | persistence/src/main/scala/org/apache/pekko/persistence/SnapshotProtocol.scala:68-71 | stream/src/main/scala/org/apache/pekko/stream/Attributes.scala:374-377 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:281 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:281-284 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:288-291 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:281-284 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:292-295 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 4+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2787 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2787-2790 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:4276-4279 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2095-2098 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2061-2064 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×6
  • Edited copy of a member (3 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:200 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:200-204 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:134-136 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2164 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2164-2166 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2451-2453 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:45 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:45-47 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:44-46 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:37 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:37-39 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:36-38 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4012 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4012-4014 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2142-2144 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:74 — stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:74-76 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala:72-74 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×6
  • Edited copy of a member (1 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3871 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3871-3871 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:1992-1992 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:462 — stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:462-462 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala:444-444 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2591 — stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2591-2591 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2557-2557 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2624 — stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2624-2624 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2590-2590 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3951 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3951-3951 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2062-2063 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (1 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3018 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3018-3018 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:4532-4532 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×6
  • Duplicated block (18 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:817 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:817-834 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:518-535 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/actor/FSM.scala:817` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala:35 — cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala:35-52 | testkit/src/main/scala/org/apache/pekko/testkit/TestKitUtils.scala:37-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `testkit/src/main/scala/org/apache/pekko/testkit/TestKitUtils.scala:55` calls `matches` and `cluster-sharding/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/MultiNodeClusterShardingConfig.scala:53` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:55 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:55-72 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala:55-72 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:88 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:88-105 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala:88-105 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:372 — stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:372-389 | stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:416-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:372` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:550 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:550-567 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:329-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×6
  • Duplicated block (17 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:662 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:662-678 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:571-587 — before extracting anything, compare `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala` and `cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:662` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Start` names `ShardingProducerController.Start` in one and `WorkPullingProducerController.Start` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:342 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:342-358 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:343-359 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:372 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:372-388 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:373-389 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:478 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:478-494 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:479-495 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:69 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:69-85 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala:69-85 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:818 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:818-834 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1451-1467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:818` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2465 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2465-2478 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2529-2542 — both copies are in the same file, so extract the block into 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) actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:126 — actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:126-139 | actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:142-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 (14 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:158 — remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:158-171 | remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala:168-181 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:158` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:509 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:509-522 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:510-523 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:1029 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:1029-1042 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:394-407 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:1029` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:77 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala:77-90 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala:77-90 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/StashManagement.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/StashManagement.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) · ×5
  • Duplicated block (16 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala:171 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/BehaviorSetup.scala:171-186 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/BehaviorSetup.scala:104-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:737 — remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:737-752 | remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:805-820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:737` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:61 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:61-76 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectWhile.scala:59-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:444 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:444-459 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:428-443 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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.
  • Duplicated block (16 lines × 2) actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala:86 — actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala:86-487 | testkit/src/main/scala/org/apache/pekko/testkit/TestJavaSerializer.scala:36-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. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/serialization/Serializer.scala:86` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:261 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:261-284 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:286-310 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:692-715 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:717-742 — 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) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:385 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:385-397 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:399-411 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:819-831 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:833-845 — 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:208 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:208-216 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:219-227 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:210-218 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:219-227 — 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) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4637 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4637-4645 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:5140-5148 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:3197-3205 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:3162-3170 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×4
  • Edited copy of a member (24 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:485 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:485-508 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Source.scala:351-374 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1215 — remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1215-1238 | remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1240-1264 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala:83 — remote/src/main/scala/org/apache/pekko/remote/RemoteMetricsExtension.scala:83-106 | remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala:134-158 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:584 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:584-607 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:615-642 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×4
  • Edited copy of a member (25 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala:112 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala:112-138 | actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala:85-109 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:329 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:329-353 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:761-785 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:147 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:147-171 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:181-205 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:547 — remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:547-571 | remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:588-615 — 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 (18 corresponding lines) · ×4
  • Edited copy of a member (18 corresponding lines) cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala:90 — cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala:90-108 | cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/delivery/ReliableDeliverySerializer.scala:149-166 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala:289 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala:289-306 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Tcp.scala:339-357 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:423 — persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:423-442 | persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:471-488 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:524 — remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:524-541 | remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:617-634 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×4
  • Duplicated block (20 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:202 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:202-221 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:169-188 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:994 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:994-1013 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:48-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala:60 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala:60-79 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/RequestingRecoveryPermit.scala:59-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/RequestingRecoveryPermit.scala:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:569 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:569-588 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:570-589 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: FlowWithContext.scala ↔ SourceWithContext.scala stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:1 — `stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala` and `stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala` change together 82% of the time (18 of the 22 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `a626d621` feat(stream): add withContext filtering and truncating operators (#3199); `2b0f6b82` add jspecify nullable annotations on streams Java DSL (#2617); `60c480ae` Add optionalVia and unsafeOptionalDataVia — run `git show` on any of them.
  • Change coupling: PersistenceTestKitPlugin.scala ↔ PersistenceTestKitReadJournal.scala persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala:1 — `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/PersistenceTestKitPlugin.scala` and `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/scaladsl/PersistenceTestKitReadJournal.scala` 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) 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 6 shared commits counted here, the most recent 3 are `0e10d291` Implement events by slice in testkit (#1533); `9230df8b` Implement EventsByTagQuery in PersistenceTestKitReadJournal (#1532); `9fb76bbe` Tagging for replicated event sourcing (#29442) (at that commit the files were still `akka-persistence-testkit/src/main/scala/akka/persistence/testkit/PersistenceTestKitPlugin.scala` and `akka-persistence-testkit/src/main/scala/akka/persistence/testkit/query/scaladsl/PersistenceTestKitReadJournal.scala`) — run `git show` on any of them.
  • Change coupling: SourceWithContext.scala ↔ FlowWithContext.scala stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala:1 — `stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala` and `stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, 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 `60c480ae` Add optionalVia and unsafeOptionalDataVia; `1b1f5722` =str Tweak the stream mapAsyncPartitioned operator; `7bee80e0` mapAsyncPartitioned / mapAsyncPartitionedUnordered (#561) — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×3
  • Edited copy of a member (23 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:109 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:109-131 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/state/scaladsl/PersistenceTestKitDurableStateStore.scala:166-193 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:135 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:135-157 | testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:414-437 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala:415 — cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala:415-437 | cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala:508-532 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×3
  • Edited copy of a member (26 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:966 — actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:966-999 | actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:1001-1026 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:449 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:449-475 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:500-525 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala:272 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala:272-297 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessCoordinator.scala:333-359 — 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 copies of one member (3 members, 9+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 9+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:2725 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:2725-2736 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:2760-2770 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:2779-2787 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala:155 — stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala:155-163 | stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala:175-183 | stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorFlow.scala:192-202 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala:227 — bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala:227-235 | bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala:239-247 | bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala:251-259 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 8+ corresponding lines) actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala:293 — actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala:293-300 | actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:520-528 | persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala:164-171 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:1999 — stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:1999-2006 | stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:2027-2036 | stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:2061-2070 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:847 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:847-854 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:694-702 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:613-621 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 5+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:246 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:246-250 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:254-259 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:247-251 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:257-261 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 5+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:364 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:364-368 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:375-379 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:362-366 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:375-379 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 5+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:341 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:341-345 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:351-355 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:339-343 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:352-356 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 6+ corresponding lines) · ×3
  • Edited copies of one member (5 members, 6+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:109 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:109-114 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:119-124 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala:110-115 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:112-117 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:120-125 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 6+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:125 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:125-130 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:135-140 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala:126-131 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:128-133 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:136-141 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 6+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:375 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:375-380 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:386-392 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala:306-311 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:373-378 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:386-392 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 3+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:720 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:720-722 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2220-2222 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:173-175 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:164-166 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 3+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2411 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2411-2413 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2697-2699 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:1675-1677 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:1643-1645 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 3+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2437 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2437-2439 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2724-2726 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:1701-1703 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:1669-1671 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:485 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:485-509 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:466-490 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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.
  • Duplicated block (25 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala:38 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala:38-62 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/TypedEventsByPersistenceIdStage.scala:46-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:766 — remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:766-790 | remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:832-856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:766` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:211 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:211-234 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:216-239 — before extracting anything, compare `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala` and `cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1892 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1892-1915 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1918-1941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:605 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:605-628 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:606-629 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×3
  • Duplicated block (9 lines × 3) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:226 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:226-234 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:260-268 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:265-273 — before extracting anything, compare `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala` and `cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:226` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:408 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:408-416 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:524-532 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:547-555 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala` as WHOLE FILES: this scan already matched 5 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 (9 lines × 3) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:210 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:210-218 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:244-252 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:249-257 — before extracting anything, compare `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala` and `cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala` as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:210` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: `Command` names `ProducerController.Command` in one and `ShardingProducerController.Command` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala:294 — actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala:294-299 | actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:522-527 | persistence/src/main/scala/org/apache/pekko/persistence/journal/EventAdapters.scala:165-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala:294` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:95 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:95-100 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:88-93 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:161-166 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala` as WHOLE FILES: this scan already matched 5 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:101` calls `maxTokenCount`, `getLongOrUnlimited` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:167` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala:99 — bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala:99-104 | bench-jmh/src/main/scala/org/apache/pekko/stream/BroadcastHubBenchmark.scala:135-140 | bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala:101-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
S1 · Web-Security Posture · Weak hash algorithm · ×3
  • Weak hash algorithm cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala:300 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:43 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1949 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D1 · Cyclomatic Complexity · VersionVector.compareOnlyTo (cyclomatic 20) · ×2
  • VersionVector.compareOnlyTo (cyclomatic 20) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:192 — VersionVector.compareOnlyTo 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.
  • VersionVector.compareOnlyTo (cyclomatic 20) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:150 — VersionVector.compareOnlyTo 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 · JacksonSerializer.fromBinary (cyclomatic 20) · ×2
  • JacksonSerializer.fromBinary (cyclomatic 20) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:390 — JacksonSerializer.fromBinary 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.
  • JacksonSerializer.fromBinary (cyclomatic 20) serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:391 — JacksonSerializer.fromBinary 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.
D2 · Cognitive Complexity · VersionVector.compareOnlyTo (cognitive 47) · ×2
  • VersionVector.compareOnlyTo (cognitive 47) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:192 — VersionVector.compareOnlyTo has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 2 (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.
  • VersionVector.compareOnlyTo (cognitive 47) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:150 — VersionVector.compareOnlyTo has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · ByteStrings.lastIndexOf (cognitive 26) · ×2
  • ByteStrings.lastIndexOf (cognitive 26) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1969 — ByteStrings.lastIndexOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (ByteStrings.lastIndexOf) 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.
  • ByteStrings.lastIndexOf (cognitive 26) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1998 — ByteStrings.lastIndexOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (ByteStrings.lastIndexOf) 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.
D2 · Cognitive Complexity · ORSet.mergeCommonKeys (cognitive 26) · ×2
  • ORSet.mergeCommonKeys (cognitive 26) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:201 — ORSet.mergeCommonKeys has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 3, 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.
  • ORSet.mergeCommonKeys (cognitive 26) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:168 — ORSet.mergeCommonKeys has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 3, 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 · JacksonSerializer.fromBinary (cognitive 20) · ×2
  • JacksonSerializer.fromBinary (cognitive 20) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:390 — JacksonSerializer.fromBinary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 5 (9 pts), boolean chains 1 (nesting depth added 5). 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.
  • JacksonSerializer.fromBinary (cognitive 20) serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:391 — JacksonSerializer.fromBinary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 5 (9 pts), boolean chains 1 (nesting depth added 5). 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 · ByteString2.indexOf (cognitive 18) · ×2
  • ByteString2.indexOf (cognitive 18) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1253 — ByteString2.indexOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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. This shape REPEATS in the file: one other method here (ByteString2.indexOf) 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.
  • ByteString2.indexOf (cognitive 18) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1270 — ByteString2.indexOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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. This shape REPEATS in the file: one other method here (ByteString2.indexOf) 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.
D2 · Cognitive Complexity · ManyVersionVector.merge (cognitive 16) · ×2
  • ManyVersionVector.merge (cognitive 16) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:370 — ManyVersionVector.merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 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.
  • ManyVersionVector.merge (cognitive 16) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:310 — ManyVersionVector.merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 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.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×2
  • Edited copy of a member (58 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:376 — remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:376-433 | remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala:407-469 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (58 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:473 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:473-536 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:231-288 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×2
  • Edited copy of a member (35 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:666 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:666-700 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:229-263 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala:108 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala:108-142 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala:201-235 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:402 — actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:402-426 | actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:484-505 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala:119 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/DurableStateBehaviorTestKitImpl.scala:119-140 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/EventSourcedBehaviorTestKitImpl.scala:152-176 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:448 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:448-474 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:443-469 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala:162 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala:162-189 | actor/src/main/scala/org/apache/pekko/actor/dungeon/TimerSchedulerImpl.scala:133-159 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:266 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:266-304 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:357-385 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:375 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:375-403 | testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:329-358 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:224 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:224-234 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:258-268 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:263-273 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:219 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:219-229 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1152-1162 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1714-1724 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:659 — testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:659-665 | testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:684-690 | testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:712-718 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala:314 — cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala:314-321 | cluster/src/main/scala/org/apache/pekko/cluster/routing/ClusterRouterConfig.scala:373-380 | remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala:87-93 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 5+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:559 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:559-563 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:600-604 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:617-621 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:102 — cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:102-106 | remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:182-191 | remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:193-202 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 6+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3921 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3921-3926 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3959-3964 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:4009-4014 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:443 — actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:443-448 | bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala:48-53 | bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala:62-67 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 6+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:922 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:922-927 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2901-2906 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:377-382 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:368-373 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 6+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:262 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:262-267 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:270-275 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:262-267 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:273-278 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 1+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 1+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3854 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3854-3854 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:1975-1975 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2608-2608 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2574-2574 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 1+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4518 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4518-4518 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:5037-5037 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:3100-3100 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:3065-3065 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×2
  • Edited copy of a member (2 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3706 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3706-3707 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:1836-1837 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (2 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4029 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4029-4030 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2124-2125 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 1+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 1+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:994 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:994-994 | stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:326-328 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2975-2975 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala:318-320 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:486-486 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:477-477 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 1+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:1027 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:1027-1027 | stream/src/main/scala/org/apache/pekko/stream/javadsl/FlowWithContext.scala:340-342 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:3008-3008 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SourceWithContext.scala:332-332 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:519-519 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:510-510 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1970 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1970-1996 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1999-2025 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:163 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:163-189 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:130-156 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:163` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×2
  • Duplicated block (26 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:396 — remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:396-421 | remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala:434-459 — 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 (26 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:631 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:631-656 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:632-657 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:378 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:378-400 | testkit/src/main/scala/org/apache/pekko/testkit/TestKit.scala:333-355 — 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 (23 lines × 2) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:986 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:986-1008 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:689-711 — before extracting anything, compare `actor/src/main/scala/org/apache/pekko/actor/FSM.scala` and `persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala` as WHOLE FILES: this scan already matched 13 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:500 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:500-521 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala:260-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. Read the line range as the matched WINDOW rather than a finished unit: at `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:500` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:223 — serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:223-244 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:252-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:704 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:704-715 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:730-742 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:704` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:479 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:479-490 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala: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. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:479` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:389 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:389-397 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:403-411 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:823-831 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:837-845 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:389` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:227 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:227-236 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:758-766 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:908-916 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:311-319 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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 (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:382 — remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:382-387 | remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala:416-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. Read the line range as the matched WINDOW rather than a finished unit: at `remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:382` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6–7 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:215 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:215-220 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala:98-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:220` calls `pull`, `enqueue` and `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala:104` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala:36 — actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala:36-56 | actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnitJupiterTestKitBuilder.scala:35-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (21 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala:53 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala:53-73 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/FiniteDurationModule.scala:53-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/FiniteDurationModule.scala:53` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: `DeserializationContext` names `com.fasterxml.jackson.databind.DeserializationContext` in one and `tools.jackson.databind.DeserializationContext` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: actor — actor: abstractness 0.23, instability 0.00, distance 0.77 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
  • Off the main sequence: testkit — testkit: abstractness 0.11, instability 0.14, distance 0.75 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · TlsGraphStage.createLogic (cyclomatic 287) · ×1
  • TlsGraphStage.createLogic (cyclomatic 287) stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:65 — TlsGraphStage.createLogic has cyclomatic complexity 287 (threshold 15). To reduce it, separate the cases: extract each independent 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 · WorkPullingProducerControllerImpl.active (cyclomatic 76) · ×1
  • WorkPullingProducerControllerImpl.active (cyclomatic 76) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:302 — WorkPullingProducerControllerImpl.active has cyclomatic complexity 76 (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 · EventWriter.apply (cyclomatic 75) · ×1
  • EventWriter.apply (cyclomatic 75) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventWriter.scala:248 — EventWriter.apply has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent 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 · FlattenConcat.createLogic (cyclomatic 75) · ×1
  • FlattenConcat.createLogic (cyclomatic 75) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlattenConcat.scala:47 — FlattenConcat.createLogic has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ProducerControllerImpl.active (cyclomatic 74) · ×1
  • ProducerControllerImpl.active (cyclomatic 74) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:405 — ProducerControllerImpl.active has cyclomatic complexity 74 (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 · DistributedPubSubMediator.receive (cyclomatic 60) · ×1
  • DistributedPubSubMediator.receive (cyclomatic 60) cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediator.scala:613 — DistributedPubSubMediator.receive has cyclomatic complexity 60 (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 · SourceRefStageImpl.createLogicAndMaterializedValue (cyclomatic 57) · ×1
  • SourceRefStageImpl.createLogicAndMaterializedValue (cyclomatic 57) stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SourceRefImpl.scala:136 — SourceRefStageImpl.createLogicAndMaterializedValue has cyclomatic complexity 57 (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 · FlattenMerge.createLogic (cyclomatic 49) · ×1
  • FlattenMerge.createLogic (cyclomatic 49) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:58 — FlattenMerge.createLogic has cyclomatic complexity 49 (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 · ClusterReceptionist.behavior (cyclomatic 48) · ×1
  • ClusterReceptionist.behavior (cyclomatic 48) cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala:272 — ClusterReceptionist.behavior has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SystemMessageDelivery.createLogic (cyclomatic 47) · ×1
  • SystemMessageDelivery.createLogic (cyclomatic 47) remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala:96 — SystemMessageDelivery.createLogic has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShardCoordinator.active (cyclomatic 44) · ×1
  • ShardCoordinator.active (cyclomatic 44) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:791 — ShardCoordinator.active 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.
D1 · Cyclomatic Complexity · GroupBy.createLogic (cyclomatic 44) · ×1
  • GroupBy.createLogic (cyclomatic 44) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:395 — GroupBy.createLogic has cyclomatic complexity 44 (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 · MapAsyncPartitioned.createLogic (cyclomatic 42) · ×1
  • MapAsyncPartitioned.createLogic (cyclomatic 42) stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala:87 — MapAsyncPartitioned.createLogic has cyclomatic complexity 42 (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 · Decoder.createLogicAndMaterializedValue (cyclomatic 41) · ×1
  • Decoder.createLogicAndMaterializedValue (cyclomatic 41) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:380 — Decoder.createLogicAndMaterializedValue 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 · ShardingProducerControllerImpl.active (cyclomatic 40) · ×1
  • ShardingProducerControllerImpl.active (cyclomatic 40) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:302 — ShardingProducerControllerImpl.active 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.
D1 · Cyclomatic Complexity · CatchupOrFirehose.createLogic (cyclomatic 40) · ×1
  • CatchupOrFirehose.createLogic (cyclomatic 40) persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:619 — CatchupOrFirehose.createLogic 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.
D1 · Cyclomatic Complexity · ReplicatorBehavior.apply (cyclomatic 39) · ×1
  • ReplicatorBehavior.apply (cyclomatic 39) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/internal/ReplicatorBehavior.scala:46 — ReplicatorBehavior.apply has cyclomatic complexity 39 (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 · Batch.createLogic (cyclomatic 37) · ×1
  • Batch.createLogic (cyclomatic 37) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1069 — Batch.createLogic has cyclomatic complexity 37 (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 · QueueSource.createLogicAndMaterializedValue (cyclomatic 35) · ×1
  • QueueSource.createLogicAndMaterializedValue (cyclomatic 35) stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala:55 — QueueSource.createLogicAndMaterializedValue 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 · ClusterCoreDaemon.receiveGossip (cyclomatic 32) · ×1
  • ClusterCoreDaemon.receiveGossip (cyclomatic 32) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:1182 — ClusterCoreDaemon.receiveGossip 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 · Delay.createLogic (cyclomatic 32) · ×1
  • Delay.createLogic (cyclomatic 32) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2083 — Delay.createLogic 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 · AggregateWithBoundary.createLogic (cyclomatic 31) · ×1
  • AggregateWithBoundary.createLogic (cyclomatic 31) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/AggregateWithBoundary.scala:45 — AggregateWithBoundary.createLogic has cyclomatic complexity 31 (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 · MapAsyncUnordered.createLogic (cyclomatic 31) · ×1
  • MapAsyncUnordered.createLogic (cyclomatic 31) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1514 — MapAsyncUnordered.createLogic 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 · Split.createLogic (cyclomatic 31) · ×1
  • Split.createLogic (cyclomatic 31) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:609 — Split.createLogic 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 · MapAsync.createLogic (cyclomatic 30) · ×1
  • MapAsync.createLogic (cyclomatic 30) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1368 — MapAsync.createLogic 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.
D1 · Cyclomatic Complexity · PhasedFusingActorMaterializer.materialize (cyclomatic 29) · ×1
  • PhasedFusingActorMaterializer.materialize (cyclomatic 29) stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:486 — PhasedFusingActorMaterializer.materialize 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 · ReplayFilter.receive (cyclomatic 28) · ×1
  • ReplayFilter.receive (cyclomatic 28) persistence/src/main/scala/org/apache/pekko/persistence/journal/ReplayFilter.scala:80 — ReplayFilter.receive 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 · Association.send (cyclomatic 28) · ×1
  • Association.send (cyclomatic 28) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:347 — Association.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 · UnfoldResourceSourceAsync.createLogic (cyclomatic 28) · ×1
  • UnfoldResourceSourceAsync.createLogic (cyclomatic 28) stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSourceAsync.scala:44 — UnfoldResourceSourceAsync.createLogic has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · GroupedWeightedWithin.createLogic (cyclomatic 28) · ×1
  • GroupedWeightedWithin.createLogic (cyclomatic 28) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1898 — GroupedWeightedWithin.createLogic 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 · BoundedSourceQueueStage.createLogicAndMaterializedValue (cyclomatic 27) · ×1
  • BoundedSourceQueueStage.createLogicAndMaterializedValue (cyclomatic 27) stream/src/main/scala/org/apache/pekko/stream/impl/BoundedSourceQueue.scala:48 — BoundedSourceQueueStage.createLogicAndMaterializedValue 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.
D1 · Cyclomatic Complexity · Controller.receive (cyclomatic 26) · ×1
  • Controller.receive (cyclomatic 26) multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala:474 — Controller.receive has cyclomatic complexity 26 (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 · ActorRefSource.createLogicAndMaterializedValue (cyclomatic 26) · ×1
  • ActorRefSource.createLogicAndMaterializedValue (cyclomatic 26) stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala:50 — ActorRefSource.createLogicAndMaterializedValue 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 · GroupedAdjacentByWeighted.createLogic (cyclomatic 26) · ×1
  • GroupedAdjacentByWeighted.createLogic (cyclomatic 26) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GroupedAdjacentByWeighted.scala:51 — GroupedAdjacentByWeighted.createLogic 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 · DnsClient.ready (cyclomatic 25) · ×1
  • DnsClient.ready (cyclomatic 25) actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala:99 — DnsClient.ready has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DDataShardCoordinator.waitingForUpdate (cyclomatic 25) · ×1
  • DDataShardCoordinator.waitingForUpdate (cyclomatic 25) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1751 — DDataShardCoordinator.waitingForUpdate 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 · SinkRefStageImpl.createLogicAndMaterializedValue (cyclomatic 25) · ×1
  • SinkRefStageImpl.createLogicAndMaterializedValue (cyclomatic 25) stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SinkRefImpl.scala:77 — SinkRefStageImpl.createLogicAndMaterializedValue 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 · Association.attachOutboundStreamRestart (cyclomatic 24) · ×1
  • Association.attachOutboundStreamRestart (cyclomatic 24) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:965 — Association.attachOutboundStreamRestart 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 · OutboundHandshake.createLogic (cyclomatic 24) · ×1
  • OutboundHandshake.createLogic (cyclomatic 24) remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala:77 — OutboundHandshake.createLogic 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 · ClusterReceptionist.receive (cyclomatic 23) · ×1
  • ClusterReceptionist.receive (cyclomatic 23) cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala:1032 — ClusterReceptionist.receive 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 · Expand.createLogic (cyclomatic 23) · ×1
  • Expand.createLogic (cyclomatic 23) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1228 — Expand.createLogic 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 · Partition.createLogic (cyclomatic 23) · ×1
  • Partition.createLogic (cyclomatic 23) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:880 — Partition.createLogic 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 · BroadcastHub.createLogicAndMaterializedValue (cyclomatic 23) · ×1
  • BroadcastHub.createLogicAndMaterializedValue (cyclomatic 23) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:879 — BroadcastHub.createLogicAndMaterializedValue 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 · ActorCell.systemInvoke (cyclomatic 22) · ×1
  • ActorCell.systemInvoke (cyclomatic 22) actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala:489 — ActorCell.systemInvoke 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 · ClusterCoreDaemon.leaderActionsOnConvergence (cyclomatic 22) · ×1
  • ClusterCoreDaemon.leaderActionsOnConvergence (cyclomatic 22) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:1461 — ClusterCoreDaemon.leaderActionsOnConvergence 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 · Replicator.receiveUpdate (cyclomatic 22) · ×1
  • Replicator.receiveUpdate (cyclomatic 22) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1675 — Replicator.receiveUpdate 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 · ReplayingEvents.onJournalResponse (cyclomatic 22) · ×1
  • ReplayingEvents.onJournalResponse (cyclomatic 22) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:131 — ReplayingEvents.onJournalResponse 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 · ConsumerControllerImpl.waitingForConfirmation (cyclomatic 21) · ×1
  • ConsumerControllerImpl.waitingForConfirmation (cyclomatic 21) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala:553 — ConsumerControllerImpl.waitingForConfirmation 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 · VectorClock.compareOnlyTo (cyclomatic 21) · ×1
  • VectorClock.compareOnlyTo (cyclomatic 21) cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:126 — VectorClock.compareOnlyTo 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 · QueueSink.createLogicAndMaterializedValue (cyclomatic 21) · ×1
  • QueueSink.createLogicAndMaterializedValue (cyclomatic 21) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:299 — QueueSink.createLogicAndMaterializedValue has cyclomatic complexity 21 (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 · FlatMapPrefix.createLogicAndMaterializedValue (cyclomatic 21) · ×1
  • FlatMapPrefix.createLogicAndMaterializedValue (cyclomatic 21) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlatMapPrefix.scala:39 — FlatMapPrefix.createLogicAndMaterializedValue 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 · TcpStreamLogic.connected (cyclomatic 21) · ×1
  • TcpStreamLogic.connected (cyclomatic 21) stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala:354 — TcpStreamLogic.connected 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 · DelimiterFramingStage.createLogic (cyclomatic 21) · ×1
  • DelimiterFramingStage.createLogic (cyclomatic 21) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala:222 — DelimiterFramingStage.createLogic 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 · ConsumerControllerImpl.active (cyclomatic 20) · ×1
  • ConsumerControllerImpl.active (cyclomatic 20) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala:299 — ConsumerControllerImpl.active 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 · LocalReceptionist.behavior (cyclomatic 20) · ×1
  • LocalReceptionist.behavior (cyclomatic 20) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala:162 — LocalReceptionist.behavior 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 · LocalActorRefProvider.actorOf (cyclomatic 20) · ×1
  • LocalActorRefProvider.actorOf (cyclomatic 20) actor/src/main/scala/org/apache/pekko/actor/ActorRefProvider.scala:666 — LocalActorRefProvider.actorOf 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 · ClusterCoreDaemon.joining (cyclomatic 20) · ×1
  • ClusterCoreDaemon.joining (cyclomatic 20) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:851 — ClusterCoreDaemon.joining has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ClusterCoreDaemon.initialized (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · EventsByPersistenceIdStage.createLogic (cyclomatic 20) · ×1
  • EventsByPersistenceIdStage.createLogic (cyclomatic 20) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala:64 — EventsByPersistenceIdStage.createLogic 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 · PersistingEvents.onJournalResponse (cyclomatic 20) · ×1
  • PersistingEvents.onJournalResponse (cyclomatic 20) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:789 — PersistingEvents.onJournalResponse 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 · VirtualProcessor.onNext (cyclomatic 20) · ×1
  • VirtualProcessor.onNext (cyclomatic 20) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:325 — VirtualProcessor.onNext 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 · ConnectionSourceStage.createLogicAndMaterializedValue (cyclomatic 20) · ×1
  • ConnectionSourceStage.createLogicAndMaterializedValue (cyclomatic 20) stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala:67 — ConnectionSourceStage.createLogicAndMaterializedValue 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 · PekkoVersion.require (cyclomatic 19) · ×1
  • PekkoVersion.require (cyclomatic 19) actor/src/main/scala/org/apache/pekko/PekkoVersion.scala:40 — PekkoVersion.require 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 · TcpConnection.doRead (cyclomatic 19) · ×1
  • TcpConnection.doRead (cyclomatic 19) actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala:263 — TcpConnection.doRead 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 · HashCode.hashArray (cyclomatic 19) · ×1
  • HashCode.hashArray (cyclomatic 19) actor/src/main/scala/org/apache/pekko/util/HashCode.scala:63 — HashCode.hashArray 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 · ShardCoordinator.receiveTerminated (cyclomatic 19) · ×1
  • ShardCoordinator.receiveTerminated (cyclomatic 19) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1144 — ShardCoordinator.receiveTerminated 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 · MsgDecoder.decode0 (cyclomatic 19) · ×1
  • MsgDecoder.decode0 (cyclomatic 19) multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala:156 — MsgDecoder.decode0 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 · RecoverWith.createLogic (cyclomatic 19) · ×1
  • RecoverWith.createLogic (cyclomatic 19) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2362 — RecoverWith.createLogic 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 · PartitionHub.createLogicAndMaterializedValue (cyclomatic 19) · ×1
  • PartitionHub.createLogicAndMaterializedValue (cyclomatic 19) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1492 — PartitionHub.createLogicAndMaterializedValue 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 · TcpConnection.handleWriteMessages (cyclomatic 18) · ×1
  • TcpConnection.handleWriteMessages (cyclomatic 18) actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala:159 — TcpConnection.handleWriteMessages 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 · WrappedEventSourcedBehavior.onMessage (cyclomatic 18) · ×1
  • WrappedEventSourcedBehavior.onMessage (cyclomatic 18) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:125 — WrappedEventSourcedBehavior.onMessage 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 · EventSourcedBehaviorImpl.apply (cyclomatic 18) · ×1
  • EventSourcedBehaviorImpl.apply (cyclomatic 18) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:135 — EventSourcedBehaviorImpl.apply 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 · ReliableDeliverySupervisor.gated (cyclomatic 18) · ×1
  • ReliableDeliverySupervisor.gated (cyclomatic 18) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:418 — ReliableDeliverySupervisor.gated 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 · RemoteSystemDaemon.! (cyclomatic 18) · ×1
  • RemoteSystemDaemon.! (cyclomatic 18) remote/src/main/scala/org/apache/pekko/remote/RemoteDaemon.scala:169 — RemoteSystemDaemon.! 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 · VirtualProcessor.onError (cyclomatic 18) · ×1
  • VirtualProcessor.onError (cyclomatic 18) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:256 — VirtualProcessor.onError 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 · FoldAsync.createLogic (cyclomatic 18) · ×1
  • FoldAsync.createLogic (cyclomatic 18) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:673 — FoldAsync.createLogic 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 · MergePrioritized.createLogic (cyclomatic 18) · ×1
  • MergePrioritized.createLogic (cyclomatic 18) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:354 — MergePrioritized.createLogic 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 · Balance.createLogic (cyclomatic 18) · ×1
  • Balance.createLogic (cyclomatic 18) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:1017 — Balance.createLogic 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 · ConsumerControllerImpl.resending (cyclomatic 17) · ×1
  • ConsumerControllerImpl.resending (cyclomatic 17) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala:434 — ConsumerControllerImpl.resending 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 · CoordinatedShutdown.run (cyclomatic 17) · ×1
  • CoordinatedShutdown.run (cyclomatic 17) actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala:715 — CoordinatedShutdown.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 · Version.parse (cyclomatic 17) · ×1
  • Version.parse (cyclomatic 17) actor/src/main/scala/org/apache/pekko/util/Version.scala:56 — Version.parse 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 · PassivationStrategy.describe (cyclomatic 17) · ×1
  • PassivationStrategy.describe (cyclomatic 17) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala:784 — PassivationStrategy.describe 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 · Shard.deliverMessage (cyclomatic 17) · ×1
  • Shard.deliverMessage (cyclomatic 17) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala:1095 — Shard.deliverMessage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Shard.waitingForRememberEntitiesStore (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · PersistentShardCoordinator.receiveRecover (cyclomatic 17) · ×1
  • PersistentShardCoordinator.receiveRecover (cyclomatic 17) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1457 — PersistentShardCoordinator.receiveRecover 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 · ClusterSingletonProxy.receive (cyclomatic 17) · ×1
  • ClusterSingletonProxy.receive (cyclomatic 17) cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala:278 — ClusterSingletonProxy.receive 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 · Replicator.receiveDeltaPropagation (cyclomatic 17) · ×1
  • Replicator.receiveDeltaPropagation (cyclomatic 17) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:2090 — Replicator.receiveDeltaPropagation 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 · EndpointWriter.sendBufferedMessages (cyclomatic 17) · ×1
  • EndpointWriter.sendBufferedMessages (cyclomatic 17) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:845 — EndpointWriter.sendBufferedMessages 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 · RemoteActorRefProvider.actorOf (cyclomatic 17) · ×1
  • RemoteActorRefProvider.actorOf (cyclomatic 17) remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:421 — RemoteActorRefProvider.actorOf 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 · Buffer.createLogic (cyclomatic 17) · ×1
  • Buffer.createLogic (cyclomatic 17) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:954 — Buffer.createLogic 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 · StatefulMapConcat.createLogic (cyclomatic 17) · ×1
  • StatefulMapConcat.createLogic (cyclomatic 17) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2557 — StatefulMapConcat.createLogic 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 · ActorSelection.deliverSelection (cyclomatic 16) · ×1
  • ActorSelection.deliverSelection (cyclomatic 16) actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala:208 — ActorSelection.deliverSelection 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 · ActorPathValidationBenchmark.charAtLoop (cyclomatic 16) · ×1
  • ActorPathValidationBenchmark.charAtLoop (cyclomatic 16) bench-jmh/src/main/scala/org/apache/pekko/actor/ActorPathValidationBenchmark.scala:106 — ActorPathValidationBenchmark.charAtLoop has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ShardRegion.deliverMessage (cyclomatic 16) · ×1
  • ShardRegion.deliverMessage (cyclomatic 16) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:1290 — ShardRegion.deliverMessage 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 · EventSourcedRememberEntitiesShardStore.receiveCommand (cyclomatic 16) · ×1
  • EventSourcedRememberEntitiesShardStore.receiveCommand (cyclomatic 16) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala:102 — EventSourcedRememberEntitiesShardStore.receiveCommand 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 · AdapterClusterImpl.subscriptionsBehavior (cyclomatic 16) · ×1
  • AdapterClusterImpl.subscriptionsBehavior (cyclomatic 16) cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/AdaptedClusterImpl.scala:41 — AdapterClusterImpl.subscriptionsBehavior 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 · MsgEncoder.encode0 (cyclomatic 16) · ×1
  • MsgEncoder.encode0 (cyclomatic 16) multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala:95 — MsgEncoder.encode0 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 · ReplayingSnapshot.createBehavior (cyclomatic 16) · ×1
  • ReplayingSnapshot.createBehavior (cyclomatic 16) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingSnapshot.scala:63 — ReplayingSnapshot.createBehavior 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 · Eventsourced.recoveryStarted (cyclomatic 16) · ×1
  • Eventsourced.recoveryStarted (cyclomatic 16) persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:635 — Eventsourced.recoveryStarted has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DefaultMessageDispatcher.dispatch (cyclomatic 16) · ×1
  • DefaultMessageDispatcher.dispatch (cyclomatic 16) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:85 — DefaultMessageDispatcher.dispatch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ReliableDeliverySupervisor.receive (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Association.setupIdleTimer (cyclomatic 16) · ×1
  • Association.setupIdleTimer (cyclomatic 16) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:687 — Association.setupIdleTimer 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 · IterableConcat.createLogic (cyclomatic 16) · ×1
  • IterableConcat.createLogic (cyclomatic 16) stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala:44 — IterableConcat.createLogic 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 · IslandTracking.wireOut (cyclomatic 16) · ×1
  • IslandTracking.wireOut (cyclomatic 16) stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:324 — IslandTracking.wireOut 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 · VirtualProcessor.onComplete (cyclomatic 16) · ×1
  • VirtualProcessor.onComplete (cyclomatic 16) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:299 — VirtualProcessor.onComplete 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 · ScanAsync.createLogic (cyclomatic 16) · ×1
  • ScanAsync.createLogic (cyclomatic 16) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:481 — ScanAsync.createLogic 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 · FileSource.createLogicAndMaterializedValue (cyclomatic 16) · ×1
  • FileSource.createLogicAndMaterializedValue (cyclomatic 16) stream/src/main/scala/org/apache/pekko/stream/impl/io/IOSources.scala:60 — FileSource.createLogicAndMaterializedValue 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 · TestEventListener.receive (cyclomatic 16) · ×1
  • TestEventListener.receive (cyclomatic 16) testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala:562 — TestEventListener.receive 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:65 — stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 287 in TlsGraphStage.createLogic at line 65. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 19:59:29 +01:00' --until='2026-11-13 19:59:29 +01:00' --full-history --no-merges -- stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala`: 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala:82 — actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is PekkoForkJoinTask.exec at line 82), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Revert "fix: preserve Runnable hash codes in PekkoForkJoinTask (#3668)" (#3681)”; “fix: preserve Runnable hash codes in PekkoForkJoinTask (#3668)”; “Revert unconditional fork-join task wrapping from #3621 (#3628)”; “fix: stop handing a reused ForkJoinTask to the fork-join dispatcher (#3621)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 19:59:29 +01:00' --until='2026-11-13 19:59:29 +01:00' --full-history --no-merges -- actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala`: 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 · TlsGraphStage.createLogic (cognitive 369) · ×1
  • TlsGraphStage.createLogic (cognitive 369) stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala:65 — TlsGraphStage.createLogic has cognitive complexity 369 (threshold 15). Drivers by points: if/else 150 (212 pts), boolean chains 112, error handling 11 (25 pts), match/switch 10 (14 pts), loops 6 (nesting depth added 80). To reduce it, split the body into named stages: move each independent 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 · EventWriter.apply (cognitive 148) · ×1
  • EventWriter.apply (cognitive 148) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventWriter.scala:248 — EventWriter.apply has cognitive complexity 148 (threshold 15). Drivers by points: if/else 55 (110 pts), match/switch 14 (27 pts), boolean chains 11 (nesting depth added 68). To reduce it, split the body into named stages: move each independent 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 · ProducerControllerImpl.active (cognitive 103) · ×1
  • ProducerControllerImpl.active (cognitive 103) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:405 — ProducerControllerImpl.active has cognitive complexity 103 (threshold 15). Drivers by points: if/else 68 (89 pts), boolean chains 13, match/switch 1 (nesting depth added 21). 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 · FlattenConcat.createLogic (cognitive 96) · ×1
  • FlattenConcat.createLogic (cognitive 96) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlattenConcat.scala:47 — FlattenConcat.createLogic has cognitive complexity 96 (threshold 15). Drivers by points: if/else 51 (72 pts), boolean chains 12, match/switch 7 (10 pts), loops 1 (2 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 · WorkPullingProducerControllerImpl.active (cognitive 81) · ×1
  • WorkPullingProducerControllerImpl.active (cognitive 81) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:302 — WorkPullingProducerControllerImpl.active has cognitive complexity 81 (threshold 15). Drivers by points: if/else 34 (48 pts), match/switch 16 (24 pts), boolean chains 9 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShardCoordinator.active (cognitive 80) · ×1
  • ShardCoordinator.active (cognitive 80) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:791 — ShardCoordinator.active has cognitive complexity 80 (threshold 15). Drivers by points: if/else 29 (58 pts), match/switch 8 (20 pts), boolean chains 2 (nesting depth added 41). 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 · ClusterReceptionist.behavior (cognitive 79) · ×1
  • ClusterReceptionist.behavior (cognitive 79) cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/internal/receptionist/ClusterReceptionist.scala:272 — ClusterReceptionist.behavior has cognitive complexity 79 (threshold 15). Drivers by points: if/else 35 (68 pts), match/switch 5 (9 pts), boolean chains 2 (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 · Decoder.createLogicAndMaterializedValue (cognitive 76) · ×1
  • Decoder.createLogicAndMaterializedValue (cognitive 76) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:380 — Decoder.createLogicAndMaterializedValue has cognitive complexity 76 (threshold 15). Drivers by points: if/else 31 (53 pts), match/switch 7 (13 pts), boolean chains 6, error handling 4 (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 · SystemMessageDelivery.createLogic (cognitive 73) · ×1
  • SystemMessageDelivery.createLogic (cognitive 73) remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala:96 — SystemMessageDelivery.createLogic has cognitive complexity 73 (threshold 15). Drivers by points: if/else 37 (56 pts), boolean chains 8, match/switch 6 (8 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceRefStageImpl.createLogicAndMaterializedValue (cognitive 72) · ×1
  • SourceRefStageImpl.createLogicAndMaterializedValue (cognitive 72) stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SourceRefImpl.scala:136 — SourceRefStageImpl.createLogicAndMaterializedValue has cognitive complexity 72 (threshold 15). Drivers by points: if/else 32 (37 pts), match/switch 18 (32 pts), boolean chains 3 (nesting depth added 19). 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 · DistributedPubSubMediator.receive (cognitive 70) · ×1
  • DistributedPubSubMediator.receive (cognitive 70) cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediator.scala:613 — DistributedPubSubMediator.receive has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (40 pts), match/switch 8 (15 pts), loops 3 (12 pts), boolean chains 3 (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 · PekkoVersion.require (cognitive 62) · ×1
  • PekkoVersion.require (cognitive 62) actor/src/main/scala/org/apache/pekko/PekkoVersion.scala:40 — PekkoVersion.require has cognitive complexity 62 (threshold 15). Drivers by points: if/else 14 (48 pts), match/switch 3 (13 pts), boolean chains 1 (nesting depth added 44). 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 · CatchupOrFirehose.createLogic (cognitive 60) · ×1
  • CatchupOrFirehose.createLogic (cognitive 60) persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:619 — CatchupOrFirehose.createLogic has cognitive complexity 60 (threshold 15). Drivers by points: if/else 29 (47 pts), boolean chains 7, match/switch 5 (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.
D2 · Cognitive Complexity · GroupBy.createLogic (cognitive 60) · ×1
  • GroupBy.createLogic (cognitive 60) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:395 — GroupBy.createLogic has cognitive complexity 60 (threshold 15). Drivers by points: if/else 35 (45 pts), boolean chains 8, loops 2 (3 pts), match/switch 2 (3 pts), error handling 1 (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 · MapAsyncPartitioned.createLogic (cognitive 55) · ×1
  • MapAsyncPartitioned.createLogic (cognitive 55) stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala:87 — MapAsyncPartitioned.createLogic has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (29 pts), match/switch 10 (18 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 14). 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 · FlattenMerge.createLogic (cognitive 55) · ×1
  • FlattenMerge.createLogic (cognitive 55) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:58 — FlattenMerge.createLogic has cognitive complexity 55 (threshold 15). Drivers by points: if/else 32 (37 pts), match/switch 7 (11 pts), boolean chains 6, loops 1 (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 · PhasedFusingActorMaterializer.materialize (cognitive 53) · ×1
  • PhasedFusingActorMaterializer.materialize (cognitive 53) stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:486 — PhasedFusingActorMaterializer.materialize has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (46 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Shard.deliverMessage (cognitive 52) · ×1
  • Shard.deliverMessage (cognitive 52) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala:1095 — Shard.deliverMessage has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (46 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 34). 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 · Replicator.receiveDeltaPropagation (cognitive 51) · ×1
  • Replicator.receiveDeltaPropagation (cognitive 51) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:2090 — Replicator.receiveDeltaPropagation has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (43 pts), match/switch 2 (6 pts), error handling 1 (2 pts) (nesting depth added 33). 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 · Association.send (cognitive 50) · ×1
  • Association.send (cognitive 50) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:347 — Association.send has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (35 pts), match/switch 4 (8 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Batch.createLogic (cognitive 50) · ×1
  • Batch.createLogic (cognitive 50) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1069 — Batch.createLogic has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (23 pts), match/switch 5 (15 pts), error handling 5 (10 pts), boolean chains 2 (nesting depth added 20). 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 · GroupedWeightedWithin.createLogic (cognitive 50) · ×1
  • GroupedWeightedWithin.createLogic (cognitive 50) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1898 — GroupedWeightedWithin.createLogic has cognitive complexity 50 (threshold 15). Drivers by points: if/else 29 (43 pts), boolean chains 4, match/switch 1 (2 pts), error handling 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 · VectorClock.compareOnlyTo (cognitive 48) · ×1
  • VectorClock.compareOnlyTo (cognitive 48) cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:126 — VectorClock.compareOnlyTo has cognitive complexity 48 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · DDataShardCoordinator.waitingForUpdate (cognitive 47) · ×1
  • DDataShardCoordinator.waitingForUpdate (cognitive 47) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1751 — DDataShardCoordinator.waitingForUpdate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 26 (46 pts), match/switch 1 (nesting depth added 20). 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 · ClusterCoreDaemon.receiveGossip (cognitive 46) · ×1
  • ClusterCoreDaemon.receiveGossip (cognitive 46) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:1182 — ClusterCoreDaemon.receiveGossip has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 7, match/switch 2 (5 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BoundedSourceQueueStage.createLogicAndMaterializedValue (cognitive 46) · ×1
  • BoundedSourceQueueStage.createLogicAndMaterializedValue (cognitive 46) stream/src/main/scala/org/apache/pekko/stream/impl/BoundedSourceQueue.scala:48 — BoundedSourceQueueStage.createLogicAndMaterializedValue has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (40 pts), match/switch 5, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VirtualProcessor.onNext (cognitive 46) · ×1
  • VirtualProcessor.onNext (cognitive 46) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:325 — VirtualProcessor.onNext has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (30 pts), error handling 3 (9 pts), match/switch 3 (7 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Split.createLogic (cognitive 46) · ×1
  • Split.createLogic (cognitive 46) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala:609 — Split.createLogic has cognitive complexity 46 (threshold 15). Drivers by points: if/else 27 (37 pts), match/switch 4 (5 pts), boolean chains 3, error handling 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 · ActorSelection.deliverSelection (cognitive 44) · ×1
  • ActorSelection.deliverSelection (cognitive 44) actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala:208 — ActorSelection.deliverSelection has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (36 pts), match/switch 2 (5 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · ReplayFilter.receive (cognitive 44) · ×1
  • ReplayFilter.receive (cognitive 44) persistence/src/main/scala/org/apache/pekko/persistence/journal/ReplayFilter.scala:80 — ReplayFilter.receive has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 4 (13 pts), loops 1 (3 pts), error handling 1 (2 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 · ShardingProducerControllerImpl.active (cognitive 43) · ×1
  • ShardingProducerControllerImpl.active (cognitive 43) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:302 — ShardingProducerControllerImpl.active has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (32 pts), match/switch 8 (9 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 · Association.setupIdleTimer (cognitive 42) · ×1
  • Association.setupIdleTimer (cognitive 42) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:687 — Association.setupIdleTimer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 4 (18 pts), boolean chains 2 (nesting depth added 26). 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 · SubscriberManagement.moreRequested (cognitive 42) · ×1
  • SubscriberManagement.moreRequested (cognitive 42) stream/src/main/scala/org/apache/pekko/stream/impl/SubscriberManagement.scala:114 — SubscriberManagement.moreRequested has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (29 pts), match/switch 2 (7 pts), error handling 1 (5 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Shard.entityTerminated (cognitive 41) · ×1
  • Shard.entityTerminated (cognitive 41) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala:939 — Shard.entityTerminated has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (38 pts), match/switch 2 (3 pts) (nesting depth added 25). 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 · ActorRefSource.createLogicAndMaterializedValue (cognitive 41) · ×1
  • ActorRefSource.createLogicAndMaterializedValue (cognitive 41) stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefSource.scala:50 — ActorRefSource.createLogicAndMaterializedValue has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (23 pts), match/switch 5 (13 pts), boolean chains 4, error handling 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 · QueueSource.createLogicAndMaterializedValue (cognitive 41) · ×1
  • QueueSource.createLogicAndMaterializedValue (cognitive 41) stream/src/main/scala/org/apache/pekko/stream/impl/QueueSource.scala:55 — QueueSource.createLogicAndMaterializedValue has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (27 pts), match/switch 4 (7 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RestartSupervisor.aroundSignal (cognitive 40) · ×1
  • RestartSupervisor.aroundSignal (cognitive 40) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala:224 — RestartSupervisor.aroundSignal has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 4 (9 pts), boolean chains 3 (nesting depth added 18). 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 · LocalActorRefProvider.actorOf (cognitive 40) · ×1
  • LocalActorRefProvider.actorOf (cognitive 40) actor/src/main/scala/org/apache/pekko/actor/ActorRefProvider.scala:666 — LocalActorRefProvider.actorOf has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (28 pts), match/switch 4 (8 pts), error handling 2 (4 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.
D2 · Cognitive Complexity · ByteString.lastIndexOfSlice (cognitive 40) · ×1
  • ByteString.lastIndexOfSlice (cognitive 40) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2459 — ByteString.lastIndexOfSlice has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (36 pts), loops 1 (2 pts), 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 · Delay.createLogic (cognitive 40) · ×1
  • Delay.createLogic (cognitive 40) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2083 — Delay.createLogic has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 8, match/switch 2 (3 pts), error handling 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 · IslandTracking.wireOut (cognitive 38) · ×1
  • IslandTracking.wireOut (cognitive 38) stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:324 — IslandTracking.wireOut has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AggregateWithBoundary.createLogic (cognitive 38) · ×1
  • AggregateWithBoundary.createLogic (cognitive 38) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/AggregateWithBoundary.scala:45 — AggregateWithBoundary.createLogic has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 5 (13 pts), error handling 5 (8 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TcpConnection.doRead (cognitive 37) · ×1
  • TcpConnection.doRead (cognitive 37) actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala:263 — TcpConnection.doRead has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (29 pts), match/switch 2 (5 pts), error handling 1 (2 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.
D2 · Cognitive Complexity · Version.parse (cognitive 37) · ×1
  • Version.parse (cognitive 37) actor/src/main/scala/org/apache/pekko/util/Version.scala:56 — Version.parse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (27 pts), error handling 2 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClusterCoreDaemon.joining (cognitive 37) · ×1
  • ClusterCoreDaemon.joining (cognitive 37) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:851 — ClusterCoreDaemon.joining has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 4 (10 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RemoteActorRefProvider.actorOf (cognitive 37) · ×1
  • RemoteActorRefProvider.actorOf (cognitive 37) remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala:421 — RemoteActorRefProvider.actorOf has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 2 (9 pts), match/switch 4 (9 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnfoldResourceSourceAsync.createLogic (cognitive 37) · ×1
  • UnfoldResourceSourceAsync.createLogic (cognitive 37) stream/src/main/scala/org/apache/pekko/stream/impl/UnfoldResourceSourceAsync.scala:44 — UnfoldResourceSourceAsync.createLogic has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 14 (24 pts), if/else 8 (10 pts), error handling 1 (3 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MapAsyncUnordered.createLogic (cognitive 37) · ×1
  • MapAsyncUnordered.createLogic (cognitive 37) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1514 — MapAsyncUnordered.createLogic has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 4, match/switch 4, error handling 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 · SmallestMailboxRoutingLogic.selectNext (cognitive 36) · ×1
  • SmallestMailboxRoutingLogic.selectNext (cognitive 36) actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala:64 — SmallestMailboxRoutingLogic.selectNext has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 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 · Controller.receive (cognitive 36) · ×1
  • Controller.receive (cognitive 36) multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala:474 — Controller.receive has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (8 pts), match/switch 4 (7 pts) (nesting depth added 19). 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 · SinkRefStageImpl.createLogicAndMaterializedValue (cognitive 35) · ×1
  • SinkRefStageImpl.createLogicAndMaterializedValue (cognitive 35) stream/src/main/scala/org/apache/pekko/stream/impl/streamref/SinkRefImpl.scala:77 — SinkRefStageImpl.createLogicAndMaterializedValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (22 pts), match/switch 8 (11 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Association.attachOutboundStreamRestart (cognitive 34) · ×1
  • Association.attachOutboundStreamRestart (cognitive 34) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:965 — Association.attachOutboundStreamRestart has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 8, match/switch 3 (6 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 · FlatMapPrefix.createLogicAndMaterializedValue (cognitive 34) · ×1
  • FlatMapPrefix.createLogicAndMaterializedValue (cognitive 34) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FlatMapPrefix.scala:39 — FlatMapPrefix.createLogicAndMaterializedValue has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (25 pts), match/switch 6, error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · GroupedAdjacentByWeighted.createLogic (cognitive 34) · ×1
  • GroupedAdjacentByWeighted.createLogic (cognitive 34) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GroupedAdjacentByWeighted.scala:51 — GroupedAdjacentByWeighted.createLogic has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (23 pts), match/switch 6, boolean chains 3, error handling 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Expand.createLogic (cognitive 34) · ×1
  • Expand.createLogic (cognitive 34) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1228 — Expand.createLogic has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), error handling 4, boolean chains 3, 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 · MapAsync.createLogic (cognitive 34) · ×1
  • MapAsync.createLogic (cognitive 34) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1368 — MapAsync.createLogic has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 8 (13 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DelimiterFramingStage.createLogic (cognitive 34) · ×1
  • DelimiterFramingStage.createLogic (cognitive 34) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala:222 — DelimiterFramingStage.createLogic has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 3, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Partition.createLogic (cognitive 34) · ×1
  • Partition.createLogic (cognitive 34) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:880 — Partition.createLogic has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 2, match/switch 1 (2 pts), error handling 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 · Serialization.serializerFor (cognitive 33) · ×1
  • Serialization.serializerFor (cognitive 33) actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala:311 — Serialization.serializerFor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 4 (9 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · Balance.createLogic (cognitive 33) · ×1
  • Balance.createLogic (cognitive 33) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:1017 — Balance.createLogic has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoordinatedShutdown.run (cognitive 32) · ×1
  • CoordinatedShutdown.run (cognitive 32) actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala:715 — CoordinatedShutdown.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 3 (7 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TcpConnection.handleWriteMessages (cognitive 32) · ×1
  • TcpConnection.handleWriteMessages (cognitive 32) actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala:159 — TcpConnection.handleWriteMessages has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 1, match/switch 1 (nesting depth added 16). 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 · PersistingEvents.onJournalResponse (cognitive 32) · ×1
  • PersistingEvents.onJournalResponse (cognitive 32) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:789 — PersistingEvents.onJournalResponse has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 3, match/switch 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 · OutboundHandshake.createLogic (cognitive 32) · ×1
  • OutboundHandshake.createLogic (cognitive 32) remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala:77 — OutboundHandshake.createLogic has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 5 (7 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 · DnsClient.ready (cognitive 31) · ×1
  • DnsClient.ready (cognitive 31) actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala:99 — DnsClient.ready has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 8 (15 pts) (nesting depth added 16). 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 · ClusterCoreDaemon.leaderActionsOnConvergence (cognitive 31) · ×1
  • ClusterCoreDaemon.leaderActionsOnConvergence (cognitive 31) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:1461 — ClusterCoreDaemon.leaderActionsOnConvergence has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 9, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinearTraversalBuilder.append (cognitive 31) · ×1
  • LinearTraversalBuilder.append (cognitive 31) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:958 — LinearTraversalBuilder.append has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 3 (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.
D2 · Cognitive Complexity · ByteString.indexOfSlice (cognitive 30) · ×1
  • ByteString.indexOfSlice (cognitive 30) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2369 — ByteString.indexOfSlice has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (26 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 · LeastShardAllocationStrategy.rebalance (cognitive 30) · ×1
  • LeastShardAllocationStrategy.rebalance (cognitive 30) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/LeastShardAllocationStrategy.scala:57 — LeastShardAllocationStrategy.rebalance has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FoldAsync.createLogic (cognitive 30) · ×1
  • FoldAsync.createLogic (cognitive 30) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:673 — FoldAsync.createLogic has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 5 (9 pts), boolean chains 2, error handling 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 · MergePrioritized.createLogic (cognitive 30) · ×1
  • MergePrioritized.createLogic (cognitive 30) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:354 — MergePrioritized.createLogic has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · ShardCoordinator.receiveTerminated (cognitive 29) · ×1
  • ShardCoordinator.receiveTerminated (cognitive 29) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1144 — ShardCoordinator.receiveTerminated has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (7 pts), boolean chains 2 (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 · SplitBrainResolverBase.tick (cognitive 29) · ×1
  • SplitBrainResolverBase.tick (cognitive 29) cluster/src/main/scala/org/apache/pekko/cluster/sbr/SplitBrainResolver.scala:308 — SplitBrainResolverBase.tick has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Replicator.receiveUpdate (cognitive 29) · ×1
  • Replicator.receiveUpdate (cognitive 29) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1675 — Replicator.receiveUpdate has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 8 (15 pts), if/else 8 (13 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EndpointManager.handleInboundAssociation (cognitive 29) · ×1
  • EndpointManager.handleInboundAssociation (cognitive 29) remote/src/main/scala/org/apache/pekko/remote/Remoting.scala:861 — EndpointManager.handleInboundAssociation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (10 pts) (nesting depth added 16). 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 · ArteryTransport.attachControlMessageObserver (cognitive 29) · ×1
  • ArteryTransport.attachControlMessageObserver (cognitive 29) remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:519 — ArteryTransport.attachControlMessageObserver has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (9 pts), error handling 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 · DaemonMsgCreateSerializer.fromBinary (cognitive 29) · ×1
  • DaemonMsgCreateSerializer.fromBinary (cognitive 29) remote/src/main/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializer.scala:116 — DaemonMsgCreateSerializer.fromBinary has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (27 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LocalReceptionist.behavior (cognitive 28) · ×1
  • LocalReceptionist.behavior (cognitive 28) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionist.scala:162 — LocalReceptionist.behavior has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 5 (8 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 · ClusterCoreDaemon.initJoin (cognitive 28) · ×1
  • ClusterCoreDaemon.initJoin (cognitive 28) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:661 — ClusterCoreDaemon.initJoin has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (26 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 · NettyTransport.associate (cognitive 28) · ×1
  • NettyTransport.associate (cognitive 28) remote/src/main/scala/org/apache/pekko/remote/transport/netty/NettyTransport.scala:579 — NettyTransport.associate has cognitive complexity 28 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 7 (12 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · StatefulMapConcat.createLogic (cognitive 28) · ×1
  • StatefulMapConcat.createLogic (cognitive 28) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2557 — StatefulMapConcat.createLogic has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (25 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 · TLSActor.doInbound (cognitive 28) · ×1
  • TLSActor.doInbound (cognitive 28) stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:340 — TLSActor.doInbound has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 3 (7 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Merge.createLogic (cognitive 28) · ×1
  • Merge.createLogic (cognitive 28) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:111 — Merge.createLogic has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 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 · ConsumerControllerImpl.active (cognitive 27) · ×1
  • ConsumerControllerImpl.active (cognitive 27) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala:299 — ConsumerControllerImpl.active has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 2, boolean chains 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ConsumerControllerImpl.waitingForConfirmation (cognitive 27) · ×1
  • ConsumerControllerImpl.waitingForConfirmation (cognitive 27) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ConsumerControllerImpl.scala:553 — ConsumerControllerImpl.waitingForConfirmation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 2, match/switch 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ShardRegion.deliverMessage (cognitive 27) · ×1
  • ShardRegion.deliverMessage (cognitive 27) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:1290 — ShardRegion.deliverMessage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 4 (8 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.
D2 · Cognitive Complexity · VirtualProcessor.onSubscribe (cognitive 27) · ×1
  • VirtualProcessor.onSubscribe (cognitive 27) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:168 — VirtualProcessor.onSubscribe has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 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.
D2 · Cognitive Complexity · ParsingLogic.doParseInner (cognitive 27) · ×1
  • ParsingLogic.doParseInner (cognitive 27) stream/src/main/scala/org/apache/pekko/stream/impl/io/ByteStringParser.scala:61 — ParsingLogic.doParseInner has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 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 · Version.compareTo (cognitive 26) · ×1
  • Version.compareTo (cognitive 26) actor/src/main/scala/org/apache/pekko/util/Version.scala:156 — Version.compareTo has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 2 (nesting depth added 15). 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 · ShardRegion.receiveCoordinatorMessage (cognitive 26) · ×1
  • ShardRegion.receiveCoordinatorMessage (cognitive 26) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:827 — ShardRegion.receiveCoordinatorMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DeltaPropagationSelector.collectPropagations (cognitive 26) · ×1
  • DeltaPropagationSelector.collectPropagations (cognitive 26) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DeltaPropagationSelector.scala:79 — DeltaPropagationSelector.collectPropagations has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 3 (11 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 · VirtualProcessor.onError (cognitive 26) · ×1
  • VirtualProcessor.onError (cognitive 26) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:256 — VirtualProcessor.onError has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 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 · TraversalBuilder.getValuePresentedSource (cognitive 26) · ×1
  • TraversalBuilder.getValuePresentedSource (cognitive 26) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:396 — TraversalBuilder.getValuePresentedSource has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 9 (12 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 · GraphInterpreter.execute (cognitive 26) · ×1
  • GraphInterpreter.execute (cognitive 26) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:491 — GraphInterpreter.execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (8 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CallingThreadDispatcher.runQueue (cognitive 26) · ×1
  • CallingThreadDispatcher.runQueue (cognitive 26) testkit/src/main/scala/org/apache/pekko/testkit/CallingThreadDispatcher.scala:257 — CallingThreadDispatcher.runQueue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (19 pts), error handling 3 (6 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 · ShardRegion.register (cognitive 25) · ×1
  • ShardRegion.register (cognitive 25) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:1134 — ShardRegion.register has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 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.
D2 · Cognitive Complexity · ORMap.dryMergeDelta (cognitive 25) · ×1
  • ORMap.dryMergeDelta (cognitive 25) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala:406 — ORMap.dryMergeDelta has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 6 (11 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 · Encoder.createLogicAndMaterializedValue (cognitive 25) · ×1
  • Encoder.createLogicAndMaterializedValue (cognitive 25) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:81 — Encoder.createLogicAndMaterializedValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 6 (9 pts), boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FileSource.createLogicAndMaterializedValue (cognitive 25) · ×1
  • FileSource.createLogicAndMaterializedValue (cognitive 25) stream/src/main/scala/org/apache/pekko/stream/impl/io/IOSources.scala:60 — FileSource.createLogicAndMaterializedValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, error handling 2 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · ConnectionSourceStage.createLogicAndMaterializedValue (cognitive 25) · ×1
  • ConnectionSourceStage.createLogicAndMaterializedValue (cognitive 25) stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala:67 — ConnectionSourceStage.createLogicAndMaterializedValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PassivationStrategy.describe (cognitive 24) · ×1
  • PassivationStrategy.describe (cognitive 24) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala:784 — PassivationStrategy.describe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 4 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EntityPassivationStrategy.apply (cognitive 24) · ×1
  • EntityPassivationStrategy.apply (cognitive 24) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EntityPassivationStrategy.scala:39 — EntityPassivationStrategy.apply has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ClusterReceptionist.receive (cognitive 24) · ×1
  • ClusterReceptionist.receive (cognitive 24) cluster-tools/src/main/scala/org/apache/pekko/cluster/client/ClusterClient.scala:1032 — ClusterReceptionist.receive has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Replicator.initRemovedNodePruning (cognitive 24) · ×1
  • Replicator.initRemovedNodePruning (cognitive 24) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:2549 — Replicator.initRemovedNodePruning has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 3 (12 pts), if/else 4 (7 pts), loops 2 (5 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MsgDecoder.decode0 (cognitive 24) · ×1
  • MsgDecoder.decode0 (cognitive 24) multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/DataTypes.scala:156 — MsgDecoder.decode0 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 3 (7 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 · EventSourcedProducerQueue.onCommand (cognitive 24) · ×1
  • EventSourcedProducerQueue.onCommand (cognitive 24) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/delivery/EventSourcedProducerQueue.scala:237 — EventSourcedProducerQueue.onCommand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (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 · ReplayingEvents.onJournalResponse (cognitive 24) · ×1
  • ReplayingEvents.onJournalResponse (cognitive 24) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/ReplayingEvents.scala:131 — ReplayingEvents.onJournalResponse has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 6 (8 pts), error handling 3 (4 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 · TopHeavyHitters.fixHeap (cognitive 24) · ×1
  • TopHeavyHitters.fixHeap (cognitive 24) remote/src/main/scala/org/apache/pekko/remote/artery/compress/TopHeavyHitters.scala:275 — TopHeavyHitters.fixHeap has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (24 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 · IslandTracking.wireIn (cognitive 24) · ×1
  • IslandTracking.wireIn (cognitive 24) stream/src/main/scala/org/apache/pekko/stream/impl/PhasedFusingActorMaterializer.scala:275 — IslandTracking.wireIn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (23 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 · TraversalBuilder.getSingleSource (cognitive 24) · ×1
  • TraversalBuilder.getSingleSource (cognitive 24) stream/src/main/scala/org/apache/pekko/stream/impl/TraversalBuilder.scala:359 — TraversalBuilder.getSingleSource has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 8 (11 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 · BroadcastHub.createLogicAndMaterializedValue (cognitive 24) · ×1
  • BroadcastHub.createLogicAndMaterializedValue (cognitive 24) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:879 — BroadcastHub.createLogicAndMaterializedValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 4 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StashBufferImpl.interpretUnstashedMessages (cognitive 23) · ×1
  • StashBufferImpl.interpretUnstashedMessages (cognitive 23) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala:192 — StashBufferImpl.interpretUnstashedMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · Mailboxes.lookupConfigurator (cognitive 23) · ×1
  • Mailboxes.lookupConfigurator (cognitive 23) actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala:214 — Mailboxes.lookupConfigurator has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 7 (11 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LineNumbers.readMethod (cognitive 23) · ×1
  • LineNumbers.readMethod (cognitive 23) actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:340 — LineNumbers.readMethod has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventsByPersistenceIdStage.createLogic (cognitive 23) · ×1
  • EventsByPersistenceIdStage.createLogic (cognitive 23) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala:64 — EventsByPersistenceIdStage.createLogic has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, 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 · Firehose.detectSlowConsumers (cognitive 23) · ×1
  • Firehose.detectSlowConsumers (cognitive 23) persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:260 — Firehose.detectSlowConsumers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), 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.
D2 · Cognitive Complexity · EndpointWriter.sendBufferedMessages (cognitive 23) · ×1
  • EndpointWriter.sendBufferedMessages (cognitive 23) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:845 — EndpointWriter.sendBufferedMessages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, 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 · Slf4jLogger.receive (cognitive 23) · ×1
  • Slf4jLogger.receive (cognitive 23) slf4j/src/main/scala/org/apache/pekko/event/slf4j/Slf4jLogger.scala:92 — Slf4jLogger.receive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 3 (5 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 · TLSActor.doOutbound (cognitive 23) · ×1
  • TLSActor.doOutbound (cognitive 23) stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:375 — TLSActor.doOutbound has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, error handling 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 · TestEventListener.receive (cognitive 23) · ×1
  • TestEventListener.receive (cognitive 23) testkit/src/main/scala/org/apache/pekko/testkit/TestEventListener.scala:562 — TestEventListener.receive has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TopicImpl.onMessage (cognitive 22) · ×1
  • TopicImpl.onMessage (cognitive 22) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/pubsub/TopicImpl.scala:90 — TopicImpl.onMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (21 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 · LoggingBus.startDefaultLoggers (cognitive 22) · ×1
  • LoggingBus.startDefaultLoggers (cognitive 22) actor/src/main/scala/org/apache/pekko/event/Logging.scala:127 — LoggingBus.startDefaultLoggers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 3 (4 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActorPathValidationBenchmark.charAtLoop (cognitive 22) · ×1
  • ActorPathValidationBenchmark.charAtLoop (cognitive 22) bench-jmh/src/main/scala/org/apache/pekko/actor/ActorPathValidationBenchmark.scala:106 — ActorPathValidationBenchmark.charAtLoop has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (9 pts), match/switch 1 (3 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ReplicatorBehavior.apply (cognitive 22) · ×1
  • ReplicatorBehavior.apply (cognitive 22) cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/internal/ReplicatorBehavior.scala:46 — ReplicatorBehavior.apply has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 11 (18 pts), if/else 4 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ClusterCoreDaemon.leaderActions (cognitive 22) · ×1
  • ClusterCoreDaemon.leaderActions (cognitive 22) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:1369 — ClusterCoreDaemon.leaderActions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (4 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 · GossipTargetSelector.randomNodesForFullGossip (cognitive 22) · ×1
  • GossipTargetSelector.randomNodesForFullGossip (cognitive 22) cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala:260 — GossipTargetSelector.randomNodesForFullGossip has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 4 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · StoringSnapshot.onSaveSnapshotResponse (cognitive 22) · ×1
  • StoringSnapshot.onSaveSnapshotResponse (cognitive 22) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:918 — StoringSnapshot.onSaveSnapshotResponse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 3 (5 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 · DefaultMessageDispatcher.dispatch (cognitive 22) · ×1
  • DefaultMessageDispatcher.dispatch (cognitive 22) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:85 — DefaultMessageDispatcher.dispatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, match/switch 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 · Association.quarantine (cognitive 22) · ×1
  • Association.quarantine (cognitive 22) remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:554 — Association.quarantine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · QueueSink.createLogicAndMaterializedValue (cognitive 22) · ×1
  • QueueSink.createLogicAndMaterializedValue (cognitive 22) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:299 — QueueSink.createLogicAndMaterializedValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 5, match/switch 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MergeSequence.createLogic (cognitive 22) · ×1
  • MergeSequence.createLogic (cognitive 22) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:1602 — MergeSequence.createLogic has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6 (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 · BroadcastSinkLogic.onEvent (cognitive 22) · ×1
  • BroadcastSinkLogic.onEvent (cognitive 22) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:634 — BroadcastSinkLogic.onEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (3 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 · VirtualPathContainer.! (cognitive 21) · ×1
  • VirtualPathContainer.! (cognitive 21) actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:748 — VirtualPathContainer.! has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (6 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 · ActorSystemImpl.printTree (cognitive 21) · ×1
  • ActorSystemImpl.printTree (cognitive 21) actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala:1295 — ActorSystemImpl.printTree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 4 (7 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MessageDispatcher.printActors (cognitive 21) · ×1
  • MessageDispatcher.printActors (cognitive 21) actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala:119 — MessageDispatcher.printActors has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (8 pts), loops 2 (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 · ConsistentHashingRoutingLogic.select (cognitive 21) · ×1
  • ConsistentHashingRoutingLogic.select (cognitive 21) actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala:205 — ConsistentHashingRoutingLogic.select has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (5 pts), error handling 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 · ByteString.lastIndexOfSlice (cognitive 21) · ×1
  • ByteString.lastIndexOfSlice (cognitive 21) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2522 — ByteString.lastIndexOfSlice has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 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 · ClusterShardingHealthCheck.apply (cognitive 21) · ×1
  • ClusterShardingHealthCheck.apply (cognitive 21) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala:90 — ClusterShardingHealthCheck.apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (5 pts), boolean chains 4 (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 · GossipTargetSelector.multiDcGossipTargets (cognitive 21) · ×1
  • GossipTargetSelector.multiDcGossipTargets (cognitive 21) cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala:330 — GossipTargetSelector.multiDcGossipTargets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (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 · Replicator.receiveFlushChanges (cognitive 21) · ×1
  • Replicator.receiveFlushChanges (cognitive 21) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:2027 — Replicator.receiveFlushChanges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteSystemDaemon.! (cognitive 21) · ×1
  • RemoteSystemDaemon.! (cognitive 21) remote/src/main/scala/org/apache/pekko/remote/RemoteDaemon.scala:169 — RemoteSystemDaemon.! has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 5 (10 pts), error handling 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 · InboundQuarantineCheck.createLogic (cognitive 21) · ×1
  • InboundQuarantineCheck.createLogic (cognitive 21) remote/src/main/scala/org/apache/pekko/remote/artery/InboundQuarantineCheck.scala:37 — InboundQuarantineCheck.createLogic has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, match/switch 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SystemMessageAcker.createLogic (cognitive 21) · ×1
  • SystemMessageAcker.createLogic (cognitive 21) remote/src/main/scala/org/apache/pekko/remote/artery/SystemMessageDelivery.scala:351 — SystemMessageAcker.createLogic has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (4 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · VirtualProcessor.onComplete (cognitive 21) · ×1
  • VirtualProcessor.onComplete (cognitive 21) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:299 — VirtualProcessor.onComplete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 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.
D2 · Cognitive Complexity · Buffer.createLogic (cognitive 21) · ×1
  • Buffer.createLogic (cognitive 21) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:954 — Buffer.createLogic has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (20 pts), 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 · RecoverWith.createLogic (cognitive 21) · ×1
  • RecoverWith.createLogic (cognitive 21) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2362 — RecoverWith.createLogic has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 6, boolean chains 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Interleave.createLogic (cognitive 21) · ×1
  • Interleave.createLogic (cognitive 21) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Graph.scala:482 — Interleave.createLogic has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 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 · AsyncDnsResolver.receive (cognitive 20) · ×1
  • AsyncDnsResolver.receive (cognitive 20) actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala:98 — AsyncDnsResolver.receive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (9 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HashCode.hashArray (cognitive 20) · ×1
  • HashCode.hashArray (cognitive 20) actor/src/main/scala/org/apache/pekko/util/HashCode.scala:63 — HashCode.hashArray has cognitive complexity 20 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 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.
D2 · Cognitive Complexity · Reachability.change (cognitive 20) · ×1
  • Reachability.change (cognitive 20) cluster/src/main/scala/org/apache/pekko/cluster/Reachability.scala:132 — Reachability.change has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, match/switch 2 (3 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 · TypedEventsByPersistenceIdStage.createLogic (cognitive 20) · ×1
  • TypedEventsByPersistenceIdStage.createLogic (cognitive 20) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/TypedEventsByPersistenceIdStage.scala:45 — TypedEventsByPersistenceIdStage.createLogic has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HandlingCommands.onPublishedEvent (cognitive 20) · ×1
  • HandlingCommands.onPublishedEvent (cognitive 20) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:395 — HandlingCommands.onPublishedEvent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 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 · LeveldbRecovery.replayMessages (cognitive 20) · ×1
  • LeveldbRecovery.replayMessages (cognitive 20) persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbRecovery.scala:47 — LeveldbRecovery.replayMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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 · VirtualProcessor.subscribe (cognitive 20) · ×1
  • VirtualProcessor.subscribe (cognitive 20) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:138 — VirtualProcessor.subscribe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 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 · TcpStreamLogic.connected (cognitive 20) · ×1
  • TcpStreamLogic.connected (cognitive 20) stream/src/main/scala/org/apache/pekko/stream/impl/io/TcpStages.scala:354 — TcpStreamLogic.connected has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, match/switch 1 (nesting depth added 5). 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 · EmptyLocalActorRef.specialHandle (cognitive 19) · ×1
  • EmptyLocalActorRef.specialHandle (cognitive 19) actor/src/main/scala/org/apache/pekko/actor/ActorRef.scala:665 — EmptyLocalActorRef.specialHandle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (6 pts), boolean chains 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.
D2 · Cognitive Complexity · State.callThrough (cognitive 19) · ×1
  • State.callThrough (cognitive 19) actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala:804 — State.callThrough has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (4 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ByteString2.indexOf (cognitive 19) · ×1
  • ByteString2.indexOf (cognitive 19) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1287 — ByteString2.indexOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (19 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrequencySketchUtil.debugString (cognitive 19) · ×1
  • FrequencySketchUtil.debugString (cognitive 19) actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala:395 — FrequencySketchUtil.debugString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (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 · ShardRegion.receiveCommand (cognitive 19) · ×1
  • ShardRegion.receiveCommand (cognitive 19) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:907 — ShardRegion.receiveCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), 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.
D2 · Cognitive Complexity · EventSourcedRememberEntitiesShardStore.receiveCommand (cognitive 19) · ×1
  • EventSourcedRememberEntitiesShardStore.receiveCommand (cognitive 19) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala:102 — EventSourcedRememberEntitiesShardStore.receiveCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SharedMediaDriverSupport.startMediaDriver (cognitive 19) · ×1
  • SharedMediaDriverSupport.startMediaDriver (cognitive 19) cluster/src/multi-jvm/scala/org/apache/pekko/cluster/SharedMediaDriverSupport.scala:45 — SharedMediaDriverSupport.startMediaDriver has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (5 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 · EventsByTagStage.createLogic (cognitive 19) · ×1
  • EventsByTagStage.createLogic (cognitive 19) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala:65 — EventsByTagStage.createLogic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, 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 · Firehose.logUpdateConsumerTracking (cognitive 19) · ×1
  • Firehose.logUpdateConsumerTracking (cognitive 19) persistence-query/src/main/scala/org/apache/pekko/persistence/query/typed/internal/EventsBySliceFirehose.scala:224 — Firehose.logUpdateConsumerTracking has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 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 · SharedLeveldbStore.receive (cognitive 19) · ×1
  • SharedLeveldbStore.receive (cognitive 19) persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/SharedLeveldbStore.scala:46 — SharedLeveldbStore.receive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (6 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EndpointWriter.writeSend (cognitive 19) · ×1
  • EndpointWriter.writeSend (cognitive 19) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:965 — EndpointWriter.writeSend has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 5, match/switch 2 (4 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 · IterableConcat.createLogic (cognitive 19) · ×1
  • IterableConcat.createLogic (cognitive 19) stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala:44 — IterableConcat.createLogic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (3 pts), 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.
D2 · Cognitive Complexity · BroadcastSinkLogic.postStop (cognitive 19) · ×1
  • BroadcastSinkLogic.postStop (cognitive 19) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:813 — BroadcastSinkLogic.postStop has cognitive complexity 19 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 4 (6 pts), loops 2 (4 pts), match/switch 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoordinatedShutdownTerminationWatcher.receive (cognitive 18) · ×1
  • CoordinatedShutdownTerminationWatcher.receive (cognitive 18) actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala:920 — CoordinatedShutdownTerminationWatcher.receive has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), match/switch 2 (4 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Children.makeChild (cognitive 18) · ×1
  • Children.makeChild (cognitive 18) actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala:279 — Children.makeChild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 3 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShardRegion.receiveTerminated (cognitive 18) · ×1
  • ShardRegion.receiveTerminated (cognitive 18) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:997 — ShardRegion.receiveTerminated has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 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 · ClusterCoreDaemon.reapUnreachableMembers (cognitive 18) · ×1
  • ClusterCoreDaemon.reapUnreachableMembers (cognitive 18) cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala:1634 — ClusterCoreDaemon.reapUnreachableMembers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). 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 · LmdbDurableStore.init (cognitive 18) · ×1
  • LmdbDurableStore.init (cognitive 18) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/DurableStore.scala:218 — LmdbDurableStore.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (3 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.
D2 · Cognitive Complexity · ReliableDeliverySupervisor.gated (cognitive 18) · ×1
  • ReliableDeliverySupervisor.gated (cognitive 18) remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:418 — ReliableDeliverySupervisor.gated has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LruBoundedCache.getOrCompute (cognitive 18) · ×1
  • LruBoundedCache.getOrCompute (cognitive 18) remote/src/main/scala/org/apache/pekko/remote/artery/LruBoundedCache.scala:88 — LruBoundedCache.getOrCompute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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 · InboundTestStage.createLogic (cognitive 18) · ×1
  • InboundTestStage.createLogic (cognitive 18) remote/src/main/scala/org/apache/pekko/remote/artery/TestStage.scala:163 — InboundTestStage.createLogic has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (7 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 · EagerFutureSink.createLogicAndMaterializedValue (cognitive 18) · ×1
  • EagerFutureSink.createLogicAndMaterializedValue (cognitive 18) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:663 — EagerFutureSink.createLogicAndMaterializedValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 3, error handling 2, 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 · Switch.createLogic (cognitive 18) · ×1
  • Switch.createLogic (cognitive 18) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Switch.scala:49 — Switch.createLogic has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LengthFieldFramingStage.createLogic (cognitive 18) · ×1
  • LengthFieldFramingStage.createLogic (cognitive 18) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Framing.scala:399 — LengthFieldFramingStage.createLogic has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PartitionHub.createLogicAndMaterializedValue (cognitive 18) · ×1
  • PartitionHub.createLogicAndMaterializedValue (cognitive 18) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1492 — PartitionHub.createLogicAndMaterializedValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (5 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 · AddressFromURIString.unapply (cognitive 17) · ×1
  • AddressFromURIString.unapply (cognitive 17) actor/src/main/scala/org/apache/pekko/actor/Address.scala:191 — AddressFromURIString.unapply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3 (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 · Mailbox.processAllSystemMessages (cognitive 17) · ×1
  • Mailbox.processAllSystemMessages (cognitive 17) actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:303 — Mailbox.processAllSystemMessages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (4 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · WithUdpSend.sendHandlers (cognitive 17) · ×1
  • WithUdpSend.sendHandlers (cognitive 17) actor/src/main/scala/org/apache/pekko/io/WithUdpSend.scala:46 — WithUdpSend.sendHandlers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 1 (4 pts), match/switch 2 (4 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ConsistentHash.apply (cognitive 17) · ×1
  • ConsistentHash.apply (cognitive 17) actor/src/main/scala/org/apache/pekko/routing/ConsistentHash.scala:134 — ConsistentHash.apply has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 4 (7 pts), boolean chains 1 (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 · DefaultOptimalSizeExploringResizer.updatedStats (cognitive 17) · ×1
  • DefaultOptimalSizeExploringResizer.updatedStats (cognitive 17) actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala:211 — DefaultOptimalSizeExploringResizer.updatedStats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2 (3 pts), 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 · ClusterDeployer.parseConfig (cognitive 17) · ×1
  • ClusterDeployer.parseConfig (cognitive 17) cluster/src/main/scala/org/apache/pekko/cluster/ClusterActorRefProvider.scala:98 — ClusterDeployer.parseConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 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 · Reachability.merge (cognitive 17) · ×1
  • Reachability.merge (cognitive 17) cluster/src/main/scala/org/apache/pekko/cluster/Reachability.scala:171 — Reachability.merge has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 5 (8 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 · Eventsourced.recoveryStarted (cognitive 17) · ×1
  • Eventsourced.recoveryStarted (cognitive 17) persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala:635 — Eventsourced.recoveryStarted has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 4 (6 pts), match/switch 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteInstruments.deserializeRaw (cognitive 17) · ×1
  • RemoteInstruments.deserializeRaw (cognitive 17) remote/src/main/scala/org/apache/pekko/remote/artery/RemoteInstrument.scala:291 — RemoteInstruments.deserializeRaw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (5 pts), loops 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 · InboundCompression.runNextTableAdvertisement (cognitive 17) · ×1
  • InboundCompression.runNextTableAdvertisement (cognitive 17) remote/src/main/scala/org/apache/pekko/remote/artery/compress/InboundCompressions.scala:523 — InboundCompression.runNextTableAdvertisement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 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 · ActorRefBackpressureSinkStage.createLogic (cognitive 17) · ×1
  • ActorRefBackpressureSinkStage.createLogic (cognitive 17) stream/src/main/scala/org/apache/pekko/stream/impl/ActorRefBackpressureSinkStage.scala:41 — ActorRefBackpressureSinkStage.createLogic has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LazySink.createLogicAndMaterializedValue (cognitive 17) · ×1
  • LazySink.createLogicAndMaterializedValue (cognitive 17) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:518 — LazySink.createLogicAndMaterializedValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), boolean chains 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 · ZstdDecompressor.createLogic (cognitive 17) · ×1
  • ZstdDecompressor.createLogic (cognitive 17) stream/src/main/scala/org/apache/pekko/stream/impl/io/compression/ZstdDecompressor.scala:80 — ZstdDecompressor.createLogic has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, error handling 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 · Flow.viaMat (cognitive 17) · ×1
  • Flow.viaMat (cognitive 17) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:85 — Flow.viaMat has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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 · LazyDispatch.drain (cognitive 17) · ×1
  • LazyDispatch.drain (cognitive 17) stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:425 — LazyDispatch.drain has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ByteArrayIterator.++ (cognitive 16) · ×1
  • ByteArrayIterator.++ (cognitive 16) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:61 — ByteArrayIterator.++ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AbstractProps.checkCreatorClosingOver (cognitive 16) · ×1
  • AbstractProps.checkCreatorClosingOver (cognitive 16) actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala:58 — AbstractProps.checkCreatorClosingOver has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3 (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 · TaskDefinition.apply (cognitive 16) · ×1
  • TaskDefinition.apply (cognitive 16) actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala:410 — TaskDefinition.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), match/switch 5 (6 pts), error handling 2 (4 pts) (nesting depth added 5). 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 · FaultHandling.faultRecreate (cognitive 16) · ×1
  • FaultHandling.faultRecreate (cognitive 16) actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala:92 — FaultHandling.faultRecreate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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 · CachingConfig.getPathEntry (cognitive 16) · ×1
  • CachingConfig.getPathEntry (cognitive 16) actor/src/main/scala/org/apache/pekko/dispatch/CachingConfig.scala:61 — CachingConfig.getPathEntry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 4 (8 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DomainName.parse (cognitive 16) · ×1
  • DomainName.parse (cognitive 16) actor/src/main/scala/org/apache/pekko/io/dns/internal/DomainName.scala:49 — DomainName.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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.
D2 · Cognitive Complexity · ByteString.indexOfSlice (cognitive 16) · ×1
  • ByteString.indexOfSlice (cognitive 16) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2419 — ByteString.indexOfSlice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LineNumbers.readAttributes (cognitive 16) · ×1
  • LineNumbers.readAttributes (cognitive 16) actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:381 — LineNumbers.readAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Reflect.findMarker (cognitive 16) · ×1
  • Reflect.findMarker (cognitive 16) actor/src/main/scala/org/apache/pekko/util/Reflect.scala:189 — Reflect.findMarker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (4 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 · PersistentShardCoordinator.receiveRecover (cognitive 16) · ×1
  • PersistentShardCoordinator.receiveRecover (cognitive 16) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1457 — PersistentShardCoordinator.receiveRecover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (3 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 · PayloadSizeAggregator.updatePayloadSize (cognitive 16) · ×1
  • PayloadSizeAggregator.updatePayloadSize (cognitive 16) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PayloadSizeAggregator.scala:33 — PayloadSizeAggregator.updatePayloadSize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Replicator.receiveDelete (cognitive 16) · ×1
  • Replicator.receiveDelete (cognitive 16) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:1852 — Replicator.receiveDelete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Replicator.receiveGossip (cognitive 16) · ×1
  • Replicator.receiveGossip (cognitive 16) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala:2311 — Replicator.receiveGossip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventsByPersistenceIdStage.createLogic (cognitive 16) · ×1
  • EventsByPersistenceIdStage.createLogic (cognitive 16) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByPersistenceIdStage.scala:37 — EventsByPersistenceIdStage.createLogic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (6 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 · Running.startReplicationStream (cognitive 16) · ×1
  • Running.startReplicationStream (cognitive 16) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:137 — Running.startReplicationStream has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (6 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 · InboundHandshake.createLogic (cognitive 16) · ×1
  • InboundHandshake.createLogic (cognitive 16) remote/src/main/scala/org/apache/pekko/remote/artery/Handshake.scala:238 — InboundHandshake.createLogic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 3 (5 pts), boolean chains 1 (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 · ArteryAeronUdpTransport.startAeron (cognitive 16) · ×1
  • ArteryAeronUdpTransport.startAeron (cognitive 16) remote/src/main/scala/org/apache/pekko/remote/artery/aeron/ArteryAeronUdpTransport.scala:184 — ArteryAeronUdpTransport.startAeron has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), 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.
D2 · Cognitive Complexity · ResizableMultiReaderRingBuffer.updateReadIx (cognitive 16) · ×1
  • ResizableMultiReaderRingBuffer.updateReadIx (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/ResizableMultiReaderRingBuffer.scala:144 — ResizableMultiReaderRingBuffer.updateReadIx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (2 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 · WrappedSubscription.request (cognitive 16) · ×1
  • WrappedSubscription.request (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/StreamLayout.scala:412 — WrappedSubscription.request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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 · FutureFlow.createLogicAndMaterializedValue (cognitive 16) · ×1
  • FutureFlow.createLogicAndMaterializedValue (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/FutureFlow.scala:48 — FutureFlow.createLogicAndMaterializedValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4, error handling 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 · GraphInterpreter.processEvent (cognitive 16) · ×1
  • GraphInterpreter.processEvent (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:645 — GraphInterpreter.processEvent 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 · IteratorSource.createLogic (cognitive 16) · ×1
  • IteratorSource.createLogic (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IteratorSource.scala:41 — IteratorSource.createLogic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (3 pts), 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.
D2 · Cognitive Complexity · MapConcat.createLogic (cognitive 16) · ×1
  • MapConcat.createLogic (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/MapConcat.scala:45 — MapConcat.createLogic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputStreamAdapter.read (cognitive 16) · ×1
  • InputStreamAdapter.read (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/impl/io/InputStreamSinkStage.scala:157 — InputStreamAdapter.read has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (7 pts), if/else 4 (5 pts), error handling 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 · MergeHub.createLogicAndMaterializedValue (cognitive 16) · ×1
  • MergeHub.createLogicAndMaterializedValue (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:367 — MergeHub.createLogicAndMaterializedValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 2, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · RestartWithBackoffLogic.logIt (cognitive 16) · ×1
  • RestartWithBackoffLogic.logIt (cognitive 16) stream/src/main/scala/org/apache/pekko/stream/scaladsl/RestartFlow.scala:227 — RestartWithBackoffLogic.logIt has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 5 (7 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: MiscMessageSerializer remote/src/main/scala/org/apache/pekko/remote/serialization/MiscMessageSerializer.scala:43 — ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (26 shared lines) · ×1
  • Near-duplicate member pair (26 shared lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:880 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:880-992 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1493-1574 — These two members are variants of one another: 26 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 (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:150 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:150-163 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:160-173 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala:151-164 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:153-166 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:161-174 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (61 corresponding lines) · ×1
  • Edited copy of a member (61 corresponding lines) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:201 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:201-261 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:168-228 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:326 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:326-399 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:402-486 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (103 corresponding lines) · ×1
  • Edited copy of a member (103 corresponding lines) persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala:65 — persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala:65-171 | persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala:66-168 — These two members are one piece of code written twice and then edited apart: 103 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1646 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1646-1721 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1767-1842 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala:69 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/FlowWithContext.scala:69-110 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/SourceWithContext.scala:57-98 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 48+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 48+ corresponding lines) cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:126 — cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:126-173 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:192-242 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:150-197 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 48 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:93 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonObjectMapperProvider.scala:93-166 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:86-153 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (69 corresponding lines) · ×1
  • Edited copy of a member (69 corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:166 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/WorkPullingProducerControllerImpl.scala:166-234 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/internal/ShardingProducerControllerImpl.scala:152-239 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:73 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsBySliceStage.scala:73-131 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/query/internal/EventsByTagStage.scala:70-126 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:296 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:296-346 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:131-181 — 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 (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:737 — remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:737-790 | remote/src/main/scala/org/apache/pekko/remote/artery/Codecs.scala:805-856 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala:62 — cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala:62-106 | cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala:145-199 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) actor/src/main/scala/org/apache/pekko/actor/FSM.scala:816 — actor/src/main/scala/org/apache/pekko/actor/FSM.scala:816-855 | persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala:517-556 — 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 (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:813 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:813-852 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala:1446-1477 — 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 copies of one member (4 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 25+ corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:386 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:386-410 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:398-422 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:384-408 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:398-422 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala:61 — bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala:61-86 | bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala:90-115 | bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala:119-147 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala:85 — bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala:85-109 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CollectFirst.scala:43-76 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:240-271 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:783 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:783-799 | stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala:839-860 — 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 (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala:54 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedSettings.scala:54-84 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateSettings.scala:57-91 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 27+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:196 — stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:196-222 | stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:242-273 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/CountSink.scala:38-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala:102 — stream-typed/src/main/scala/org/apache/pekko/stream/typed/javadsl/ActorSource.scala:102-120 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:478-491 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:511-525 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1689 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1689-1708 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2027-2049 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:2051-2075 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:153 — remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:153-171 | remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala:160-181 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:68 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:68-87 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:155-181 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 11+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3473 — stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3473-3483 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3522-3532 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3769-3780 | stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3980-3990 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) bench-jmh/src/main/scala/org/apache/pekko/stream/AsyncBoundaryThroughputBenchmark.scala:96 — bench-jmh/src/main/scala/org/apache/pekko/stream/AsyncBoundaryThroughputBenchmark.scala:96-122 | bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala:66-88 | bench-jmh/src/main/scala/org/apache/pekko/stream/RangeSourceBenchmark.scala:42-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) actor/src/main/scala/org/apache/pekko/event/Logging.scala:1119 — actor/src/main/scala/org/apache/pekko/event/Logging.scala:1119-1133 | actor/src/main/scala/org/apache/pekko/event/Logging.scala:1135-1149 | actor/src/main/scala/org/apache/pekko/event/Logging.scala:1151-1165 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 9+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3585 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3585-3593 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:3668-3676 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:1714-1722 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:1796-1804 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2446-2454 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2505-2513 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2411-2419 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2471-2479 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala:103 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala:103-109 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala:174-180 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala:245-251 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala:316-322 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala:387-393 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala:64 — stream/src/main/scala/org/apache/pekko/stream/impl/ActorPublisher.scala:64-79 | stream/src/main/scala/org/apache/pekko/stream/impl/FanoutPublisherBridgeStage.scala:199-210 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala:376-392 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorRefModule.scala:70 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ActorRefModule.scala:70-76 | serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/TypedActorRefModule.scala:70-76 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ActorRefModule.scala:70-76 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/TypedActorRefModule.scala:70-76 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 1+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 1+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2762 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2762-2762 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2071-2071 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2036-2036 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 2+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2159 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2159-2160 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:2680-2681 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:2646-2647 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 2+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 2+ corresponding lines) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2196 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:2196-2197 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:2480-2481 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:1497-1498 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:1464-1465 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (81 lines × 2) · ×1
  • Duplicated block (81 lines × 2) serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:391 — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:391-471 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala:392-472 — before extracting anything, compare `serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala` and `serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1671 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1671-1721 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1792-1842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1671` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:303 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:303-346 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala:138-181 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala` as WHOLE FILES: this scan already matched 8 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. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:303` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38 lines × 3) · ×1
  • Duplicated block (38 lines × 3) cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:132 — cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:132-169 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala:201-238 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/VersionVector.scala:156-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `cluster/src/main/scala/org/apache/pekko/cluster/VectorClock.scala:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `nt1` to `(Node, Long)` in one and `(UniqueAddress, Long)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:224 — distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:224-261 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala:191-228 — before extracting anything, compare `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/crdt/ORSet.scala` as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at `distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala:224` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:344 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:344-374 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:423-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala:115 — stream/src/main/scala/org/apache/pekko/stream/MapAsyncPartitioned.scala:115-137 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1376-1398 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:1528-1550 — 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:456 — stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:456-475 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:507-525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphStages.scala:456` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:108 — serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:108-126 | serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonObjectMapperProvider.scala:180-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:199 — persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:199-216 | persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:288-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/internal/PersistenceProbeImpl.scala:199` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala:111 — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala:111-126 | cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala:146-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesCoordinatorStore.scala:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:146 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:146-159 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala:103-119 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/DurableStateBehaviorImpl.scala` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventSourcedBehaviorImpl.scala:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala:78 — stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala:78-89 | stream/src/main/scala/org/apache/pekko/stream/impl/fusing/IteratorSource.scala:52-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. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/IterableConcat.scala:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:208 — stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:208-220 | stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:257-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/impl/Sinks.scala:208` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:152 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:152-163 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:162-173 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/EventHandler.scala:153-164 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:155-166 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:163-174 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1893 — actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1893-1904 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1919-1930 | actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1945-1956 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala/org/apache/pekko/util/ByteString.scala:1893` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:148 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:148-156 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:182-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/internal/ProducerControllerImpl.scala:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:210 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:210-214 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala:221-225 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala:212-216 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala:221-225 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4640 — stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4640-4645 | stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala:5143-5148 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala:3200-3205 | stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala:3165-3170 — before extracting anything, compare `stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala` and `stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala:4640` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:624 — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:624-627 | actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:634-638 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:620-623 | actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala:630-634 — before extracting anything, compare `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala` and `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:624` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (171 lines × 2) · ×1
  • Duplicated block (171 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/SystemMessage.scala:31 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/SystemMessage.scala:31-201 | actor/src/main/scala/org/apache/pekko/dispatch/sysmsg/SystemMessage.scala:35-209 — before extracting anything, compare `actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/SystemMessage.scala` and `actor/src/main/scala/org/apache/pekko/dispatch/sysmsg/SystemMessage.scala` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/SystemMessage.scala:31` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (157 lines × 2) · ×1
  • Duplicated block (157 lines × 2) actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/TimerScheduler.scala:89 — actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/TimerScheduler.scala:89-245 | actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/TimerScheduler.scala:89-245 — `actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/TimerScheduler.scala` and `actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/TimerScheduler.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 157 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.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala:26 — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala:26-82 | persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/SignalHandler.scala:26-82 — before extracting anything, compare `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala` and `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/SignalHandler.scala` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/SignalHandler.scala:26` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:422 — actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:422-428 | actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala:456-462 | bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala:61-67 | bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala:75-81 — 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.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala:50 — bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala:50-99 | bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala:54-103 — before extracting anything, compare `bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala` and `bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala:78 — cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala:78-84 | cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:635-641 | cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:90-96 | cluster/src/main/scala/org/apache/pekko/cluster/protobuf/ClusterMessageSerializer.scala:129-135 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/SerializationSupport.scala:67-73 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:332 — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/protobuf/ClusterShardingMessageSerializer.scala:332-337 | cluster-tools/src/main/scala/org/apache/pekko/cluster/client/protobuf/ClusterClientMessageSerializer.scala:81-86 | cluster-tools/src/main/scala/org/apache/pekko/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala:83-88 | cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/protobuf/ClusterSingletonMessageSerializer.scala:76-81 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatedDataSerializer.scala:411-416 | distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializer.scala:266-271 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times.
X15 · Unvalidated length from an untrusted reader · Length read from the parsed input is spent without ever being bounded · ×1
  • Length read from the parsed input is spent without ever being bounded actor/src/main/scala/org/apache/pekko/util/ByteString.scala:174 — `length` is read from the bytes being parsed at line 173 (`readInt`), then used to size a `new Array[Byte]` at line 174 — and nowhere in its scope is `length` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `length` against the bytes actually remaining and a maximum the format allows before allocating.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the function that made it · ×1
  • Disposable created and abandoned in the function that made it bench-jmh/src/main/scala/org/apache/pekko/stream/io/FileSourcesBenchmark.scala:73 — `scala.io.Source.fromFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.getLines` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(scala.io.Source.fromFile(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Minor — 465 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×382
  • Orphaned file remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala: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 actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala: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 cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala: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 persistence-testkit/src/main/scala/org/apache/pekko/persistence/testkit/javadsl/PersistenceTestKit.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala: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 persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/serialization/ReplicatedEventSourcingSerializer.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala: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 actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala: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 cluster/src/main/scala/org/apache/pekko/cluster/CrossDcClusterHeartbeat.scala: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 actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala: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 stream/src/main/scala/org/apache/pekko/stream/KillSwitch.scala: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 actor/src/main/scala/org/apache/pekko/event/EventBus.scala: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 distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala: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 remote/src/main/scala/org/apache/pekko/remote/RemoteWatcher.scala: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 actor/src/main/scala/org/apache/pekko/actor/dungeon/FaultHandling.scala: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 stream/src/main/scala/org/apache/pekko/stream/scaladsl/BidiFlow.scala: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 cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/scaladsl/Replicator.scala: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 cluster/src/main/scala/org/apache/pekko/cluster/Gossip.scala: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 testkit/src/main/scala/org/apache/pekko/testkit/CallingThreadDispatcher.scala: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 cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonProxy.scala: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 actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala: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.
  • + 357 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate actor/src/main/java/org/apache/pekko/japi/pf/FSMStateFunctionBuilder.java:187 — `dataType != null && !dataType.isInstance(e.stateData())` appears character-identically in 2 files — actor/src/main/java/org/apache/pekko/japi/pf/FSMStateFunctionBuilder.java, persistence/src/main/java/org/apache/pekko/persistence/fsm/japi/pf/FSMStateFunctionBuilder.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/StreamOperatorsIndexGenerator.scala:240 — `!file.exists || IO.read(file) != content` appears character-identically in 2 files — project/StreamOperatorsIndexGenerator.scala, project/VersionGenerator.scala. 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 persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala:444 — `!isEmpty(configPath) && mergedConfig.hasPath(configPath)` appears character-identically in 2 files — persistence/src/main/scala/org/apache/pekko/persistence/Persistence.scala, persistence/src/main/scala/org/apache/pekko/persistence/PersistencePlugin.scala. 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 stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:378 — `!isInboundClosed && closing.ignoreComplete` appears character-identically in 2 files — stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala, stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala. 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 stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala:349 — `!isOutboundClosed && closing.ignoreCancel` appears character-identically in 2 files — stream/src/main/scala/org/apache/pekko/stream/impl/io/TLSActor.scala, stream/src/main/scala/org/apache/pekko/stream/impl/io/TlsGraphStage.scala. 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 serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:92 — `"AbstractPointcutAdvisor".equals(name) || "AbstractApplicationContext".equals(name)` appears character-identically in 2 files — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala, serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala. 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 actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:203 — `(off < 0) || (len < 0) || (off + len > b.length)` appears character-identically in 2 files — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala, actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala. 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 actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala:378 — `(rest > 0) && !iterators.isEmpty && pos < xs.length` appears character-identically in 2 files — actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala, actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala. 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 remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:167 — `(role != pekko.stream.Client) && SSLRequireMutualAuthentication` appears character-identically in 2 files — remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala, remote/src/main/scala/org/apache/pekko/remote/transport/netty/SSLEngineProvider.scala. 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 actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala:383 — `0.0 <= randomFactor && randomFactor <= 1.0` appears character-identically in 3 files — actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala, actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala, actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala. 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 stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala:55 — `batchRemaining == 0 && !upstreamCompleted` appears character-identically in 2 files — stream/src/main/scala/org/apache/pekko/stream/impl/ActorProcessor.scala, stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala. 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 persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala:140 — `bufferSize < maxBufSize && (isCurrentQuery() || outstandingReplay)` appears character-identically in 2 files — persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByPersistenceIdStage.scala, persistence-query/src/main/scala/org/apache/pekko/persistence/query/journal/leveldb/EventsByTagStage.scala. 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 actor/src/main/scala/org/apache/pekko/routing/Resizer.scala:229 — `cell.mailbox.isScheduled && cell.currentMessage != null` appears character-identically in 2 files — actor/src/main/scala/org/apache/pekko/routing/Resizer.scala, actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala. 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 serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:497 — `className.length > 0 && className.charAt(className.length - 1) == '$'` appears character-identically in 2 files — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala, serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala. 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 serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:73 — `className.startsWith(prefixC3P0) && className.endsWith("DataSource")` appears character-identically in 2 files — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala, serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala. 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 cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala:674 — `cluster.isTerminated || cluster.selfMember.status == MemberStatus.Down` appears character-identically in 2 files — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala, cluster-tools/src/main/scala/org/apache/pekko/cluster/singleton/ClusterSingletonManager.scala. 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 serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:244 — `conf.getBoolean("verbose-debug-logging") && log.isDebugEnabled` appears character-identically in 2 files — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala, serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala. 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 persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:396 — `curr.statePredicate(state) && curr.commandPredicate(command)` appears character-identically in 4 files — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala. 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 actor/src/main/scala/org/apache/pekko/actor/FSM.scala:892 — `currentState.stateName != nextState.stateName || nextState.notifies` appears character-identically in 2 files — actor/src/main/scala/org/apache/pekko/actor/FSM.scala, persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala. 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 serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala:543 — `hasAllowedClassPrefix(clazz.getName) || isBoundToJacksonSerializer(clazz)` appears character-identically in 2 files — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializer.scala, serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/JacksonSerializer.scala. 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 persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala:394 — `idx < builtCases.length && effect.isEmpty` appears character-identically in 4 files — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandler.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/javadsl/CommandHandlerWithReply.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandler.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/javadsl/CommandHandlerWithReply.scala. 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 persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala:289 — `isInternalStashEmpty && !isUnstashAllInProgress` appears character-identically in 2 files — persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/Running.scala, persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/state/internal/Running.scala. 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 cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala:1550 — `lastSequenceNr % snapshotAfter == 0 && lastSequenceNr != 0` appears character-identically in 2 files — cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala, cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/internal/EventSourcedRememberEntitiesShardStore.scala. 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 serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala:52 — `level < Zstd.minCompressionLevel() || level > Zstd.maxCompressionLevel()` appears character-identically in 2 files — serialization-jackson/src/main/scala/org/apache/pekko/serialization/jackson/ZstdCompression.scala, serialization-jackson3/src/main/scala/org/apache/pekko/serialization/jackson3/ZstdCompression.scala. 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 actor/src/main/scala/org/apache/pekko/actor/FSM.scala:805 — `listeners.remove(actorRef) && watchedListeners.contains(actorRef)` appears character-identically in 2 files — actor/src/main/scala/org/apache/pekko/actor/FSM.scala, persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSMBase.scala. 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.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Blanket warning suppression · ×14
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala:53 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala:60 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala:68 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala:47 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala:151 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala:99 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala:546 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala:273 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression actor/src/main/scala/org/apache/pekko/util/ByteString.scala:260 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala:403 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression cluster-typed/src/main/scala/org/apache/pekko/cluster/ddata/typed/javadsl/ReplicatorMessageAdapter.scala:126 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression remote/src/main/scala/org/apache/pekko/remote/artery/ArteryTransport.scala:736 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression remote/src/main/scala/org/apache/pekko/remote/routing/RemoteRouterConfig.scala:55 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala:2316 — A bare `// scalastyle:off`, `// scalafix:off` or `@nowarn` (or Wartremover's `warts.All`) switches every rule or warning off — hidden debt. Suppress the specific rule on the specific line, with a justification, instead.
IC1 · Incompleteness & stubs · Disabled test · ×4
  • Disabled test distributed-data/src/test/scala/org/apache/pekko/cluster/ddata/protobuf/ReplicatorMessageSerializerSpec.scala:251 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test remote/src/test/scala/org/apache/pekko/remote/artery/RemoteActorSelectionSpec.scala:59 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test remote/src/test/scala/org/apache/pekko/remote/artery/RemoteMessageSerializationSpec.scala:77 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test remote/src/test/scala/org/apache/pekko/remote/artery/tcp/ssl/RotatingKeysSSLEngineProviderSpec.scala:56 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 91 significant file(s) lose their only recent owner: stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala, stream/src/main/scala/org/apache/pekko/stream/stage/GraphStage.scala, stream/src/main/scala/org/apache/pekko/stream/scaladsl/Hub.scala, stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala, stream/src/main/scala/org/apache/pekko/stream/impl/fusing/StreamOfStreams.scala, stream/src/main/scala/org/apache/pekko/stream/impl/fusing/ActorGraphInterpreter.scala, remote/src/main/scala/org/apache/pekko/remote/transport/PekkoProtocolTransport.scala, multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Conductor.scala (+83 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 36 significant file(s) lose their only recent owner: persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/internal/EventWriter.scala, remote/src/main/scala/org/apache/pekko/remote/RemoteActorRefProvider.scala, remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ArteryTcpTransport.scala, remote/src/main/scala/org/apache/pekko/remote/serialization/ArteryMessageSerializer.scala, stream/src/main/scala/org/apache/pekko/stream/Materializer.scala, remote/src/main/scala/org/apache/pekko/remote/serialization/DaemonMsgCreateSerializer.scala, cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/MetricsCollector.scala, actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala (+28 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: cluster/src/main/scala/org/apache/pekko/cluster/ClusterHeartbeat.scala, actor/src/main/scala/org/apache/pekko/util/Version.scala, coordination/src/main/scala/org/apache/pekko/coordination/lease/LeaseHealthCheck.scala. Pair on, review, or document these before any departure.
D31 · IaC & Container Security · Low IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×3
  • Diagnostic log message is built whether or not it is wanted remote/src/main/scala/org/apache/pekko/remote/Endpoint.scala:125 — `debug` at line 125 is called with an argument built by `sel.elements.mkString("…", "…", "…")` (line 129), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag.
  • Diagnostic log message is built whether or not it is wanted multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala:114 — `debug` at line 114 is called with an argument built by `name.mkString("…", "…", "…")` (line 114), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag.
  • Diagnostic log message is built whether or not it is wanted cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala:187 — `debug` at line 187 is called with an argument built by `currentShardAllocations.keys.mkString("…")` (line 191), whose cost grows with the collection it walks. Scala evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: the logger takes a built `String` (SLF4J, Akka/Pekko `LoggingAdapter`, `context.log`), and there is no `isDebugEnabled`/`isTraceEnabled` test and no debug flag.
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift CONTRIBUTING.md:358 — CONTRIBUTING.md links to `org.apache.pekko.stream.scaladsl.Flow`, but `org.apache.pekko.stream.scaladsl.Flow` 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 CONTRIBUTING.md:359 — CONTRIBUTING.md links to `org.apache.pekko.stream.javadsl.Flow`, but `org.apache.pekko.stream.javadsl.Flow` 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.
D21 · Naming Consistency · `skipID` spells `ID` where 886 names in the project spell it `Id` · ×1
  • `skipID` spells `ID` where 886 names in the project spell it `Id` actor/src/main/scala/org/apache/pekko/util/LineNumbers.scala:249 — 886 of 887 names in project repository spell the token `Id` (886 of 887; unit: names in project repository containing `Id`). Peers: TestProbeImpl.testActorId (actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala:84); org.apache.pekko.actor.typed.ExtensionId (actor-typed/src/main/scala/org/apache/pekko/actor/typed/Extensions.scala:118); Delivery.apply(producerId) (actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala:78); SequencedMessage.fromChunked(producerId) (actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala:149); ProducerController.apply(producerId) (actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala:257). Rename to `skipId`. [rule N6]
D21 · Naming Consistency · `initSslContext` spells `Ssl` where 37 names in the project spell it `SSL` · ×1
  • `initSslContext` spells `Ssl` where 37 names in the project spell it `SSL` bench-jmh/src/main/scala/org/apache/pekko/stream/io/TlsBenchmark.scala:198 — 37 of 38 names in project repository spell the token `SSL` (37 of 38; unit: names in project repository containing `SSL`). Peers: org.apache.pekko.remote.artery.tcp.ConfigSSLEngineProvider (remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:48); ConfigSSLEngineProvider.createServerSSLEngine (remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:143); ConfigSSLEngineProvider.createClientSSLEngine (remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:146); ConfigSSLEngineProvider.createSSLEngine (remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:149); ConfigSSLEngineProvider.createSSLEngine (remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ConfigSSLEngineProvider.scala:153). Rename to `initSSLContext`. [rule N6]
D21 · Naming Consistency · `allMembersInDC` spells `DC` where 113 names in the project spell it `Dc` · ×1
  • `allMembersInDC` spells `DC` where 113 names in the project spell it `Dc` cluster/src/main/scala/org/apache/pekko/cluster/sbr/DowningStrategy.scala:100 — 113 of 114 names in project repository spell the token `Dc` (113 of 114; unit: names in project repository containing `Dc`). Peers: org.apache.pekko.cluster.sharding.typed.MultiDcClusterShardingSpecConfig (cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala:33); org.apache.pekko.cluster.sharding.typed.MultiDcClusterShardingMultiJvmNode1 (cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala:59); org.apache.pekko.cluster.sharding.typed.MultiDcClusterShardingMultiJvmNode2 (cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala:60); org.apache.pekko.cluster.sharding.typed.MultiDcClusterShardingMultiJvmNode3 (cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala:61); org.apache.pekko.cluster.sharding.typed.MultiDcClusterShardingMultiJvmNode4 (cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala:62). Rename to `allMembersInDc`. [rule N6]
D21 · Naming Consistency · `PersistentFsmEvent` spells `Fsm` where 27 names in the project spell it `FSM` · ×1
  • `PersistentFsmEvent` spells `Fsm` where 27 names in the project spell it `FSM` persistence/src/main/scala/org/apache/pekko/persistence/fsm/PersistentFSM.scala:208 — 27 of 28 names in project repository spell the token `FSM` (27 of 28; unit: names in project repository containing `FSM`). Peers: org.apache.pekko.actor.AbstractFSM (actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala:26); org.apache.pekko.actor.AbstractFSM (actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala:44); org.apache.pekko.actor.AbstractLoggingFSM (actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala:529); org.apache.pekko.actor.AbstractFSMWithStash (actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala:536); org.apache.pekko.actor.LoggingFSM (actor/src/main/scala/org/apache/pekko/actor/FSM.scala:962). Rename to `PersistentFSMEvent`. [rule N6]
D21 · Naming Consistency · `setUID` spells `UID` where 83 names in the project spell it `Uid` · ×1
  • `setUID` spells `UID` where 83 names in the project spell it `Uid` remote/src/main/scala/org/apache/pekko/remote/artery/Association.scala:1184 — 83 of 84 names in project repository spell the token `Uid` (83 of 84; unit: names in project repository containing `Uid`). Peers: ActorCell.newUid (actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala:391); ActorCell.splitNameAndUid (actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala:399); ActorPath.withUid (actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala:298); RootActorPath.withUid (actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala:349); ChildActorPath.withUid (actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala:393). Rename to `setUid`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 382 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: remote/src/main/scala/org/apache/pekko/remote/transport/TestTransport.scala, actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala, cluster/src/main/scala/org/apache/pekko/cluster/MembershipState.scala, actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala, actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala, actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala, actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala, actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/package.scala (and 374 more) (403 orphaned of 926 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; 926 of the 1337 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
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:2 — 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 · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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.
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations bench-jmh/src/main/scala/org/apache/pekko/util/ArrayCopyOf_Benchmark.scala — A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X5 · Nullable reference types · Scala's null is not held to the type system everywhere · ×1
  • Scala's null is not held to the type system everywhere — No build over this repository's 1238 Scala product file(s) passes `-Yexplicit-nulls`, enables WartRemover's `Null` wart or runs Scalafix's `DisableSyntax.noNulls`, so every reference type admits null and nothing reports a `null` written into the code or returned from a Java API — the first one to reach a method call is a `NullPointerException`. `Option` by convention is a habit no tool here holds the code to.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-6c44d4222aee4dd89c3ab8465ccde947/history.json --exit-code 0 --source .3artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-6c44d4222aee4dd89c3ab8465ccde947/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude cluster/src/main/java --exclude cluster-metrics/src/main/java --exclude cluster-sharding/src/main/java --exclude cluster-sharding-typed/src/main/java/org/apache/pekko/cluster/sharding/typed/internal --exclude cluster-tools/src/main/java --exclude cluster-typed/src/main/java --exclude distributed-data/src/main/java --exclude docs/src/main/java/docs/ddata --exclude docs/src/main/java/docs/persistence/proto --exclude multi-node-testkit/src/main/java --exclude persistence/src/main/java/org/apache/pekko/persistence/serialization --exclude persistence-query/src/main/java/org/apache/pekko/persistence/query/internal --exclude persistence-typed/src/main/java/org/apache/pekko/persistence/typed/serialization --exclude remote/src/test/java/org/apache/pekko/remote/protobuf --exclude remote-tests/src/test/java .125artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-f2e8d12ea01f4313b47da4ae2ac415560artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .26artifacts/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. semgrep could not parse 5 file(s) — `actor/src/main/scala-3/org/apache/pekko/util/ByteIterator.scala`, `cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala`, `distributed-data/src/main/scala-3/org/apache/pekko/cluster/ddata/GSet.scala`, `docs/src/main/java-jdk-21/docs/actors/classical/OptimizedActorWithJava21.java`, `persistence/src/main/scala/org/apache/pekko/persistence/Eventsourced.scala` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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 Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-f2e8d12ea01f4313b47da4ae2ac415560artifacts/raw/osv-scanner.json

Run 01a1d937-148e-7b13-a9d5-4bc1d4d5ebef · 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