Public report of oyvindberg/bleep, published 7 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 7 November 2026, 08:09 UTC · Survey ID cd_9682b2da240f4c94b534d38045376e3a
oyvindberg/bleep
Measured 7 November 2026, 08:08 UTC, at code version 4fea48f
CAI scoreAt riskUp 4 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 109,877 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Code Health, 35
Findings by how serious they are
57 critical633 serious34 minor
14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
7 November 2026, 08:08 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.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
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 ▸
68of 68 dimensions measured by tools.
712of 724 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
68dimensions across 6 lenses, read from 109,877 lines of product code in 2 projects.
oyvindberg/bleep is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 48 out of 100, which the At risk rating leaves unchanged.
Code Health, at 35, is the weakest lens and counts most in the score. The best first step is splitting the oversized files, worth about 6 points. Declaring which values may be missing comes next, worth about 4 points. Raising Code Health to 70 would lift the score to about 58.
Twenty-eight known security holes in the packages the code depends on can be used by attackers. Twenty-four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and one automatic update takes new releases before a bad one can be spotted. Updating the vulnerable packages, pinning each tool to an exact version and setting a waiting period for automatic updates would close these risks. Limiting each secret to its own step would fix the secret exposed to more of the pipeline than needed, and fixing the weaknesses the scanner points to would deal with the security weakness in the code. The set of files in separate parts that keep changing together needs that dependency made explicit.
The product code is 109,877 lines, about €130,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 62 findings
These 62 critical or serious findings were in the previous survey, on 21 October 2026, and are gone from this one.
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Exception handling · Swallowed exception (caught, then discarded) bleep-bsp/src/scala/bleep/analysis/ZincSourceLookup.scala
Exception handling · Swallowed exception (caught, then discarded) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala
Exception handling · Swallowed exception (caught, then discarded) bleep-core/src/scala/bleep/analysis/NoopManifestStore.scala
Rebuild cost: about €130,000 · Estimate
Cost to rebuild
€42,000 to €210,000, for 698 to 2,215 hours of work, about 0.9 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 48. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 109,877 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 6 points · Medium effort · Large Files
2
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.
Migrate the remaining .js/.jsx files to TypeScript.
Raises the score by about 3 points · Medium effort · Type Safety
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 €130,000 to build again, about 0.9 person-years of work. Its weakest lens is Code Health, at 35 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package. Of all the actions in this report, it raises the score most for the work it takes: about 6 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.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 188,366 lines over the last 90 days, which is about 763,929 lines a year. At that pace, the extra work comes to an estimated 62.2 to 373.3 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: 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.
379 modules, with 379 dependencies between them. One loop runs through 12 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 339 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.
bleep.bsp.TestRunnerTypes uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.TestRunnerTypes, while a change to bleep.bsp.TestRunnerTypes can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.TestRunnerTypes uses a module listed above it, which is the healthy direction.
bleep.bsp.protocol.BleepBspProtocol uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.protocol.BleepBspProtocol, while a change to bleep.bsp.protocol.BleepBspProtocol can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.protocol.BleepBspProtocol uses a module listed above it, which is the healthy direction.
bleep.analysis uses bleep.bsp.Outcome, so a change to bleep.bsp.Outcome can break bleep.analysis, while a change to bleep.analysis can't break bleep.bsp.Outcome.
Position
Below the diagonal: bleep.analysis uses a module listed above it, which is the healthy direction.
bleep.analysis uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.analysis, while a change to bleep.analysis can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.analysis uses a module listed above it, which is the healthy direction.
bleep.bsp.KotlinTestRunner uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.KotlinTestRunner, while a change to bleep.bsp.KotlinTestRunner can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.KotlinTestRunner uses a module listed above it, which is the healthy direction.
bleep.bsp.KotlinTestRunner uses bleep.bsp.TestRunnerTypes, so a change to bleep.bsp.TestRunnerTypes can break bleep.bsp.KotlinTestRunner, while a change to bleep.bsp.KotlinTestRunner can't break bleep.bsp.TestRunnerTypes.
Position
Below the diagonal: bleep.bsp.KotlinTestRunner uses a module listed above it, which is the healthy direction.
bleep.bsp.protocol.BleepBspProtocol.Event uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.protocol.BleepBspProtocol.Event, while a change to bleep.bsp.protocol.BleepBspProtocol.Event can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.protocol.BleepBspProtocol.Event uses a module listed above it, which is the healthy direction.
43 pairs of types, where a type in bleep.bsp.protocol.BleepBspProtocol.Event uses a type in bleep.bsp.protocol.BleepBspProtocol. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.bsp.protocol.BleepBspProtocol.Event uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.bsp.protocol.BleepBspProtocol.Event, while a change to bleep.bsp.protocol.BleepBspProtocol.Event can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.bsp.protocol.BleepBspProtocol.Event uses a module listed above it, which is the healthy direction.
46 pairs of types, where a type in bleep.bsp.protocol.BleepBspProtocol.Event uses a type in bleep.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.bsp.protocol.BleepBspProtocol.Event uses bleep.model, so a change to bleep.model can break bleep.bsp.protocol.BleepBspProtocol.Event, while a change to bleep.bsp.protocol.BleepBspProtocol.Event can't break bleep.model.
Position
Below the diagonal: bleep.bsp.protocol.BleepBspProtocol.Event uses a module listed above it, which is the healthy direction.
bleep.internal uses bleep.templates, so a change to bleep.templates can break bleep.internal, while a change to bleep.internal can't break bleep.templates.
Position
Below the diagonal: bleep.internal uses a module listed above it, which is the healthy direction.
bleep.testing uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.testing, while a change to bleep.testing can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.testing uses a module listed above it, which is the healthy direction.
bleep.testing uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.testing, while a change to bleep.testing can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.testing uses a module listed above it, which is the healthy direction.
37 pairs of types, where a type in bleep.testing uses a type in bleep.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.bsp.TaskDag uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.TaskDag, while a change to bleep.bsp.TaskDag can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.TaskDag uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag uses bleep.model, so a change to bleep.model can break bleep.bsp.TaskDag, while a change to bleep.bsp.TaskDag can't break bleep.model.
Position
Below the diagonal: bleep.bsp.TaskDag uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag uses bleep.testing, so a change to bleep.testing can break bleep.bsp.TaskDag, while a change to bleep.bsp.TaskDag can't break bleep.testing.
Position
Below the diagonal: bleep.bsp.TaskDag uses a module listed above it, which is the healthy direction.
bleep.history uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.history, while a change to bleep.history can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.history uses a module listed above it, which is the healthy direction.
bleep.testing.BuildEvent uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.testing.BuildEvent, while a change to bleep.testing.BuildEvent can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.testing.BuildEvent uses a module listed above it, which is the healthy direction.
bleep.testing.BuildEvent uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.testing.BuildEvent, while a change to bleep.testing.BuildEvent can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.testing.BuildEvent uses a module listed above it, which is the healthy direction.
37 pairs of types, where a type in bleep.testing.BuildEvent uses a type in bleep.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.testing.BuildEvent uses bleep.model, so a change to bleep.model can break bleep.testing.BuildEvent, while a change to bleep.testing.BuildEvent can't break bleep.model.
Position
Below the diagonal: bleep.testing.BuildEvent uses a module listed above it, which is the healthy direction.
33 pairs of types, where a type in bleep.testing.BuildEvent uses a type in bleep.testing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.testing.BuildEvent uses bleep.testing, so a change to bleep.testing can break bleep.testing.BuildEvent, while a change to bleep.testing.BuildEvent can't break bleep.testing.
Position
Below the diagonal: bleep.testing.BuildEvent uses a module listed above it, which is the healthy direction.
bleep.testing.FancyBuildDisplay uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.testing.FancyBuildDisplay, while a change to bleep.testing.FancyBuildDisplay can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.testing.FancyBuildDisplay uses a module listed above it, which is the healthy direction.
bleep.testing.FancyBuildDisplay uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.testing.FancyBuildDisplay, while a change to bleep.testing.FancyBuildDisplay can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.testing.FancyBuildDisplay uses a module listed above it, which is the healthy direction.
bleep.testing.FancyBuildDisplay uses bleep.model, so a change to bleep.model can break bleep.testing.FancyBuildDisplay, while a change to bleep.testing.FancyBuildDisplay can't break bleep.model.
Position
Below the diagonal: bleep.testing.FancyBuildDisplay uses a module listed above it, which is the healthy direction.
bleep.testing.FancyBuildDisplay uses bleep.testing, so a change to bleep.testing can break bleep.testing.FancyBuildDisplay, while a change to bleep.testing.FancyBuildDisplay can't break bleep.testing.
Position
Below the diagonal: bleep.testing.FancyBuildDisplay uses a module listed above it, which is the healthy direction.
bleep.testing.ProjectDisplayItem uses bleep.model, so a change to bleep.model can break bleep.testing.ProjectDisplayItem, while a change to bleep.testing.ProjectDisplayItem can't break bleep.model.
Position
Below the diagonal: bleep.testing.ProjectDisplayItem uses a module listed above it, which is the healthy direction.
bleep.testing.ProjectDisplayItem uses bleep.testing, so a change to bleep.testing can break bleep.testing.ProjectDisplayItem, while a change to bleep.testing.ProjectDisplayItem can't break bleep.testing.
Position
Below the diagonal: bleep.testing.ProjectDisplayItem uses a module listed above it, which is the healthy direction.
bleep.testing.ProjectState.TestExecution uses bleep.model, so a change to bleep.model can break bleep.testing.ProjectState.TestExecution, while a change to bleep.testing.ProjectState.TestExecution can't break bleep.model.
Position
Below the diagonal: bleep.testing.ProjectState.TestExecution uses a module listed above it, which is the healthy direction.
bleep.testing.ProjectState.TestExecution uses bleep.testing, so a change to bleep.testing can break bleep.testing.ProjectState.TestExecution, while a change to bleep.testing.ProjectState.TestExecution can't break bleep.testing.
Position
Below the diagonal: bleep.testing.ProjectState.TestExecution uses a module listed above it, which is the healthy direction.
47 pairs of types, where a type in bleep.bsp uses a type in ch.epfl.scala.bsp. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.bsp uses bleep.bsp.TestRunnerTypes, so a change to bleep.bsp.TestRunnerTypes can break bleep.bsp, while a change to bleep.bsp can't break bleep.bsp.TestRunnerTypes.
Position
Below the diagonal: bleep.bsp uses a module listed above it, which is the healthy direction.
bleep.bsp uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.bsp, while a change to bleep.bsp can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.bsp uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.DagEvent uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.TaskDag.DagEvent, while a change to bleep.bsp.TaskDag.DagEvent can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.TaskDag.DagEvent uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.DagEvent uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.bsp.TaskDag.DagEvent, while a change to bleep.bsp.TaskDag.DagEvent can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.bsp.TaskDag.DagEvent uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.DagEvent uses bleep.model, so a change to bleep.model can break bleep.bsp.TaskDag.DagEvent, while a change to bleep.bsp.TaskDag.DagEvent can't break bleep.model.
Position
Below the diagonal: bleep.bsp.TaskDag.DagEvent uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.DagEvent uses bleep.bsp.TaskDag, so a change to bleep.bsp.TaskDag can break bleep.bsp.TaskDag.DagEvent, while a change to bleep.bsp.TaskDag.DagEvent can't break bleep.bsp.TaskDag.
Position
Below the diagonal: bleep.bsp.TaskDag.DagEvent uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.LinkPlatform uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.bsp.TaskDag.LinkPlatform, while a change to bleep.bsp.TaskDag.LinkPlatform can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.bsp.TaskDag.LinkPlatform uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.LinkPlatform uses bleep.analysis, so a change to bleep.analysis can break bleep.bsp.TaskDag.LinkPlatform, while a change to bleep.bsp.TaskDag.LinkPlatform can't break bleep.analysis.
Position
Below the diagonal: bleep.bsp.TaskDag.LinkPlatform uses a module listed above it, which is the healthy direction.
bleep.bsp.TaskDag.LinkPlatform uses bleep.bsp.TaskDag, so a change to bleep.bsp.TaskDag can break bleep.bsp.TaskDag.LinkPlatform, while a change to bleep.bsp.TaskDag.LinkPlatform can't break bleep.bsp.TaskDag.
Position
Below the diagonal: bleep.bsp.TaskDag.LinkPlatform uses a module listed above it, which is the healthy direction.
bleep.commands uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.commands, while a change to bleep.commands can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.commands uses a module listed above it, which is the healthy direction.
bleep.commands uses bleep.bsp.protocol.BleepBspProtocol, so a change to bleep.bsp.protocol.BleepBspProtocol can break bleep.commands, while a change to bleep.commands can't break bleep.bsp.protocol.BleepBspProtocol.
Position
Below the diagonal: bleep.commands uses a module listed above it, which is the healthy direction.
bleep.commands uses bleep.internal, so a change to bleep.internal can break bleep.commands, while a change to bleep.commands can't break bleep.internal.
Position
Below the diagonal: bleep.commands uses a module listed above it, which is the healthy direction.
130 pairs of types, where a type in bleep.commands uses a type in bleep. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.commands.server uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.commands.server, while a change to bleep.commands.server can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.commands.server uses a module listed above it, which is the healthy direction.
bleep.commands.server uses bleep.model, so a change to bleep.model can break bleep.commands.server, while a change to bleep.commands.server can't break bleep.model.
Position
Below the diagonal: bleep.commands.server uses a module listed above it, which is the healthy direction.
bleep.commands.server uses bleep.bsp, so a change to bleep.bsp can break bleep.commands.server, while a change to bleep.commands.server can't break bleep.bsp.
Position
Below the diagonal: bleep.commands.server uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in bleep.commands.server uses a type in bleep. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
bleep.commands.server.tui uses bleep.bsp.protocol, so a change to bleep.bsp.protocol can break bleep.commands.server.tui, while a change to bleep.commands.server.tui can't break bleep.bsp.protocol.
Position
Below the diagonal: bleep.commands.server.tui uses a module listed above it, which is the healthy direction.
bleep.commands.server.tui uses bleep.bsp, so a change to bleep.bsp can break bleep.commands.server.tui, while a change to bleep.commands.server.tui can't break bleep.bsp.
Position
Below the diagonal: bleep.commands.server.tui uses a module listed above it, which is the healthy direction.
bleep.commands.server.tui uses bleep, so a change to bleep can break bleep.commands.server.tui, while a change to bleep.commands.server.tui can't break bleep.
Position
Below the diagonal: bleep.commands.server.tui uses a module listed above it, which is the healthy direction.
bleep.sbtimport uses bleep.internal, so a change to bleep.internal can break bleep.sbtimport, while a change to bleep.sbtimport can't break bleep.internal.
Position
Below the diagonal: bleep.sbtimport uses a module listed above it, which is the healthy direction.
bleep.commands.Publish uses bleep.commands, so a change to bleep.commands can break bleep.commands.Publish, while a change to bleep.commands.Publish can't break bleep.commands.
Position
Below the diagonal: bleep.commands.Publish uses a module listed above it, which is the healthy direction.
bleep.commands.Publish uses bleep.packaging, so a change to bleep.packaging can break bleep.commands.Publish, while a change to bleep.commands.Publish can't break bleep.packaging.
Position
Below the diagonal: bleep.commands.Publish uses a module listed above it, which is the healthy direction.
bleep.javaapi uses bleep.CoursierResolver, so a change to bleep.CoursierResolver can break bleep.javaapi, while a change to bleep.javaapi can't break bleep.CoursierResolver.
Position
Below the diagonal: bleep.javaapi uses a module listed above it, which is the healthy direction.
bleep.javaapi uses bleep.packaging, so a change to bleep.packaging can break bleep.javaapi, while a change to bleep.javaapi can't break bleep.packaging.
Position
Below the diagonal: bleep.javaapi uses a module listed above it, which is the healthy direction.
bleep.mcp.BleepMcpServer uses bleep.history, so a change to bleep.history can break bleep.mcp.BleepMcpServer, while a change to bleep.mcp.BleepMcpServer can't break bleep.history.
Position
Below the diagonal: bleep.mcp.BleepMcpServer uses a module listed above it, which is the healthy direction.
bleep.mcp.BleepMcpServer uses bleep.bsp, so a change to bleep.bsp can break bleep.mcp.BleepMcpServer, while a change to bleep.mcp.BleepMcpServer can't break bleep.bsp.
Position
Below the diagonal: bleep.mcp.BleepMcpServer uses a module listed above it, which is the healthy direction.
bleep.mcp.BleepMcpServer uses bleep, so a change to bleep can break bleep.mcp.BleepMcpServer, while a change to bleep.mcp.BleepMcpServer can't break bleep.
Position
Below the diagonal: bleep.mcp.BleepMcpServer uses a module listed above it, which is the healthy direction.
bleep.mcp.BleepMcpServer uses bleep.mcp, so a change to bleep.mcp can break bleep.mcp.BleepMcpServer, while a change to bleep.mcp.BleepMcpServer can't break bleep.mcp.
Position
Below the diagonal: bleep.mcp.BleepMcpServer uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 35% · Weak · gated by D2, R1, R3, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
46
High / Critical
A05:2025 — Injection
31
High / Critical
Roadmap
Top priorities: Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; 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; Migrate the remaining .js/.jsx files to TypeScript.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
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.
Scala: compose the Future or effect (map/flatMap, a for-comprehension) instead of Await.result or unsafeRunSync, and wrap unavoidable blocking calls in blocking { } (Future), IO.blocking or ZIO.attemptBlocking.
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.
Add a SAST step to CI running what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 57
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 — 633
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 — 34
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 14
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 68 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, 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 — 68 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 712 of 724 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.scala) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`addSbtPlugin("org.scoverage" % "sbt-scoverage" % "<version>")` in `project/plugins.sbt`, then `sbt clean coverage test coverageReport`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`addSbtPlugin("org.scoverage" % "sbt-scoverage" % "<version>")` in `project/plugins.sbt`, then `sbt clean coverage test coverageReport`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this 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) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — 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. Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 5 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (21 contributor(s) across 1394 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 20 hold 0.6% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (intellij-plugin/build.gradle.kts), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
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. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm, Deno or JSR package, a Go module, a Cargo crate, a Python, Composer, Bundler, RubyGems, Mix, rebar3, sbt, SwiftPM or pub package, an OTP application, an Xcode project or XcodeGen spec, or a checkout that declares no build at all) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
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. `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala`, `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala`, `bleep-core/src/scala/bleep/packaging/GenLayout.scala`, `bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java` 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.
AXB2 Runtime readiness — 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. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
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.
M3 Folder & project structure — 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. Whether the tests sit apart from production code is not visible here, because the suite is not in a form this pass reads. The test-separation credit is granted rather than withheld: this is a gap in the analyzer's language coverage, not a finding about the repository's tests. You can widen what we reach: keep the test surface somewhere a reader can find it without opening a binary — an exported/checked-in test source tree beside the production code makes the suite reviewable, diffable and discoverable by tooling.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
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. 57 further occurrence(s) are not listed individually; the score already reflects all 97.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's Scala imports SLF4J but logs through a logger the reading cannot trace to it — a `log` handed down by a trait or passed in as a parameter — so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 4 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D13 Secret Scanning: Secret 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").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
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.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
72 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MultiWorkspaceBspServer.handleTest at 107. A further 6 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 BuildEvent.fromProtocol at 42 — they are counted neither in the figure above nor in this dimension's score. 2 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: bleep-core/src/scala/bleep/testing/BuildEvent.scala (BuildEvent.fromProtocol at 42), bleep-cli/src/scala-3/bleep/mcp/McpEventFilter.scala (McpEventFilter.filter at 16). 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.
+ 67 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 8 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with MultiWorkspaceBspServer.handleTest (cyclomatic 107), TaskDag.executor (cyclomatic 106), BuildStateReducer.reduce (cyclomatic 88). — 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 8 together lifts Cyclomatic Complexity from 5.9 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 139 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 240 down to 240 or less in Cognitive Complexity — start with MultiWorkspaceBspServer.handleTest (cognitive 712), ReactiveBsp.runWithBleepBsp (cognitive 476), TaskDag.executor (cognitive 406). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 21 FileTooLong finding(s) in God Classes — start with MultiWorkspaceBspServer.scala, ZincBridge.scala, Main.scala. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 8 TooManyMethods finding(s) in God Classes — start with MultiWorkspaceBspServer.scala, ServerTopView.scala, BleepMcpServer.scala. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 4 FunctionTooLong finding(s) in God Classes — start with index.js (2), why.js (2). — One of this dimension's main actionable groups (4 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
203 duplicated block group(s) detected. A further 23 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 74 of the 226 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 23 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ScalaNative04Bridge.scala (2), MultiWorkspaceBspServer.scala (2), select.template.scala (2). — One of this dimension's main actionable groups (23 warning-level).
Resolve the 17 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with Main.scala (2), ConfigAuthSetup.scala (2), CoursierResolver.scala (2). — One of this dimension's main actionable groups (17 warning-level).
Resolve the 17 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with FancyBuildDisplay.scala (3), KotlinNativeCompilerConfig.scala (2), ClasspathAnalyzer.scala. — One of this dimension's main actionable groups (17 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
2 production modules (Gradle+Maven), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there, and main-sequence distance (abstractness) is not computed for these modules yet.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with ProjectDigestTest.scala, AnalysisDedupMeasurementTest.scala. — One of this dimension's main actionable groups (2 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 31 Hotspot finding(s) in Churn × Complexity Hotspots — start with MultiWorkspaceBspServer.scala, TaskDag.scala, ReactiveBsp.scala. — One of this dimension's main actionable groups (31 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
14 deducted task-comment markers across 109877 LoC (0.0/KLoC) → score 10.0. 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.
Resolve the 10 TodoComment finding(s) in Explicit Debt — start with InteractionService.scala (2), It.scala, RewriteSnapshotTest.scala. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with SbtUpdateReport.scala (3), UpdateRun.scala. — One of this dimension's main actionable groups (4 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
31 finding(s): 0 critical, 27 high, 4 medium, 0 low. 24 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 29 file(s) — `bleep-bsp-tests/src/scala/bleep/analysis/CancellationTest.scala`, `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala`, `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala`, `bleep-core/src/scala/bleep/packaging/GenLayout.scala`, `bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java`, … (+24 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 24 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 (24 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 22 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (22). — One of this dimension's main actionable groups (22 issue-level).
Resolve the 5 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 452 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is bleep-cli/src/scala/bleep/internal/Version.scala. Counted over 452 of the 874 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with buildFromBloopFiles.scala. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 7 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`BleepscriptServices` declares 16 abstract methods: `createJar`, `defaultManifestCreator`, `fetchClasspath`, `fetchSources`, `forCodegen`, `forScript`, `packageProject`, `packageProjects`, `parseDep`, `parseRelPath`, `publishToFolder`, `publishToLocalIvy`, `publishToLocalMaven`, `publishToResolver`, `runCli`, `signArtifacts`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — bleepscript/src/main/java/bleepscript/BleepscriptServices.java:22
`Commands` declares 16 abstract methods under just 9 distinct name(s): `clean`, `compile`, `compile`, `link`, `link`, `publish`, `publish`, `publishLocal`, `publishLocal`, `publishSonatype`, `run`, `run`, `script`, `script`, `test`, `test`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 9 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — bleepscript/src/main/java/bleepscript/Commands.java:6
`BspClient` declares 21 abstract members: `initialize`, `buildTargets`, `compile`, `compile`, `test`, `run`, `cleanCache`, `shutdown`, `link`, `compileAsync`, `compileAsync`, `testAsync`, `runAsync`, `cancelRequest`, `events`, `logMessages`, `diagnosticsByFile`, `clear`, `scalacOptions`, `javacOptions`, `rawRequest`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. Those 21 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — bleep-bsp-tests/src/scala/bleep/analysis/BspTestHarness.scala:170
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
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.
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.
`handleInitialized` has an empty body — confirm it's an intentional no-op and not an unfinished method. — bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:637
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
410 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
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.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 1 of 3 project(s) that lack one — worth up to 0.7 pts.
Review the README against recent changes; refresh the parts that drifted.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add scalafix or scapegoat (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 29872 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `maven`, `gradle`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:7
What to do
Add a SAST step to CI running what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Dependabot is configured but does not watch `npm`, `maven`, `gradle`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · 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.
`executeTest` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs. — bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:739
`getOrCreate` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs. — bleep-core/src/scala/bleep/testing/JvmPool.scala:759
`release` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs. — bleep-core/src/scala/bleep/testing/JvmPool.scala:1082
`execFileSync` in `loadContent` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — bleep-site/scripts/snippet-extractor-plugin.js:10
What to do
Scala: compose the Future or effect (map/flatMap, a for-comprehension) instead of Await.result or unsafeRunSync, and wrap unavoidable blocking calls in blocking { } (Future), IO.blocking or ZIO.attemptBlocking.
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety2.7 / 10Weak✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
3 typed · 8 plain JS — the untyped files are bleep-site/scripts/extract-snippets.js, bleep-site/scripts/latest-version.mjs, bleep-site/scripts/remark-bleep-version.mjs, bleep-site/scripts/snippet-extractor-plugin.js, bleep-site/sidebars.js, bleep-site/src/components/HomepageFeatures/index.js (+2 more).
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
bleep-site/src/pages/index.js:14 · bleep-site/src/pages/why.js:16 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:14
bleep-site/src/pages/index.js:1327 · bleep-site/src/pages/why.js:1083 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:1327
bleep-site/src/pages/index.js:1287 · bleep-site/src/pages/why.js:1044 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/pages/index.js:1287
bleep-site/src/components/HomepageFeatures/index.js:23 · bleep-site/src/components/HomepageFeatures/index.js:49 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/components/HomepageFeatures/index.js:23
bleep-site/src/pages/index.js:443 · bleep-site/src/pages/index.js:541 · bleep-site/src/pages/index.js:691 · bleep-site/src/pages/index.js:907 · +3 more site(s) not listed — the 7 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/pages/index.js:443
bleep-site/src/pages/index.js:1179 · bleep-site/src/pages/why.js:686 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/pages/index.js:1179
bleep-site/src/pages/why.js:543 · bleep-site/src/pages/why.js:1001 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/pages/why.js:543
bleep-site/src/pages/index.js:225 · bleep-site/src/pages/why.js:206 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:225
bleep-site/src/components/HomepageFeatures/index.js:6 · bleep-site/src/components/HomepageFeatures/index.js:28 · bleep-site/src/components/HomepageFeatures/index.js:51 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/components/HomepageFeatures/index.js:6
bleep-site/src/pages/index.js:190 · bleep-site/src/pages/why.js:174 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:190
bleep-site/src/pages/index.js:306 · bleep-site/src/pages/why.js:552 · bleep-site/src/pages/why.js:1010 — the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — bleep-site/src/pages/index.js:306
bleep-site/src/pages/index.js:724 · bleep-site/src/pages/index.js:758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bleep-site/src/pages/index.js:724
bleep-site/src/pages/why.js:605 · bleep-site/src/pages/why.js:624 · bleep-site/src/pages/why.js:644 — 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. — bleep-site/src/pages/why.js:605
bleep-site/src/pages/index.js:677 · bleep-site/src/pages/index.js:958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bleep-site/src/pages/index.js:677
bleep-site/src/pages/index.js:1144 · bleep-site/src/pages/why.js:817 · bleep-site/src/pages/why.js:944 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:1144
bleep-site/src/pages/why.js:326 · bleep-site/src/pages/why.js:958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bleep-site/src/pages/why.js:326
bleep-site/src/pages/index.js:491 · bleep-site/src/pages/why.js:490 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:491
bleep-site/src/pages/index.js:580 · bleep-site/src/pages/index.js:949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bleep-site/src/pages/index.js:580
bleep-site/src/pages/index.js:940 · bleep-site/src/pages/why.js:929 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — bleep-site/src/pages/index.js:940
bleep-site/src/pages/why.js:401 · bleep-site/src/pages/why.js:417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — bleep-site/src/pages/why.js:401
bleep-site/src/pages/why.js:620 · bleep-site/src/pages/why.js: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. — bleep-site/src/pages/why.js:620
bleep-site/src/pages/index.js:325 · bleep-site/src/pages/why.js:605 · bleep-site/src/pages/why.js:624 · bleep-site/src/pages/why.js:644 — the 4 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — bleep-site/src/pages/index.js:325
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
bleep-site/src/pages/index.js has 1347 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bleep-site/src/pages/index.js:1
bleep-site/src/pages/why.js has 1105 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — bleep-site/src/pages/why.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling3.3 / 10Weak✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✗ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add a test runner (vitest / jest / playwright) and `tsc --noEmit` as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code8.2 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 6 application, 3 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (6 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×4) — bleep-site/src/components/HomepageFeatures/index.js, bleep-site/src/components/Snippet/index.tsx, bleep-site/src/components/AsciinemaPlayer.tsx, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json. (×2) — bleep-site/sidebars.js:3, bleep-site/docusaurus.config.js:13
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — bleep-site/src/pages/index.js:6
Declared in bleep-site/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · 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. (×2) — bleep-core/src/scala/bleep/ProjectDigest.scala:268, bleep-nosbt/src/scala/bleep/nosbt/io/Hash.scala:66
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 2 sites, not one: `bleep-core/src/scala/bleep/ProjectDigest.scala:268` (MessageDigest.getInstance("SHA-1")), `bleep-nosbt/src/scala/bleep/nosbt/io/Hash.scala:66` (MessageDigest.getInstance("SHA")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream5.9 / 10Adequate✓ Tool-verified
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `p.getInputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `p.getErrorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a thread or `Future` per stream), merge them with `redirectErrorStream(true)` before `start()`, discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`), or use `scala.sys.process`, which pumps both. — bleep-core/src/scala/bleep/MachineMemory.scala:63
The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.getInputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.getErrorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a thread or `Future` per stream), merge them with `redirectErrorStream(true)` before `start()`, discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`), or use `scala.sys.process`, which pumps both. — bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:125
What to do
Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
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.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
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.
`Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. (×2) — scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:229, bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:690
`Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.forEachOrdered` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — bleep-core/src/scala/bleep/packaging/createJar.scala:29
`Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.forEach` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — bleep-cli/src/scala/bleep/commands/BuildProjectMergeInto.scala:93
`Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.toList` 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(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — bleep-cli/src/scala/bleep/commands/SetupIde.scala:40
`Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. (×3) — bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:929, bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:758, bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:113
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
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 controlled by an `if`, 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)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `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. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` 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.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`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. (×2) — scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:110, scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:114
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. (×29) — scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:224, scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:227, bleep-core/src/scala/bleep/TarGz.scala:105, …
`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. (×5) — bleep-core/src/scala/bleep/testing/JvmPool.scala:149, bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:975, bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:549, …
`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. (×4) — bleep-core/src/scala/bleep/testing/JvmPool.scala:502, bleep-core/src/scala/bleep/testing/JvmPool.scala:546, bleep-core/src/scala/bleep/testing/JvmPool.scala:590, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether 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 463 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.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 5 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 — 61 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (11 DOM element(s) < 25) — too little surface to assess accessibility.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — 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 — ~28888 lines of test source are present (.scala) 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 — no .scala test runner
D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 5 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — Not scored — this repository's 5 declared JVM dependency coordinate(s) were read from its 2 Maven/Gradle manifest(s), but Maven Central could not be asked for the licence of 1 of them (HTTP 429 Too Many Requests from http://172.31.7.1:8790/maven/com/org/moduleName_2.13/1.0.0/moduleName_2.13-1.0.0.pom), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
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.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Java, JavaScript, Kotlin, Python, Scala not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .java, .kt, .py, .scala source were not judged.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 measured no build unit over this repository's .java, .kt, .scala source. 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.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 4 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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
D9 Test Distribution — Test source is present (.scala) 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 its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 2173 value object(s); 34 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
M4 Documentation accuracy — Not applicable: the 79 current-state document(s) make no claim of a kind M4 checks. 138 claim(s) of kinds M4 does not check were not checked (path 92, command argument 5, environment variable 39, setting 2); M4 checks only links and versions and artefact counts.
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, JavaScript/TypeScript 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 — no coverage report found on disk — produce a coverage report in a standard format (`addSbtPlugin("org.scoverage" % "sbt-scoverage" % "<version>")` in `project/plugins.sbt`, then `sbt clean coverage test coverageReport`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — the JS/TS workspace (11 production file(s)) has no JavaScript/TypeScript test, but it is 3.1% of this repository's production source and the other 96.9% carries 28,888 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X2 Cancellation propagation — no C# was loaded; this repository's Scala, Java and Kotlin were read, and no request in it can be cancelled by a caller (Ktor, OkHttp's newCall or a URL stream, from a suspend function) — 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; a Kotlin request outside a suspend function has no caller's cancellation to honour
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.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Boundary-crossing change coupling: buildFromBloopFiles.scala ↔ Defaults.scala bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:1— `bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala` (context bleep-cli) and `bleep-model/src/scala/bleep/rewrites/Defaults.scala` (context bleep-model) sit in DIFFERENT parts of the tree yet change together 67% of the time (14 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `8c7ab9ee` `source-layout: sbt-plugin`, the default for sbt plugins, and for the…; `267cbdea` Adds a link command (#445); `ce4578f4` Adds support for modulekindsplitstyle (#403) — run `git show` on any of them.
Unlisted import 'file-loader' bleep-site/src/pages/index.js:6— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Hotspot: bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2331— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala changed 77 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in MultiWorkspaceBspServer.handleTest at line 2331. 3 of those changes were fix/bug commits, and the other 74 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.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.
Hotspot: bleep-bsp/src/scala/bleep/bsp/TaskDag.scala bleep-bsp/src/scala/bleep/bsp/TaskDag.scala:1049— bleep-bsp/src/scala/bleep/bsp/TaskDag.scala changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in TaskDag.executor at line 1049. 1 of those changes was a fix/bug commit, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-bsp/src/scala/bleep/bsp/TaskDag.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.
Hotspot: bleep-core/src/scala/bleep/commands/ReactiveBsp.scala bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:305— bleep-core/src/scala/bleep/commands/ReactiveBsp.scala changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in ReactiveBsp.runWithBleepBsp at line 305. 1 of those changes was a fix/bug commit, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/commands/ReactiveBsp.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.
Hotspot: bleep-cli/src/scala/bleep/Main.scala bleep-cli/src/scala/bleep/Main.scala:304— bleep-cli/src/scala/bleep/Main.scala changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in Main.builtinBuildOpts at line 304. 3 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-cli/src/scala/bleep/Main.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.
Hotspot: bleep-core/src/scala/bleep/testing/BuildDisplay.scala bleep-core/src/scala/bleep/testing/BuildDisplay.scala:873— bleep-core/src/scala/bleep/testing/BuildDisplay.scala changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in BuildDisplayImpl.printSideEffects at line 873. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/testing/BuildDisplay.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.
Hotspot: bleep-core/src/scala/bleep/testing/BuildState.scala bleep-core/src/scala/bleep/testing/BuildState.scala:190— bleep-core/src/scala/bleep/testing/BuildState.scala changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in BuildStateReducer.reduce at line 190. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/testing/BuildState.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.
Hotspot: bleep-bsp/src/scala/bleep/bsp/TestRunner.scala bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:409— bleep-bsp/src/scala/bleep/bsp/TestRunner.scala changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in TestRunner.executeWithIdleTimeout at line 409. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-bsp/src/scala/bleep/bsp/TestRunner.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.
Hotspot: bleep-core/src/scala/bleep/ResolveProjects.scala bleep-core/src/scala/bleep/ResolveProjects.scala:189— bleep-core/src/scala/bleep/ResolveProjects.scala changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in ResolveProjects.resolveProject at line 189. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/ResolveProjects.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.
Hotspot: bleep-bsp/src/scala/bleep/bsp/BspServerDaemon.scala bleep-bsp/src/scala/bleep/bsp/BspServerDaemon.scala:198— bleep-bsp/src/scala/bleep/bsp/BspServerDaemon.scala changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in BspServerDaemon.runWithLock at line 198. 3 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-bsp/src/scala/bleep/bsp/BspServerDaemon.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.
Hotspot: bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1125— bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in BleepMcpSession.heartbeat at line 1125. 1 of those changes was a fix/bug commit, and the other 29 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.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.
Hotspot: REDACTED REDACTED:86— REDACTED changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ForkedTestRunner.main at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:36— bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in buildFromBloopFiles.apply at line 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.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.
Hotspot: bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:419— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in FancyBuildDisplay.processEvent at line 419. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/testing/FancyBuildDisplay.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.
Hotspot: bleep-core/src/scala/bleep/testing/BuildEvent.scala bleep-core/src/scala/bleep/testing/BuildEvent.scala:345— bleep-core/src/scala/bleep/testing/BuildEvent.scala changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in BuildEvent.fromProtocol at line 345. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/testing/BuildEvent.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.
Hotspot: bleep-core/src/scala/bleep/testing/JvmPool.scala bleep-core/src/scala/bleep/testing/JvmPool.scala:844— bleep-core/src/scala/bleep/testing/JvmPool.scala changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in JvmPoolImpl.spawnJvm at line 844. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/testing/JvmPool.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.
Hotspot: scripts/src/scala/bleep/scripts/ExportMaven.scala scripts/src/scala/bleep/scripts/ExportMaven.scala:174— scripts/src/scala/bleep/scripts/ExportMaven.scala changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in ExportMaven.run at line 174. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- scripts/src/scala/bleep/scripts/ExportMaven.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.
Hotspot: bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:532— bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ZincBridge.compileOnce at line 532. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-bsp/src/scala/bleep/analysis/ZincBridge.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.
Hotspot: bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:114— bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in buildFromMavenPom.convertModule at line 114. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.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.
Hotspot: bleep-tests/src/scala/bleep/PlatformFrameworkHarness.scala bleep-tests/src/scala/bleep/PlatformFrameworkHarness.scala:245— bleep-tests/src/scala/bleep/PlatformFrameworkHarness.scala changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in PlatformFrameworkHarness.assertFixtureRan at line 245. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-tests/src/scala/bleep/PlatformFrameworkHarness.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.
Hotspot: bleep-cli/src/scala/bleep/commands/ServerMetrics.scala bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:152— bleep-cli/src/scala/bleep/commands/ServerMetrics.scala changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in ServerMetrics.generateHtml at line 152. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-cli/src/scala/bleep/commands/ServerMetrics.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.
Hotspot: bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:262— bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in TestProtocol.parseCommand at line 262. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: .github/scripts/summarise-bsp-metrics.py .github/scripts/summarise-bsp-metrics.py:46— .github/scripts/summarise-bsp-metrics.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in summarise-bsp-metrics.summarise at line 46. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- .github/scripts/summarise-bsp-metrics.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: bleep-core/src/scala/bleep/testing/JUnitXmlReport.scala bleep-core/src/scala/bleep/testing/JUnitXmlReport.scala:221— bleep-core/src/scala/bleep/testing/JUnitXmlReport.scala changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in JUnitXmlCollector.handle at line 221. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/testing/JUnitXmlReport.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.
Hotspot: bleep-core/src/scala/bleep/bsp/BspRifle.scala bleep-core/src/scala/bleep/bsp/BspRifle.scala:74— bleep-core/src/scala/bleep/bsp/BspRifle.scala changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in BspRifle.ensureRunning at line 74. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-core/src/scala/bleep/bsp/BspRifle.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.
Hotspot: bleep-bsp/src/scala/bleep/bsp/BleepBuildConverter.scala bleep-bsp/src/scala/bleep/bsp/BleepBuildConverter.scala:97— bleep-bsp/src/scala/bleep/bsp/BleepBuildConverter.scala changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in BleepBuildConverter.detectLanguage at line 97. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-14..2026-10-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-14 23:53:21 +02:00' --until='2026-10-12 23:53:21 +02:00' --full-history --no-merges -- bleep-bsp/src/scala/bleep/bsp/BleepBuildConverter.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.
Swallowed exception (empty catch) scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:224— 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) scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:227— 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) bleep-core/src/scala/bleep/TarGz.scala:105— 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) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:205— 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) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:211— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:432— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:494— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:539— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:543— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:560— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:562— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:565— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:587— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:1037— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:1052— 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) bleep-core/src/scala/bleep/testing/JvmPool.scala:1175— 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) bleep-core/src/scala/bleep/bsp/BspClientShutdownHandler.scala:48— 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) bleep-core/src/scala/bleep/bsp/BspConnection.scala:129— 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) bleep-core/src/scala/bleep/bsp/BspConnection.scala:131— 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) bleep-core/src/scala/bleep/bsp/BspConnection.scala:135— 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) bleep-core/src/scala/bleep/bsp/BspConnection.scala:156— 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) bleep-core/src/scala/bleep/bsp/BspRifle.scala:119— 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) bleep-core/src/scala/bleep/bsp/BspRifle.scala:128— 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) bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:462— 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) bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:516— 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.
Duplicated block (5 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:262— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:262-266 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:322-326 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:262` 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) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:309— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:309-313 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:384-388 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:309` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1949— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1949-1953 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2522-2526 — both copies are in the same file, so extract the block into 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) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4506— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4506-4511 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4715-4719 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4506` 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) bleep-bsp/src/scala/bleep/bsp/SourceGenRunner.scala:494— bleep-bsp/src/scala/bleep/bsp/SourceGenRunner.scala:494-498 | bleep-bsp/src/scala/bleep/bsp/SourceGenRunner.scala:505-509 — both copies are in the same file, so extract the block into 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) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:691— bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:691-695 | bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1068-1072 — both copies are in the same file, so extract the block into 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) bleep-cli/src/scala/bleep/commands/BuildDiff.scala:37— bleep-cli/src/scala/bleep/commands/BuildDiff.scala:37-41 | bleep-cli/src/scala/bleep/commands/BuildDiff.scala:60-64 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/commands/BuildDiff.scala:37` 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) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:693— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:693-697 | bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:710-714 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:693` 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) bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:28— bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:28-32 | bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:236-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:28` 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) bleep-cli/src/scala/bleep/commands/CompileServerStopAll.scala:51— bleep-cli/src/scala/bleep/commands/CompileServerStopAll.scala:51-55 | bleep-core/src/scala/bleep/bsp/ServerDirs.scala:267-271 — 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) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:726— bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:726-730 | scripts-dev/src/scala/bleep/scripts/dev/GenCliDocs.scala:365-369 — 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) bleep-core/src/scala/bleep/BspQuery.scala:81— bleep-core/src/scala/bleep/BspQuery.scala:81-86 | bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:840-844 — 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) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:649— bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:649-653 | bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:658-662 — both copies are in the same file, so extract the block into 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) bleep-core/src/scala/bleep/history/TranscriptFormat.scala:241— bleep-core/src/scala/bleep/history/TranscriptFormat.scala:241-245 | bleep-core/src/scala/bleep/history/TranscriptFormat.scala:378-382 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/history/TranscriptFormat.scala:241` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleep-core/src/scala/bleep/history/TranscriptFormat.scala:377` calls `foreach`, `fromString`, `stripAnsi` and `bleep-core/src/scala/bleep/history/TranscriptFormat.scala:240` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java:224— bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java:224-228 | bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java:230-234 — both copies are in the same file, so extract the block into 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) .github/scripts/summarise-bsp-metrics.py:51— .github/scripts/summarise-bsp-metrics.py:51-55 | .github/scripts/summarise-bsp-metrics.py:61-65 — both copies are in the same file, so extract the block into 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/form.template.scala:29— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/form.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/form.template.scala:30-34 — 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/form.template.scala:29` 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputText.template.scala:27— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputText.template.scala:27-31 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputText.template.scala:28-32 — 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputText.template.scala:27` 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/javascriptRouter.template.scala:38— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/javascriptRouter.template.scala:38-42 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/javascriptRouter.template.scala:39-43 — 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/javascriptRouter.template.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 (5 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:38— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:38-42 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/select.template.scala:39-43 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/select.template.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.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 (5 lines × 2) bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestFork.scala:139— bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestFork.scala:139-143 | bleep-core/src/scala/bleep/testing/InProcessTestExecutor.scala:207-211 — 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:151— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:151-155 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala:152-156 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.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 (5 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:48— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:48-52 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/select.template.scala:49-53 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/select.template.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:48` 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.
FileTooLong: bsp/MultiWorkspaceBspServer.scala bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala— FileTooLong — 3608 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3108 over it, 7.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: analysis/ZincBridge.scala bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala— FileTooLong — 1427 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 927 over it, 2.85× 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: bleep/Main.scala bleep-cli/src/scala/bleep/Main.scala— FileTooLong — 1259 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 759 over it, 2.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pages/index.js bleep-site/src/pages/index.js— FileTooLong — 1195 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 695 over it, 2.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: bsp/Bsp.scala bleep-bsp/src/scala/ch/epfl/scala/bsp/Bsp.scala— FileTooLong — 1086 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 586 over it, 2.17× 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: pages/why.js bleep-site/src/pages/why.js— FileTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 499 over it, 2.00× 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: testing/BuildDisplay.scala bleep-core/src/scala/bleep/testing/BuildDisplay.scala— FileTooLong — 969 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 469 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: testing/FancyBuildDisplay.scala bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala— FileTooLong — 928 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 428 over it, 1.86× 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: mcp/BleepMcpServer.scala bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala— FileTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: BleepMcpServer (47-1217). The bar is 500 significant lines; this is 419 over it, 1.84× 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: bsp/TaskDag.scala bleep-bsp/src/scala/bleep/bsp/TaskDag.scala— FileTooLong — 805 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 305 over it, 1.61× 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: testing/JvmPool.scala bleep-core/src/scala/bleep/testing/JvmPool.scala— FileTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 301 over it, 1.60× 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: commands/ReactiveBsp.scala bleep-core/src/scala/bleep/commands/ReactiveBsp.scala— FileTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 251 over it, 1.50× 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: tui/ServerTopView.scala bleep-cli/src/scala/bleep/commands/server/tui/ServerTopView.scala— FileTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 150 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: mavenimport/buildFromMavenPom.scala bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala— FileTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 136 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: analysis/KotlinSourceCompiler.scala bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala— FileTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 91 over it, 1.18× 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: protocol/BleepBspProtocol.scala bleep-bsp-protocol/src/scala/bleep/bsp/protocol/BleepBspProtocol.scala— FileTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 68 over it, 1.14× 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: commands/ServerMetrics.scala bleep-cli/src/scala/bleep/commands/ServerMetrics.scala— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: sbtimport/buildFromBloopFiles.scala bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala— FileTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 53 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: analysis/ProjectCompiler.scala bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala— FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× 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: analysis/ClasspathAnalyzer.scala bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala— FileTooLong — 515 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 15 over it, 1.03× 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: bleep/CoursierResolver.scala bleep-core/src/scala/bleep/CoursierResolver.scala— FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.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.
Duplicated block (7 lines × 2) bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:273— bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:273-279 | bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:364-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:273` 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, `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:371` calls `readAllBytes` and `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:280` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:177— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:177-183 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:242-248 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:177` 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) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2007— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2007-2013 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2854-2865 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2007` 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) bleep-cli/src/scala/bleep/Main.scala:1194— bleep-cli/src/scala/bleep/Main.scala:1194-1200 | bleep-cli/src/scala/bleep/Main.scala:1209-1215 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/Main.scala:1194` 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) bleep-cli/src/scala/bleep/Main.scala:1224— bleep-cli/src/scala/bleep/Main.scala:1224-1230 | bleep-cli/src/scala/bleep/Main.scala:1236-1242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/Main.scala:1224` 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) bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:81— bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:81-88 | bleep-cli/src/scala/bleep/commands/PublishSetup.scala:231-237 — before extracting anything, compare `bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala` and `bleep-cli/src/scala/bleep/commands/PublishSetup.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:143— bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:143-149 | bleep-cli/src/scala/bleep/commands/PublishSetup.scala:498-504 — before extracting anything, compare `bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala` and `bleep-cli/src/scala/bleep/commands/PublishSetup.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:104— bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:104-110 | bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:187-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:104` 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) bleep-cli/src/scala/bleep/commands/InstallBashTabCompletions.scala:9— bleep-cli/src/scala/bleep/commands/InstallBashTabCompletions.scala:9-15 | bleep-cli/src/scala/bleep/commands/InstallZshTabCompletions.scala:12-18 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bleep-cli/src/scala/bleep/commands/InstallBashTabCompletions.scala:16` calls `Some` and `bleep-cli/src/scala/bleep/commands/InstallZshTabCompletions.scala:20` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:321— bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:321-327 | bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:287-293 — 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) bleep-core/src/scala/bleep/AnnotationProcessorResolver.scala:122— bleep-core/src/scala/bleep/AnnotationProcessorResolver.scala:122-128 | bleep-core/src/scala/bleep/SymbolProcessorResolver.scala:278-284 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) bleep-core/src/scala/bleep/CoursierResolver.scala:499— bleep-core/src/scala/bleep/CoursierResolver.scala:499-505 | bleep-core/src/scala/bleep/CoursierResolver.scala:565-571 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/CoursierResolver.scala:499` 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) bleep-core/src/scala/bleep/commands/RemoteCache.scala:58— bleep-core/src/scala/bleep/commands/RemoteCache.scala:58-64 | bleep-core/src/scala/bleep/commands/RemoteCache.scala:129-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-core/src/scala/bleep/commands/RemoteCache.scala:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:889— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:889-895 | bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:903-909 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:889` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) bleep-core/src/scala/bleep/CoursierResolver.scala:115— bleep-core/src/scala/bleep/CoursierResolver.scala:115-121 | bleep-tests/src/scala/bleep/TestResolver.scala:113-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.
Duplicated block (7 lines × 2) bleepscript/src/main/java/bleepscript/Project.java:30— bleepscript/src/main/java/bleepscript/Project.java:30-36 | bleepscript/src/main/java/bleepscript/PublishConfig.java:23-29 — 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) bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:74— bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:74-80 | bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:140-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:341— bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:341-346 | bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:779-784 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:341` 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) bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompilerConfig.scala:48— bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompilerConfig.scala:48-53 | bleep-model/src/scala/bleep/model/KotlinNative.scala:174-179 — 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 `bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompilerConfig.scala:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompilerConfig.scala:54— bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompilerConfig.scala:54-59 | bleep-model/src/scala/bleep/model/KotlinNative.scala:180-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompilerConfig.scala:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala:39— bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala:39-44 | bleep-bsp/src/scala/bleep/analysis/ScalaNativeRunner.scala:39-44 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNativeRunner.scala` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:58— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:58-63 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:59-64 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:303— bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:303-308 | bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:434-439 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/LinkExecutor.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.
Duplicated block (6 lines × 2) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:264— bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:264-269 | bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:273-278 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:985— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:985-990 | bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1002-1007 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:985` 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, `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:992` calls `styled`, `s` and `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1009` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1094— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1094-1099 | bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1185-1190 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1094` 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) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1114— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1114-1119 | bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1154-1159 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1114` 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) bleepscript/src/main/java/bleepscript/LinkedOutput.java:22— bleepscript/src/main/java/bleepscript/LinkedOutput.java:22-27 | bleepscript/src/main/java/bleepscript/ScriptDef.java:7-12 — 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) bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:398— bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:398-403 | bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:632-644 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/TestRunner.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 (6 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala:128— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala:128-133 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devNotFound.template.scala:129-134 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devNotFound.template.scala` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/checkbox.template.scala:28— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/checkbox.template.scala:28-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/checkbox.template.scala:29-34 — 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/checkbox.template.scala:28` 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/jsloader.template.scala:16— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/jsloader.template.scala:16-21 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/jsloader.template.scala:17-22 — 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/jsloader.template.scala:16` 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:66— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:66-71 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/play20/manual.template.scala:67-72 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/play20/manual.template.scala` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:145— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:145-150 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala:146-151 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:164— bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:164-171 | bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:216-223 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:164` 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) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:219— bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:219-226 | bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:228-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:219` 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) bleep-core/src/scala/bleep/bsp/SetupBleepBsp.scala:145— bleep-core/src/scala/bleep/bsp/SetupBleepBsp.scala:145-152 | bleep-core/src/scala/bleep/bsp/SetupBleepBsp.scala:194-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-core/src/scala/bleep/bsp/SetupBleepBsp.scala:145` 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) bleep-core/src/scala/bleep/commands/PublishLocal.scala:45— bleep-core/src/scala/bleep/commands/PublishLocal.scala:45-52 | bleep-core/src/scala/bleep/commands/PublishSonatype.scala:33-40 — 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 `bleep-core/src/scala/bleep/commands/PublishLocal.scala:45` 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) bleep-core/src/scala/bleep/commands/RemoteCache.scala:36— bleep-core/src/scala/bleep/commands/RemoteCache.scala:36-47 | bleep-core/src/scala/bleep/commands/RemoteCache.scala:110-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-core/src/scala/bleep/commands/RemoteCache.scala:36` 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) bleep-core/src/scala/bleep/javaapi/JCommands.scala:164— bleep-core/src/scala/bleep/javaapi/JCommands.scala:164-171 | bleep-core/src/scala/bleep/javaapi/JCommands.scala:175-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:552— bleep-core/src/scala/bleep/testing/BuildDisplay.scala:552-559 | bleep-core/src/scala/bleep/testing/BuildDisplay.scala:575-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:268— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:268-275 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:328-335 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2258— bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2258-2265 | bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2279-2286 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2258` 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) bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusPackage.java:76— bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusPackage.java:76-83 | bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:103-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:102` calls `forEach`, `add` and `bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusPackage.java:75` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) bleepscript/src/main/java/bleepscript/Packaging.java:54— bleepscript/src/main/java/bleepscript/Packaging.java:54-61 | bleepscript/src/main/java/bleepscript/PublishOptions.java:18-25 — 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) snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:162— snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:162-169 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:182-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:162` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:191— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:191-198 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala:192-199 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D30 · Dependency Vulnerabilities· Medium CVE · ×11
Swallowed exception (caught, then discarded) scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:110— `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) scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:114— `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) bleep-core/src/scala/bleep/testing/JvmPool.scala:149— `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) bleep-core/src/scala/bleep/testing/JvmPool.scala:502— `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) bleep-core/src/scala/bleep/testing/JvmPool.scala:546— `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) bleep-core/src/scala/bleep/testing/JvmPool.scala:590— `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) bleep-core/src/scala/bleep/internal/gitOutput.scala:43— `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) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:975— `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) bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:549— `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) bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:556— `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) bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:571— `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.
TodoComment scripts/src/scala/bleep/scripts/It.scala:46— // todo: iterate more on integration test concept. sbt import hangs in CI and would be slow anyway — 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 bleep-tests/src/scala/bleep/RewriteSnapshotTest.scala:10— // todo: yes, this means that this test has a dependency upon the other tests. find a better way — 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 bleep-nosbt/src/scala/bleep/nosbt/InteractionService.scala:15— // TODO - Ask for input with autocomplete? — 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 bleep-nosbt/src/scala/bleep/nosbt/InteractionService.scala:19— // todo: mask password when typing — 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 bleep-model/src/scala/bleep/OsArch.scala:24— // todo: can we discover this without running a process? — 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 bleep-model/src/scala/bleep/model/Dep.scala:137— // todo: we now express this in configuration. also here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment bleep-model/src/scala/bleep/model/ProjectGlobs.scala:19— // todo: represent in project — 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 bleep-core/src/scala/bleep/FileWatching.scala:109— // todo: imperfect, but good enough for now — 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 bleep-core/src/scala/bleep/internal/FileUtils.scala:20— // todo: why? copied from scala-cli — 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 bleep-cli/src/scala/com/monovore/decline/Completer.scala:73— // todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (9 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:44— bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:44-52 | bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:72-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:44— bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:44-52 | bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:72-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:237— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:237-245 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:297-305 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1864— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1864-1872 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2411-2419 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1864` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1929— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1929-1937 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2447-2455 — both copies are in the same file, so extract the block into 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) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:683— bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:683-691 | bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:749-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:683` 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) bleep-core/src/scala/bleep/CoursierResolver.scala:207— bleep-core/src/scala/bleep/CoursierResolver.scala:207-215 | bleep-core/src/scala/bleep/CoursierResolver.scala:218-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4686— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4686-4694 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4753-4761 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4686` 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/requireJs.template.scala:29— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/requireJs.template.scala:29-37 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/requireJs.template.scala:30-38 — 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/requireJs.template.scala:29` 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) snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:261— snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:261-269 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:274-282 — both copies are in the same file, so extract the 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 `snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:261` 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.
TooManyMethods: MultiWorkspaceBspServer bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:62— TooManyMethods — 118 methods. The bar is 30 methods; this is 88 over it, 3.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ServerTopView bleep-cli/src/scala/bleep/commands/server/tui/ServerTopView.scala:30— 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: BleepMcpSession bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:141— 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: CompilerResolver bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:19— 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: BspMetrics bleep-bsp/src/scala/bleep/bsp/BspMetrics.scala:16— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ZincBridge bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:48— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.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: Main bleep-cli/src/scala/bleep/Main.scala:15— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: buildFromMavenPom bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:10— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (5 lines × 3) bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:962— bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:962-966 | bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:1045-1049 | bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:83-87 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:962` 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, `bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:961` calls `contains` and `bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:1044` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:246— bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:246-250 | bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:303-307 | bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:434-438 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:28— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:28-32 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:28-32 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:51— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:51-55 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:52-56 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:51-55 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:72— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:72-76 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:73-77 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:72-76 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:72` 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 × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:26— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:26-30 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:27-31 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:26-30 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:45— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:45-49 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:46-50 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:45-49 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.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 4 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 `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:55— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:55-59 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:56-60 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:55-59 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.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 4 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.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the function that made it · ×8
Disposable created and abandoned in the function that made it scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:229— `Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-core/src/scala/bleep/packaging/createJar.scala:29— `Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.forEachOrdered` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-cli/src/scala/bleep/commands/BuildProjectMergeInto.scala:93— `Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.forEach` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-cli/src/scala/bleep/commands/SetupIde.scala:40— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.toList` 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(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:690— `Files.walk(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.walk(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:929— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:758— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Disposable created and abandoned in the function that made it bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:113— `Files.list(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.iterator` 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(Files.list(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6
Members sharing a duplicated core (4 members, 50+ identical tokens) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:144— bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:144-219 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:450-528 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:654-728 | bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:759-780 — 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) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3946— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3946-4027 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4038-4126 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4137-4181 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4192-4246 — 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) bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:109— bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:109-137 | bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:255-345 | bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:121-337 | bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:43-331 — 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) bleepscript/src/main/java/bleepscript/ProjectPaths.java:15— bleepscript/src/main/java/bleepscript/ProjectPaths.java:15-24 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:23-41 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:96-107 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:113-121 — 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/script.template.scala:30— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/script.template.scala:30-39 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/style.template.scala:30-39 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/script.template.scala:31-40 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/style.template.scala:31-40 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:159— snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:159-171 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:179-191 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:258-270 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:271-283 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (14 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:183— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:183-196 | bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:227-240 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:183` 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) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:547— bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:547-560 | bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:753-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:547` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:561— bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:561-574 | bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:767-780 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:561` 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, `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:583` calls `getMethod`, `invoke` and `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:783` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:248— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:248-261 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:308-321 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:290— bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:290-303 | bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:309-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) bleep-tests/src/scala/bleep/ShowOutputIT.scala:35— bleep-tests/src/scala/bleep/ShowOutputIT.scala:35-48 | bleep-tests/src/scala/bleep/TestEnvPropagationIT.scala:55-68 — 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 `bleep-tests/src/scala/bleep/ShowOutputIT.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.
Duplicated block (10 lines × 2) bleep-cli/src/scala/bleep/Main.scala:662— bleep-cli/src/scala/bleep/Main.scala:662-671 | bleep-cli/src/scala/bleep/Main.scala:795-804 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/Main.scala:662` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleep-cli/src/scala/bleep/Main.scala:793` calls `getOrElse` and `bleep-cli/src/scala/bleep/Main.scala:661` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:494— bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:494-503 | bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:654-663 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:494` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) bleep-core/src/scala/bleep/BspQuery.scala:61— bleep-core/src/scala/bleep/BspQuery.scala:61-70 | bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:273-282 — 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 `bleep-core/src/scala/bleep/BspQuery.scala:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) scripts/src/scala/bleep/scripts/GenNativeImage.scala:189— scripts/src/scala/bleep/scripts/GenNativeImage.scala:189-198 | scripts/src/scala/bleep/scripts/GenNativeImage.scala:204-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:75— bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:75-84 | bleep-plugin-spring-boot/src/main/java/bleep/plugin/springboot/SpringBootRun.java:110-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 (10 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:19— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:19-28 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala:20-29 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:19` 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) bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:819— bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:819-831 | bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:853-865 — both copies are in the same file, so extract the 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 (13 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:70— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:70-82 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:437-449 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:432` calls `getKotlinJsCompiler`, `createDirectories` and `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:69` 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) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:106— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:106-118 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:484-496 — both copies are in the same file, so extract the 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, `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:480` calls `setField` and `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:92` 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 (13 lines × 2) bleep-cli/src/scala/bleep/Main.scala:907— bleep-cli/src/scala/bleep/Main.scala:907-919 | bleep-cli/src/scala/bleep/Main.scala:925-937 — both copies are in the same file, so extract the 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 `bleep-cli/src/scala/bleep/Main.scala:907` 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) bleep-tests/src/scala/bleep/QuarkusMyappIT.scala:97— bleep-tests/src/scala/bleep/QuarkusMyappIT.scala:97-109 | bleep-tests/src/scala/bleep/SpringBootMyappIT.scala:106-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:46— bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:46-57 | bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:46-57 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:46` 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) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:327— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:327-338 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:392-403 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) bleep-core/src/scala/bleep/CoursierResolver.scala:507— bleep-core/src/scala/bleep/CoursierResolver.scala:507-518 | bleep-core/src/scala/bleep/CoursierResolver.scala:573-584 — both copies are in the same file, so extract the 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 `bleep-core/src/scala/bleep/CoursierResolver.scala:507` 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) bleep-core/src/scala/bleep/commands/Run.scala:138— bleep-core/src/scala/bleep/commands/Run.scala:138-149 | bleep-core/src/scala/bleep/commands/Run.scala:170-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-core/src/scala/bleep/commands/Run.scala:138` 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) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:827— bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:827-838 | bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:845-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 `bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:827` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:956— bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:956-961 | bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:1040-1045 | bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:78-83 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:956` 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, `bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:962` calls `contains` and `bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:1046` 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) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:132— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:132-137 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:516-521 | bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:388-393 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:132` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:516— bleep-core/src/scala/bleep/testing/BuildDisplay.scala:516-521 | bleep-core/src/scala/bleep/testing/BuildDisplay.scala:552-557 | bleep-core/src/scala/bleep/testing/BuildDisplay.scala:575-580 — 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 `bleep-core/src/scala/bleep/testing/BuildDisplay.scala:516` 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 × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:19— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:19-24 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:20-25 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:19-24 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:19` 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 × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:66— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:66-71 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:67-72 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:66-71 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:66` 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 locations) bleep-site/src/pages/index.js:491— bleep-site/src/pages/index.js:491 · bleep-site/src/pages/why.js:490 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (8 lines × 2 locations) bleep-site/src/pages/index.js:580— bleep-site/src/pages/index.js:580 · bleep-site/src/pages/index.js:949 — both copies are in the same file, so extract the block into 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 locations) bleep-site/src/pages/index.js:940— bleep-site/src/pages/index.js:940 · bleep-site/src/pages/why.js:929 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (8 lines × 2 locations) bleep-site/src/pages/why.js:401— bleep-site/src/pages/why.js:401 · bleep-site/src/pages/why.js:417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2 locations) bleep-site/src/pages/why.js:620— bleep-site/src/pages/why.js:620 · bleep-site/src/pages/why.js: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.
FixmeComment bleep-core/src/scala/bleep/depcheck/SbtUpdateReport.scala:96— // FIXME Shouldn't we only keep the configurations pulling dependency? — 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 bleep-core/src/scala/bleep/depcheck/SbtUpdateReport.scala:99— // FIXME Set better values here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment bleep-core/src/scala/bleep/depcheck/SbtUpdateReport.scala:245— // FIXME Likely flaky... — 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 bleep-core/src/scala/bleep/depcheck/UpdateRun.scala:66— // FIXME Order by config topologically? — 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.
FunctionTooLong: index.AgentsSection bleep-site/src/pages/index.js:995— FunctionTooLong — AgentsSection runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: why.AgentEraSection bleep-site/src/pages/why.js:855— FunctionTooLong — AgentEraSection runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: why.SimplicitySection bleep-site/src/pages/why.js:552— FunctionTooLong — SimplicitySection runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.Hero bleep-site/src/pages/index.js:116— FunctionTooLong — Hero runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (21 lines × 2) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:452— bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:452-472 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:656-676 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:452` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:96— bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:96-116 | bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:120-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) bleep-model/src/scala/bleep/Lazy.scala:77— bleep-model/src/scala/bleep/Lazy.scala:77-97 | bleep-model/src/scala/bleep/Lazy.scala:141-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-model/src/scala/bleep/Lazy.scala:77` 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 (21 lines × 2) bleep-bsp-tests/src/scala/bleep/analysis/PlatformTestHelper.scala:128— bleep-bsp-tests/src/scala/bleep/analysis/PlatformTestHelper.scala:128-148 | bleep-bsp-tests/src/scala/bleep/analysis/PlatformTestHelper.scala:203-223 — both copies are in the same file, so extract the 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 `bleep-bsp-tests/src/scala/bleep/analysis/PlatformTestHelper.scala:128` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:215— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:215-231 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:599-615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2093— bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2093-2109 | bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2113-2129 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2093` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:5024— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:5024-5040 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:5045-5061 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) bleep-core/src/scala/bleep/AnnotationProcessorResolver.scala:68— bleep-core/src/scala/bleep/AnnotationProcessorResolver.scala:68-84 | bleep-core/src/scala/bleep/SymbolProcessorResolver.scala:170-186 — 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 `bleep-core/src/scala/bleep/AnnotationProcessorResolver.scala:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:288— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:288-298 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:363-373 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:288` 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) bleep-model/src/scala/bleep/FetchGoogleJavaFormat.scala:14— bleep-model/src/scala/bleep/FetchGoogleJavaFormat.scala:14-24 | bleep-model/src/scala/bleep/FetchKtfmt.scala:14-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) bleep-bsp/src/scala/bleep/bsp/KotlinTestRunner.scala:496— bleep-bsp/src/scala/bleep/bsp/KotlinTestRunner.scala:496-506 | bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestRunner.scala:117-127 — 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 `bleep-bsp/src/scala/bleep/bsp/KotlinTestRunner.scala:496` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) bleep-tests/src/scala/bleep/LocalDirCacheIT.scala:18— bleep-tests/src/scala/bleep/LocalDirCacheIT.scala:18-28 | bleep-tests/src/scala/bleep/RemoteCacheIT.scala:27-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 3) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:237— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:237-244 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:620-627 | bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:321-328 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:135— bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:135-142 | bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:227-234 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:462-469 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:17— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:17-24 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:18-25 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:17-24 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:17` 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 × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:17— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:17-24 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:18-25 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:17-24 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:17` 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.
Sync-over-async blocking bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:739— `executeTest` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs.
Sync-over-async blocking bleep-core/src/scala/bleep/testing/JvmPool.scala:759— `getOrCreate` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs.
Sync-over-async blocking bleep-core/src/scala/bleep/testing/JvmPool.scala:1082— `release` is async and calls unsafeRunSync — a blocking call inside async code stalls the execution-context thread, and every future or fiber scheduled on it for as long as it runs.
Sync-over-async blocking bleep-site/scripts/snippet-extractor-plugin.js:10— `execFileSync` in `loadContent` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
MethodTooLong: ResolveProjects.resolveProject bleep-core/src/scala/bleep/ResolveProjects.scala:189— MethodTooLong — resolveProject runs 336 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 236 over it, 3.36× 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: SbtUpdateReport.moduleReports bleep-core/src/scala/bleep/depcheck/SbtUpdateReport.scala:132— MethodTooLong — moduleReports runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× 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: mineTemplates.apply bleep-model/src/scala/bleep/templates/mineTemplates.scala:100— MethodTooLong — apply runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (29 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:646— bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:646-674 | bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:808-836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:646` 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, `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:676` calls `printStackTrace` and `bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:837` 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 (29 lines × 2) bleep-tests/src/scala/bleep/ScalaJsJUnitIT.scala:13— bleep-tests/src/scala/bleep/ScalaJsJUnitIT.scala:13-42 | bleep-tests/src/scala/bleep/ScalaJsTestScriptsIT.scala:9-37 — 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 (29 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/defaultFieldConstructor.template.scala:29— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/defaultFieldConstructor.template.scala:29-57 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/defaultFieldConstructor.template.scala:30-58 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/defaultFieldConstructor.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/defaultFieldConstructor.template.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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/defaultFieldConstructor.template.scala:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1980— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1980-1997 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2817-2834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:115— bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:115-132 | bleep-plugin-spring-boot/src/main/java/bleep/plugin/springboot/SpringBootRun.java:163-180 — 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 `bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusRun.java:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/input.template.scala:18— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/input.template.scala:18-35 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/input.template.scala:19-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) bleep-cli/src/scala/bleep/commands/PublishSetup.scala:251— bleep-cli/src/scala/bleep/commands/PublishSetup.scala:251-265 | bleep-cli/src/scala/bleep/commands/PublishSetup.scala:296-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 `bleep-cli/src/scala/bleep/commands/PublishSetup.scala:251` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15 lines × 2) bleep-plugin-spring-boot/src/main/java/bleep/plugin/springboot/SpringBootRepackage.java:194— bleep-plugin-spring-boot/src/main/java/bleep/plugin/springboot/SpringBootRepackage.java:194-208 | bleep-plugin-spring-boot/src/main/java/bleep/plugin/springboot/SpringBootRun.java:182-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) bleep-bsp-tests/src/scala/bleep/analysis/BspTestHarness.scala:685— bleep-bsp-tests/src/scala/bleep/analysis/BspTestHarness.scala:685-699 | bleep-bsp-tests/src/scala/bleep/analysis/BspTestHarness.scala:746-760 — both copies are in the same file, so extract the block into 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 × 3) bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:129— bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:129-137 | bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:298-306 | bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:324-332 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:139` calls `javaRecipe`, `Some`, `jvmPlatform` and `bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:308` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:79— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:79-87 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:80-88 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:79-87 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:79` 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) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:46— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:46-54 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:47-55 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:46-54 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/reverseRouter.template.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:453— bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:453-459 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:657-663 | bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:762-768 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:769` calls `filter`, `isRegularFile`, `PlainVirtualFile` and `bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:460` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) bleepscript/src/main/java/bleepscript/ProjectPaths.java:17— bleepscript/src/main/java/bleepscript/ProjectPaths.java:17-23 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:31-37 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:99-105 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) bleepscript/src/main/java/bleepscript/ResolvedProject.java:32— bleepscript/src/main/java/bleepscript/ResolvedProject.java:32-38 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:100-106 | bleepscript/src/main/java/bleepscript/ResolvedProject.java:114-120 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleepscript/src/main/java/bleepscript/ResolvedProject.java:97` calls `requireNonNull` and `bleepscript/src/main/java/bleepscript/ResolvedProject.java: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 (16 lines × 2 locations) bleep-site/src/components/HomepageFeatures/index.js:23— bleep-site/src/components/HomepageFeatures/index.js:23 · bleep-site/src/components/HomepageFeatures/index.js:49 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (16 lines × 2 locations) bleep-site/src/pages/index.js:1179— bleep-site/src/pages/index.js:1179 · bleep-site/src/pages/why.js:686 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (16 lines × 2 locations) bleep-site/src/pages/why.js:543— bleep-site/src/pages/why.js:543 · bleep-site/src/pages/why.js:1001 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:954— bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:954-1011 | bleep-bsp/src/scala/bleep/analysis/CompilerResolver.scala:1035-1061 — 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) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/checkbox.template.scala:27— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/checkbox.template.scala:27-41 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/checkbox.template.scala:28-42 — 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.
Duplicated block (19 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:39— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:39-57 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:39-57 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:39` 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, `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:59` calls `loadClass` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:61` 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 (19 lines × 2) bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:372— bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:372-390 | bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:446-464 — both copies are in the same file, so extract the 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 `bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:372` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–14 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:302— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:302-315 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:630-641 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–14 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1878— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1878-1891 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2423-2434 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1878` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2080— bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2080-2091 | bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2121-2133 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2080` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12–13 lines × 2) bleep-bsp/src/scala/bleep/bsp/KotlinTestRunner.scala:358— bleep-bsp/src/scala/bleep/bsp/KotlinTestRunner.scala:358-370 | bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestRunner.scala:72-83 — 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 `bleep-bsp/src/scala/bleep/bsp/KotlinTestRunner.scala:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–13 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1824— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1824-1836 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2373-2383 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1824` 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, `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1838` calls `kotlinJsModuleKind` and `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2388` 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–13 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1845— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1845-1857 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2394-2404 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1845` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:700— bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:700-711 | bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1076-1086 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–12 lines × 2) bleep-cli/src/scala/bleep/commands/server/ServerKill.scala:57— bleep-cli/src/scala/bleep/commands/server/ServerKill.scala:57-68 | bleep-cli/src/scala/bleep/commands/server/ServerRestart.scala:53-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/commands/server/ServerKill.scala:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) bleep-bsp/src/scala/bleep/analysis/Compiler.scala:279— bleep-bsp/src/scala/bleep/analysis/Compiler.scala:279-289 | bleep-bsp/src/scala/bleep/analysis/Compiler.scala:301-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) bleep-core/src/scala/bleep/BspQuery.scala:25— bleep-core/src/scala/bleep/BspQuery.scala:25-34 | bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:213-223 — 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 `bleep-core/src/scala/bleep/BspQuery.scala:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:46— bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:46-53 | bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:74-81 | bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:46-53 | bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:74-81 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:46` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 4) bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:127— bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:127-134 | bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:296-303 | bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:275-282 | bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:322-329 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11 lines × 3) bleepscript/src/main/java/bleepscript/CodegenTarget.java:1— bleepscript/src/main/java/bleepscript/CodegenTarget.java:1-11 | bleepscript/src/main/java/bleepscript/Dep.java:1-50 | bleepscript/src/main/java/bleepscript/ResolvedJvm.java:1-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `bleepscript/src/main/java/bleepscript/CodegenTarget.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:25— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:25-35 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:26-36 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:25-35 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Members sharing a duplicated core (13 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (13 members, 50+ identical tokens) snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25— snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/converter/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/doobie/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/http4s/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/javaparser/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/pekko/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/playframework/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/sbt-ci-release/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/sbt-dynver/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/sbt/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/scalameta/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/tapir/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 | snapshot-tests/zio/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:25-33 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
Members sharing a duplicated core (13 members, 50+ identical tokens) snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35— snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/converter/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/doobie/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/http4s/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/javaparser/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/pekko/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/playframework/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/sbt-ci-release/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/sbt-dynver/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/sbt/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/scalameta/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/tapir/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 | snapshot-tests/zio/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:35-46 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
Duplicated block (10 lines × 6) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:17— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:17-26 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:17-26 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:18-27 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:18-27 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:17-26 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:17-26 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.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 4 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 `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:17` 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 × 6) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:18— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:18-27 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/todo.template.scala:18-27 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/unauthorized.template.scala:18-27 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/error.template.scala:19-28 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/todo.template.scala:19-28 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/unauthorized.template.scala:19-28 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/error.template.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:18` 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.
Low cohesion: ProjectDigestTest (LCOM4 5) bleep-tests/src/scala/bleep/ProjectDigestTest.scala:10— ProjectDigestTest'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: AnalysisDedupMeasurementTest (LCOM4 4) bleep-bsp-tests/src/scala/bleep/analysis/AnalysisDedupMeasurementTest.scala:32— AnalysisDedupMeasurementTest'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.
Duplicated block (13 lines × 3 locations) bleep-site/src/components/HomepageFeatures/index.js:6— bleep-site/src/components/HomepageFeatures/index.js:6 · bleep-site/src/components/HomepageFeatures/index.js:28 · bleep-site/src/components/HomepageFeatures/index.js:51 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 3 locations) bleep-site/src/pages/index.js:306— bleep-site/src/pages/index.js:306 · bleep-site/src/pages/why.js:552 · bleep-site/src/pages/why.js:1010 — the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) bleep-site/src/pages/index.js:677— bleep-site/src/pages/index.js:677 · bleep-site/src/pages/index.js:958 — both copies are in the same file, so extract the block into 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 locations) bleep-site/src/pages/why.js:326— bleep-site/src/pages/why.js:326 · bleep-site/src/pages/why.js:958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Weak hash algorithm bleep-core/src/scala/bleep/ProjectDigest.scala:268— 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 bleep-nosbt/src/scala/bleep/nosbt/io/Hash.scala:66— 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.
X13 · Undrained process stream· Redirected process stream is never drained (deadlock) · ×2
Redirected process stream is never drained (deadlock) bleep-core/src/scala/bleep/MachineMemory.scala:63— The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `p.getInputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `p.getErrorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a thread or `Future` per stream), merge them with `redirectErrorStream(true)` before `start()`, discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`), or use `scala.sys.process`, which pumps both.
Redirected process stream is never drained (deadlock) bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:125— The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.getInputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.getErrorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a thread or `Future` per stream), merge them with `redirectErrorStream(true)` before `start()`, discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`), or use `scala.sys.process`, which pumps both.
MultiWorkspaceBspServer.handleTest (cyclomatic 107) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2331— MultiWorkspaceBspServer.handleTest has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskDag.executor (cyclomatic 106) bleep-bsp/src/scala/bleep/bsp/TaskDag.scala:1049— TaskDag.executor has cyclomatic complexity 106 (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.
BuildStateReducer.reduce (cyclomatic 88) bleep-core/src/scala/bleep/testing/BuildState.scala:190— BuildStateReducer.reduce has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServerMetrics.generateHtml (cyclomatic 87) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:152— ServerMetrics.generateHtml has cyclomatic complexity 87 (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.
BuildDisplayImpl.printSideEffects (cyclomatic 75) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:873— BuildDisplayImpl.printSideEffects 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.
ReactiveBsp.runWithBleepBsp (cyclomatic 73) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:305— ReactiveBsp.runWithBleepBsp has cyclomatic complexity 73 (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.
BuildSummary.formatSummary (cyclomatic 71) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:246— BuildSummary.formatSummary has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExportMaven.run (cyclomatic 67) scripts/src/scala/bleep/scripts/ExportMaven.scala:174— ExportMaven.run has cyclomatic complexity 67 (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.
MultiWorkspaceBspServer.consumeEvents (cyclomatic 56) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4490— MultiWorkspaceBspServer.consumeEvents has cyclomatic complexity 56 (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.
ResolveProjects.resolveProject (cyclomatic 56) bleep-core/src/scala/bleep/ResolveProjects.scala:189— ResolveProjects.resolveProject has cyclomatic complexity 56 (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.
MultiWorkspaceBspServer.handleCompile (cyclomatic 51) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1770— MultiWorkspaceBspServer.handleCompile has cyclomatic complexity 51 (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.
ServerTopUpdate.update (cyclomatic 51) bleep-cli/src/scala/bleep/commands/server/tui/ServerTopState.scala:250— ServerTopUpdate.update has cyclomatic complexity 51 (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.
FancyBuildDisplay.runLoop (cyclomatic 41) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:240— FancyBuildDisplay.runLoop has cyclomatic complexity 41 (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.
summarise-bsp-metrics.summarise (cyclomatic 41) .github/scripts/summarise-bsp-metrics.py:46— summarise-bsp-metrics.summarise 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.
FancyBuildDisplay.processEvent (cyclomatic 39) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:419— FancyBuildDisplay.processEvent 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.
Main.builtinBuildOpts (cyclomatic 35) bleep-cli/src/scala/bleep/Main.scala:304— Main.builtinBuildOpts has cyclomatic complexity 35 (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.
buildFromBloopFiles.apply (cyclomatic 31) bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:36— buildFromBloopFiles.apply has cyclomatic complexity 31 (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.
CompileDisplayImpl.handle (cyclomatic 31) bleep-core/src/scala/bleep/commands/CompileDisplay.scala:85— CompileDisplayImpl.handle 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.
BuildPatch.apply (cyclomatic 31) bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:19— BuildPatch.apply has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
BspServerDaemon.runWithLock (cyclomatic 30) bleep-bsp/src/scala/bleep/bsp/BspServerDaemon.scala:198— BspServerDaemon.runWithLock has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
mineTemplates.apply (cyclomatic 27) bleep-model/src/scala/bleep/templates/mineTemplates.scala:100— mineTemplates.apply has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
QuarkusAppModel.buildSpec (cyclomatic 27) bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java:204— QuarkusAppModel.buildSpec 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.
ZincBridge.compileOnce (cyclomatic 26) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:532— ZincBridge.compileOnce 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.
FancyBuildDisplay.renderSummary (cyclomatic 26) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:672— FancyBuildDisplay.renderSummary 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.
ScalaNative05Bridge.linkBlocking (cyclomatic 24) bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:30— ScalaNative05Bridge.linkBlocking has cyclomatic complexity 24 (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.
EcjCompiler.run (cyclomatic 24) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:1553— EcjCompiler.run 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.
MultiWorkspaceBspServer.compileProject (cyclomatic 24) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3204— MultiWorkspaceBspServer.compileProject has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MultiWorkspaceBspServer.dispatchMethod (cyclomatic 31) 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.
ProjectLock.acquireLock (cyclomatic 23) bleep-bsp/src/scala/bleep/bsp/ProjectLock.scala:92— ProjectLock.acquireLock 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.
buildFromBloopFiles.importDeps (cyclomatic 23) bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:341— buildFromBloopFiles.importDeps has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TranscriptDiff.mechanicalCompile (cyclomatic 23) bleep-core/src/scala/bleep/history/TranscriptDiff.scala:296— TranscriptDiff.mechanicalCompile 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.
BuildDisplayImpl.printCompileSummary (cyclomatic 23) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:1149— BuildDisplayImpl.printCompileSummary has cyclomatic complexity 23 (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.
JUnitXmlCollector.handle (cyclomatic 22) bleep-core/src/scala/bleep/testing/JUnitXmlReport.scala:221— JUnitXmlCollector.handle 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.
ReactiveBsp.executeBspRequest (cyclomatic 21) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:707— ReactiveBsp.executeBspRequest has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TranscriptFormat.formatTestResult (cyclomatic 21) bleep-core/src/scala/bleep/history/TranscriptFormat.scala:264— TranscriptFormat.formatTestResult 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.
ZincBridge.loadAndValidateManifest (cyclomatic 20) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:300— ZincBridge.loadAndValidateManifest 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.
ZincBridge.createInputs (cyclomatic 20) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:1098— ZincBridge.createInputs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
LinkExecutor.doKotlinJsLink (cyclomatic 20) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:331— LinkExecutor.doKotlinJsLink 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.
LinkExecutor.doKotlinNativeLink (cyclomatic 20) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:478— LinkExecutor.doKotlinNativeLink 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.
TranscriptDiff.mechanicalTest (cyclomatic 20) bleep-core/src/scala/bleep/history/TranscriptDiff.scala:193— TranscriptDiff.mechanicalTest 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.
BuildSummary.toEither (cyclomatic 20) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:126— BuildSummary.toEither 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.
KotlinJsCompiler.compileDirect (cyclomatic 18) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:61— KotlinJsCompiler.compileDirect has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KotlinJsLinker.linkBlocking (cyclomatic 18) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:424— KotlinJsLinker.linkBlocking 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.
ScalaNative04Bridge.linkBlocking (cyclomatic 18) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:30— ScalaNative04Bridge.linkBlocking has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
JsonRpcTransport.readMessageTyped (cyclomatic 18) bleep-bsp/src/scala/bleep/bsp/JsonRpcTransport.scala:280— JsonRpcTransport.readMessageTyped has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Completer.completeOpts (cyclomatic 18) bleep-cli/src/scala/com/monovore/decline/Completer.scala:8— Completer.completeOpts 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.
ReactiveBsp.runOnce (cyclomatic 18) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:151— ReactiveBsp.runOnce 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.
FancyBuildDisplay.buildProjectPane (cyclomatic 18) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:876— FancyBuildDisplay.buildProjectPane 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.
Platform.intersect (cyclomatic 18) bleep-model/src/scala/bleep/model/Platform.scala:57— Platform.intersect has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Platform.removeAll) 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.
Platform.removeAll (cyclomatic 18) bleep-model/src/scala/bleep/model/Platform.scala:86— Platform.removeAll has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Platform.intersect) 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.
nameTemplates.hints (cyclomatic 18) bleep-model/src/scala/bleep/templates/nameTemplates.scala:105— nameTemplates.hints 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.
BspStress.run (cyclomatic 18) scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:77— BspStress.run has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
KotlinSourceCompiler.compileIncremental (cyclomatic 17) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:467— KotlinSourceCompiler.compileIncremental 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.
ParallelProjectCompiler.buildProjects (cyclomatic 17) bleep-bsp/src/scala/bleep/analysis/ParallelProjectCompiler.scala:116— ParallelProjectCompiler.buildProjects 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.
BleepBuildConverter.detectLanguage (cyclomatic 17) bleep-bsp/src/scala/bleep/bsp/BleepBuildConverter.scala:97— BleepBuildConverter.detectLanguage 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.
MultiWorkspaceBspServer.consumeCompileEvents (cyclomatic 17) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4706— MultiWorkspaceBspServer.consumeCompileEvents 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. This is NOT this file's highest cyclomatic complexity: MultiWorkspaceBspServer.dispatchMethod (cyclomatic 31) 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.
BleepMcpSession.heartbeat (cyclomatic 17) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1125— BleepMcpSession.heartbeat 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.
Main.maybeRunWithDifferentVersion (cyclomatic 17) bleep-cli/src/scala/bleep/Main.scala:1387— Main.maybeRunWithDifferentVersion 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.
BspRifle.ensureRunning (cyclomatic 17) bleep-core/src/scala/bleep/bsp/BspRifle.scala:74— BspRifle.ensureRunning has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
FetchBleepRelease.fetchRelease (cyclomatic 17) bleep-model/src/scala/bleep/FetchBleepRelease.scala:35— FetchBleepRelease.fetchRelease 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.
MultiWorkspaceBspServer.handleInitialize (cyclomatic 16) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:467— MultiWorkspaceBspServer.handleInitialize has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MultiWorkspaceBspServer.dispatchMethod (cyclomatic 31) 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.
MultiWorkspaceBspServer.validateLinkOptions (cyclomatic 16) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2137— MultiWorkspaceBspServer.validateLinkOptions has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: MultiWorkspaceBspServer.dispatchMethod (cyclomatic 31) 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.
BleepMcpSession.executeTest (cyclomatic 16) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:739— BleepMcpSession.executeTest has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BuildDiff.run (cyclomatic 16) bleep-cli/src/scala/bleep/commands/BuildDiff.scala:10— BuildDiff.run 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.
ServerTopLoop.run (cyclomatic 16) bleep-cli/src/scala/bleep/commands/server/tui/ServerTopLoop.scala:31— ServerTopLoop.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BleepDevDeps.resolveFromJvmClasspath (cyclomatic 16) bleep-core/src/scala/bleep/BleepDevDeps.scala:133— BleepDevDeps.resolveFromJvmClasspath 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.
Direct.direct (cyclomatic 16) bleep-core/src/scala/bleep/CoursierResolver.scala:263— Direct.direct 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.
ReactiveBsp.runInProcess (cyclomatic 16) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:232— ReactiveBsp.runInProcess has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BuildDisplayImpl.printCompileFailures (cyclomatic 16) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:1182— BuildDisplayImpl.printCompileFailures 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.
FancyBuildDisplay.renderUI (cyclomatic 16) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:571— FancyBuildDisplay.renderUI 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.
JvmPoolImpl.spawnJvm (cyclomatic 16) bleep-core/src/scala/bleep/testing/JvmPool.scala:844— JvmPoolImpl.spawnJvm 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.
YamlComments.print (cyclomatic 16) bleep-model/src/scala/bleep/internal/YamlComments.scala:229— YamlComments.print 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.
BuildPatch.removeFrom (cyclomatic 16) bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:230— BuildPatch.removeFrom 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.
MultiWorkspaceBspServer.handleTest (cognitive 712) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2331— MultiWorkspaceBspServer.handleTest has cognitive complexity 712 (threshold 15). Drivers by points: if/else 54 (309 pts), loops 30 (256 pts), match/switch 14 (119 pts), error handling 2 (16 pts), boolean chains 12 (nesting depth added 600). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReactiveBsp.runWithBleepBsp (cognitive 476) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:305— ReactiveBsp.runWithBleepBsp has cognitive complexity 476 (threshold 15). Drivers by points: loops 29 (318 pts), match/switch 13 (98 pts), if/else 11 (57 pts), boolean chains 2, error handling 1 (nesting depth added 420). 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.
TaskDag.executor (cognitive 406) bleep-bsp/src/scala/bleep/bsp/TaskDag.scala:1049— TaskDag.executor has cognitive complexity 406 (threshold 15). Drivers by points: loops 61 (334 pts), if/else 15 (37 pts), match/switch 11 (33 pts), boolean chains 2 (nesting depth added 317). 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.
MultiWorkspaceBspServer.handleCompile (cognitive 166) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1770— MultiWorkspaceBspServer.handleCompile has cognitive complexity 166 (threshold 15). Drivers by points: if/else 31 (60 pts), loops 12 (55 pts), match/switch 8 (46 pts), boolean chains 5 (nesting depth added 110). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BuildDisplayImpl.printCompileSummary (cognitive 164) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:1149— BuildDisplayImpl.printCompileSummary has cognitive complexity 164 (threshold 15). Drivers by points: loops 14 (105 pts), if/else 12 (57 pts), boolean chains 2 (nesting depth added 136). 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.
ServerMetrics.generateHtml (cognitive 157) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:152— ServerMetrics.generateHtml has cognitive complexity 157 (threshold 15). Drivers by points: if/else 114 (143 pts), boolean chains 12, loops 1 (2 pts) (nesting depth added 30). 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.
BuildSummary.formatSummary (cognitive 151) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:246— BuildSummary.formatSummary has cognitive complexity 151 (threshold 15). Drivers by points: if/else 76 (141 pts), boolean chains 7, match/switch 3 (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BuildStateReducer.reduce (cognitive 122) bleep-core/src/scala/bleep/testing/BuildState.scala:190— BuildStateReducer.reduce has cognitive complexity 122 (threshold 15). Drivers by points: if/else 58 (91 pts), match/switch 10 (19 pts), boolean chains 12 (nesting depth added 42). 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.
BuildDisplayImpl.printSideEffects (cognitive 106) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:873— BuildDisplayImpl.printSideEffects has cognitive complexity 106 (threshold 15). Drivers by points: if/else 49 (88 pts), match/switch 5 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 49). 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.
BleepMcpSession.executeTest (cognitive 97) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:739— BleepMcpSession.executeTest has cognitive complexity 97 (threshold 15). Drivers by points: loops 14 (96 pts), if/else 1 (nesting depth added 82). 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.
ExportMaven.run (cognitive 94) scripts/src/scala/bleep/scripts/ExportMaven.scala:174— ExportMaven.run has cognitive complexity 94 (threshold 15). Drivers by points: if/else 44 (55 pts), match/switch 20 (32 pts), boolean chains 6, loops 1 (nesting depth added 23). 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.
ResolveProjects.resolveProject (cognitive 92) bleep-core/src/scala/bleep/ResolveProjects.scala:189— ResolveProjects.resolveProject has cognitive complexity 92 (threshold 15). Drivers by points: if/else 46 (58 pts), match/switch 15 (24 pts), boolean chains 10 (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.
ReactiveBsp.runInProcess (cognitive 78) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:232— ReactiveBsp.runInProcess has cognitive complexity 78 (threshold 15). Drivers by points: loops 14 (77 pts), error handling 1 (nesting depth added 63). 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.
CompileDisplayImpl.handle (cognitive 67) bleep-core/src/scala/bleep/commands/CompileDisplay.scala:85— CompileDisplayImpl.handle has cognitive complexity 67 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 10 (28 pts), match/switch 4 (9 pts), boolean chains 1 (nesting depth added 36). 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.
BuildDisplayImpl.printCompileFailures (cognitive 67) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:1182— BuildDisplayImpl.printCompileFailures has cognitive complexity 67 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 8 (31 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompileDisplayImpl.printSummary (cognitive 65) bleep-core/src/scala/bleep/commands/CompileDisplay.scala:157— CompileDisplayImpl.printSummary has cognitive complexity 65 (threshold 15). Drivers by points: loops 10 (55 pts), if/else 2 (10 pts) (nesting depth added 53). 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.
summarise-bsp-metrics.summarise (cognitive 61) .github/scripts/summarise-bsp-metrics.py:46— summarise-bsp-metrics.summarise has cognitive complexity 61 (threshold 15). Drivers by points: if/else 24 (34 pts), loops 8 (16 pts), boolean chains 6, ternaries 2 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FancyBuildDisplay.runLoop (cognitive 60) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:240— FancyBuildDisplay.runLoop has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 7 (23 pts), boolean chains 7, loops 3 (5 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BuildPatch.apply (cognitive 60) bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:19— BuildPatch.apply has cognitive complexity 60 (threshold 15). Drivers by points: match/switch 13 (40 pts), if/else 9 (17 pts), boolean chains 3 (nesting depth added 35). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
FetchBleepSnapshot.apply (cognitive 58) bleep-model/src/scala/bleep/FetchBleepSnapshot.scala:211— FetchBleepSnapshot.apply has cognitive complexity 58 (threshold 15). Drivers by points: loops 8 (52 pts), match/switch 3 (6 pts) (nesting depth added 47). 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.
BspServerDaemon.runWithLock (cognitive 57) bleep-bsp/src/scala/bleep/bsp/BspServerDaemon.scala:198— BspServerDaemon.runWithLock has cognitive complexity 57 (threshold 15). Drivers by points: error handling 17 (31 pts), if/else 11 (21 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JvmPoolImpl.shutdown (cognitive 57) bleep-core/src/scala/bleep/testing/JvmPool.scala:1025— JvmPoolImpl.shutdown has cognitive complexity 57 (threshold 15). Drivers by points: loops 9 (45 pts), error handling 2 (8 pts), if/else 1 (4 pts) (nesting depth added 45). 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.
QuarkusAppModel.buildSpec (cognitive 50) bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java:204— QuarkusAppModel.buildSpec has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 13 (18 pts), ternaries 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.
ParallelProjectCompiler.buildProjects (cognitive 47) bleep-bsp/src/scala/bleep/analysis/ParallelProjectCompiler.scala:116— ParallelProjectCompiler.buildProjects has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 7 (16 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.
BleepMcpSession.executeCompile (cognitive 46) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:675— BleepMcpSession.executeCompile has cognitive complexity 46 (threshold 15). Drivers by points: loops 9 (45 pts), if/else 1 (nesting depth added 36). 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.
FancyBuildDisplay.renderSummary (cognitive 46) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:672— FancyBuildDisplay.renderSummary has cognitive complexity 46 (threshold 15). Drivers by points: if/else 27 (37 pts), match/switch 5, boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BleepMcpSession.compileForRun (cognitive 45) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1064— BleepMcpSession.compileForRun has cognitive complexity 45 (threshold 15). Drivers by points: loops 9 (45 pts) (nesting depth added 36). 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.
mineTemplates.apply (cognitive 45) bleep-model/src/scala/bleep/templates/mineTemplates.scala:100— mineTemplates.apply has cognitive complexity 45 (threshold 15). Drivers by points: match/switch 10 (22 pts), if/else 12 (20 pts), boolean chains 2, loops 1 (nesting depth added 20). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
LinkExecutor.doKotlinNativeLink (cognitive 44) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:478— LinkExecutor.doKotlinNativeLink has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 22). 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.
BleepMcpSession.heartbeat (cognitive 43) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1125— BleepMcpSession.heartbeat has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 5 (15 pts), loops 2 (3 pts), boolean chains 1 (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.
MultiWorkspaceBspServer.consumeEvents (cognitive 42) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4490— MultiWorkspaceBspServer.consumeEvents has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 10 (25 pts), if/else 9 (11 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
buildFromBloopFiles.apply (cognitive 41) bleep-cli/src/scala/bleep/sbtimport/buildFromBloopFiles.scala:36— buildFromBloopFiles.apply has cognitive complexity 41 (threshold 15). Drivers by points: if/else 27 (30 pts), match/switch 9, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProjectLock.acquireLock (cognitive 38) bleep-bsp/src/scala/bleep/bsp/ProjectLock.scala:92— ProjectLock.acquireLock has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 5 (13 pts), match/switch 3 (4 pts), boolean chains 2 (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.
BspStress.run (cognitive 37) scripts-dev/src/scala/bleep/scripts/dev/BspStress.scala:77— BspStress.run has cognitive complexity 37 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 10, match/switch 2 (3 pts), error handling 2, boolean chains 1 (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.
BuildDisplay.createFancyWithState (cognitive 36) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:1240— BuildDisplay.createFancyWithState has cognitive complexity 36 (threshold 15). Drivers by points: loops 8 (36 pts) (nesting depth added 28). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ServerTopUpdate.update (cognitive 35) bleep-cli/src/scala/bleep/commands/server/tui/ServerTopState.scala:250— ServerTopUpdate.update has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 9 (25 pts), if/else 4 (7 pts), boolean chains 3 (nesting depth added 19). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
ServerTopLoop.run (cognitive 34) bleep-cli/src/scala/bleep/commands/server/tui/ServerTopLoop.scala:31— ServerTopLoop.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (8 pts), match/switch 2 (7 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Direct.direct (cognitive 34) bleep-core/src/scala/bleep/CoursierResolver.scala:263— Direct.direct has cognitive complexity 34 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 11 (14 pts), match/switch 3, boolean chains 1, error handling 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.
TranscriptDiff.mechanicalCompile (cognitive 34) bleep-core/src/scala/bleep/history/TranscriptDiff.scala:296— TranscriptDiff.mechanicalCompile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23 (33 pts), match/switch 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.
Platform.intersect (cognitive 34) bleep-model/src/scala/bleep/model/Platform.scala:57— Platform.intersect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 34. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Platform.removeAll) 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.
Platform.removeAll (cognitive 34) bleep-model/src/scala/bleep/model/Platform.scala:86— Platform.removeAll has cognitive complexity 34 (threshold 15). Drivers by points: if/else 34. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Platform.intersect) 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.
ZincBridge.loadAndValidateManifest (cognitive 33) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:300— ZincBridge.loadAndValidateManifest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiWorkspaceBspServer.makeCompileAdmission (cognitive 33) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:2217— MultiWorkspaceBspServer.makeCompileAdmission has cognitive complexity 33 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (11 pts), if/else 2 (7 pts) (nesting depth added 24). 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.
BuildSummary.toEither (cognitive 33) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:126— BuildSummary.toEither has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FancyBuildDisplay.buildTestPane (cognitive 33) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1039— FancyBuildDisplay.buildTestPane has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (32 pts), match/switch 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.
EcjCompiler.run (cognitive 32) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:1553— EcjCompiler.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6, error handling 4 (5 pts), loops 1, 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.
ChildProcessDiagnostics.parseJstackOutput (cognitive 32) bleep-core/src/scala/bleep/internal/ChildProcessDiagnostics.scala:167— ChildProcessDiagnostics.parseJstackOutput has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (10 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.
ZincBridge.compileOnce (cognitive 31) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:532— ZincBridge.compileOnce has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, error handling 4, match/switch 3 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LinkExecutor.doKotlinJsLink (cognitive 30) bleep-bsp/src/scala/bleep/bsp/LinkExecutor.scala:331— LinkExecutor.doKotlinJsLink has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 3 (6 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.
ServerLs.renderText (cognitive 30) bleep-cli/src/scala/bleep/commands/server/ServerLs.scala:95— ServerLs.renderText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 4 (9 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.
ReactiveBsp.executeBspRequest (cognitive 30) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:707— ReactiveBsp.executeBspRequest has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (15 pts), match/switch 5 (11 pts), if/else 3 (4 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.
KotlinNativeProjectCompiler.compileKotlinNative (cognitive 29) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:649— KotlinNativeProjectCompiler.compileKotlinNative has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), error handling 3 (9 pts), boolean chains 4 (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.
templatize.string (cognitive 29) bleep-model/src/scala/bleep/model/Replacements.scala:17— templatize.string has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 2 (8 pts), loops 2 (3 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.
KotlinJsCompiler.compileDirect (cognitive 28) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:61— KotlinJsCompiler.compileDirect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), error handling 4, boolean chains 3 (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.
KotlinJsProjectCompiler.compileKotlinJs (cognitive 28) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:445— KotlinJsProjectCompiler.compileKotlinJs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, error handling 2 (6 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.
ProcessRunner.runWithOutput (cognitive 28) bleep-bsp/src/scala/bleep/bsp/ProcessRunner.scala:105— ProcessRunner.runWithOutput has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (21 pts), match/switch 1 (7 pts) (nesting depth added 21). 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.
BleepMcpSession.runProject (cognitive 28) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1000— BleepMcpSession.runProject has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (7 pts) (nesting depth added 20). 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.
MachineResources.retuneLoop (cognitive 28) bleep-core/src/scala/bleep/MachineResources.scala:390— MachineResources.retuneLoop has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (20 pts), if/else 3 (7 pts), match/switch 1 (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.
JvmPool.create (cognitive 28) bleep-core/src/scala/bleep/testing/JvmPool.scala:185— JvmPool.create has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 2 (7 pts) (nesting depth added 20). 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.
ParallelProjectCompiler.buildValidDag (cognitive 27) bleep-bsp/src/scala/bleep/analysis/ParallelProjectCompiler.scala:84— ParallelProjectCompiler.buildValidDag has cognitive complexity 27 (threshold 15). Drivers by points: loops 4 (10 pts), match/switch 2 (10 pts), if/else 2 (6 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.
ZincBridge.createInputs (cognitive 27) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:1098— ZincBridge.createInputs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (15 pts), match/switch 6 (7 pts), error handling 1 (3 pts), boolean chains 2 (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.
KotlinJsLinker.linkBlocking (cognitive 26) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:424— KotlinJsLinker.linkBlocking has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, error handling 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KotlinSourceCompiler.applyCompilerOptions (cognitive 26) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:864— KotlinSourceCompiler.applyCompilerOptions has cognitive complexity 26 (threshold 15). Drivers by points: error handling 4 (10 pts), match/switch 4 (9 pts), if/else 3 (5 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScalaNative05Bridge.linkBlocking (cognitive 26) bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:30— ScalaNative05Bridge.linkBlocking has cognitive complexity 26 (threshold 15). Drivers by points: error handling 9 (12 pts), if/else 9 (10 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BomPins.apply (cognitive 26) bleep-core/src/scala/bleep/BomPins.scala:33— BomPins.apply has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 6 (8 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MachineResources.reclaimDeadProcesses (cognitive 26) bleep-core/src/scala/bleep/MachineResources.scala:133— MachineResources.reclaimDeadProcesses has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), match/switch 2 (6 pts), if/else 2 (5 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BspRifle.ensureRunning (cognitive 26) bleep-core/src/scala/bleep/bsp/BspRifle.scala:74— BspRifle.ensureRunning has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 4 (7 pts), error handling 3 (6 pts) (nesting depth added 7). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
JUnitXmlCollector.handle (cognitive 26) bleep-core/src/scala/bleep/testing/JUnitXmlReport.scala:221— JUnitXmlCollector.handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 4 (8 pts), boolean chains 2 (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.
BuildPatch.removeFrom (cognitive 26) bleep-model/src/scala/bleep/rewrites/BuildPatch.scala:230— BuildPatch.removeFrom has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 5 (9 pts), boolean chains 3 (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.
generateBuildFromMaven.apply (cognitive 25) bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:12— generateBuildFromMaven.apply has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FancyBuildDisplay.renderUI (cognitive 25) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:571— FancyBuildDisplay.renderUI has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 2, loops 1 (2 pts), 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.
KotlinSourceCompiler.compileIncremental (cognitive 24) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:467— KotlinSourceCompiler.compileIncremental has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2, error handling 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.
ServerTopView.serverListLine (cognitive 24) bleep-cli/src/scala/bleep/commands/server/tui/ServerTopView.scala:250— ServerTopView.serverListLine has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 1, match/switch 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.
YamlComments.print (cognitive 24) bleep-model/src/scala/bleep/internal/YamlComments.scala:229— YamlComments.print has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (17 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FancyBuildDisplay.processEvent (cognitive 23) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:419— FancyBuildDisplay.processEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 6 (7 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.
BleepBuildConverter.detectLanguage (cognitive 22) bleep-bsp/src/scala/bleep/bsp/BleepBuildConverter.scala:97— BleepBuildConverter.detectLanguage has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 5 (7 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.
TranscriptFormat.formatTestResult (cognitive 22) bleep-core/src/scala/bleep/history/TranscriptFormat.scala:264— TranscriptFormat.formatTestResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 4, 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.
FancyBuildDisplay.buildProjectPane (cognitive 22) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:876— FancyBuildDisplay.buildProjectPane has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenCliDocs.renderBody (cognitive 22) scripts-dev/src/scala/bleep/scripts/dev/GenCliDocs.scala:305— GenCliDocs.renderBody has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (21 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.
BspMetrics.initialize (cognitive 21) bleep-bsp/src/scala/bleep/bsp/BspMetrics.scala:111— BspMetrics.initialize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 3 (6 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiWorkspaceBspServer.compileProject (cognitive 21) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3204— MultiWorkspaceBspServer.compileProject has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, match/switch 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
MultiWorkspaceBspServer.handleCleanCache (cognitive 21) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:5172— MultiWorkspaceBspServer.handleCleanCache has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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.
SubprocessRunner.run (cognitive 21) bleep-cli/src/scala-3/bleep/mcp/SubprocessRunner.scala:70— SubprocessRunner.run has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (6 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MachineResources.acquire (cognitive 21) bleep-core/src/scala/bleep/MachineResources.scala:46— MachineResources.acquire has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (6 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BuildDiff.formatCompileDiff (cognitive 21) bleep-core/src/scala/bleep/testing/BuildDiff.scala:80— BuildDiff.formatCompileDiff has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompileScheduler.create (cognitive 21) bleep-core/src/scala/bleep/testing/CompileScheduler.scala:125— CompileScheduler.create has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), match/switch 3 (10 pts), if/else 1 (nesting depth added 13). 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.
StackTraceCycles.collapseFrameCycles (cognitive 21) bleep-core/src/scala/bleep/testing/StackTraceCycles.scala:64— StackTraceCycles.collapseFrameCycles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 6 (9 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KotlinProjectCompiler.compileKotlin (cognitive 20) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:139— KotlinProjectCompiler.compileKotlin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiWorkspaceBspServer.handleJavacOptions (cognitive 20) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4991— MultiWorkspaceBspServer.handleJavacOptions has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 2 (8 pts), if/else 2 (6 pts), loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceGenRunner.runScripts (cognitive 20) bleep-bsp/src/scala/bleep/bsp/SourceGenRunner.scala:270— SourceGenRunner.runScripts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (7 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.
Main.builtinBuildOpts (cognitive 20) bleep-cli/src/scala/bleep/Main.scala:304— Main.builtinBuildOpts has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 13 (14 pts), if/else 5, boolean chains 1 (nesting depth added 1). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BuildProjectRename.run (cognitive 20) bleep-cli/src/scala/bleep/commands/BuildProjectRename.scala:8— BuildProjectRename.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 6 (9 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProjectDigest.hashDirectories (cognitive 20) bleep-core/src/scala/bleep/ProjectDigest.scala:134— ProjectDigest.hashDirectories has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TarGz.unpack (cognitive 20) bleep-core/src/scala/bleep/TarGz.scala:52— TarGz.unpack has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Publish.renderDryRun (cognitive 20) bleep-core/src/scala/bleep/commands/Publish.scala:111— Publish.renderDryRun has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 2, 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.
Push.run (cognitive 20) bleep-core/src/scala/bleep/commands/RemoteCache.scala:109— Push.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Run.runOnce (cognitive 20) bleep-core/src/scala/bleep/commands/Run.scala:36— Run.runOnce has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (19 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.
TranscriptDiff.mechanicalTest (cognitive 20) bleep-core/src/scala/bleep/history/TranscriptDiff.scala:193— TranscriptDiff.mechanicalTest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 6 (8 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KotlinNative.intersect (cognitive 20) bleep-model/src/scala/bleep/model/KotlinNative.scala:43— KotlinNative.intersect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (KotlinNative.removeAll) 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.
KotlinNative.removeAll (cognitive 20) bleep-model/src/scala/bleep/model/KotlinNative.scala:57— KotlinNative.removeAll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (KotlinNative.intersect) 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.
Options.splitEither (cognitive 20) bleep-model/src/scala/bleep/model/Options.scala:53— Options.splitEither has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, 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.
AppModelAssembler.resolveConditionalDependencies (cognitive 20) bleep-quarkus/src/main/java/bleep/quarkus/AppModelAssembler.java:315— AppModelAssembler.resolveConditionalDependencies has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClasspathAnalyzer.extractKotlinMetadata (cognitive 19) bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala:390— ClasspathAnalyzer.extractKotlinMetadata has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 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.
KotlinNativeCompiler.compileBlocking (cognitive 19) bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:112— KotlinNativeCompiler.compileBlocking has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 5, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ZincBridge.checkNoopFromDirs (cognitive 19) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:386— ZincBridge.checkNoopFromDirs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 2, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZincBridge.checkNoopManifest (cognitive 19) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:444— ZincBridge.checkNoopManifest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BspServerOperations.waitForServer (cognitive 19) bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:282— BspServerOperations.waitForServer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (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.
ReactiveBsp.runOnce (cognitive 19) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:151— ReactiveBsp.runOnce has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 6 (8 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.
SbtUpdateReport.moduleReports (cognitive 19) bleep-core/src/scala/bleep/depcheck/SbtUpdateReport.scala:132— SbtUpdateReport.moduleReports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 4, loops 1 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
VersionCombo.libraries (cognitive 19) bleep-model/src/scala/bleep/model/VersionCombo.scala:18— VersionCombo.libraries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), 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.
structureTemplates.extractCrossSetups (cognitive 19) bleep-model/src/scala/bleep/templates/structureTemplates.scala:152— structureTemplates.extractCrossSetups has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KotlinSourceCompiler.compile (cognitive 18) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:260— KotlinSourceCompiler.compile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 3 (4 pts), boolean chains 1, error handling 1 (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.
KotlinSourceCompiler.createMessageCollectorProxy (cognitive 18) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:944— KotlinSourceCompiler.createMessageCollectorProxy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ScalaNative04Bridge.linkBlocking (cognitive 18) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:30— ScalaNative04Bridge.linkBlocking has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4 (5 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
JsonRpcTransport.readMessageTyped (cognitive 18) bleep-bsp/src/scala/bleep/bsp/JsonRpcTransport.scala:280— JsonRpcTransport.readMessageTyped has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 5, loops 2, boolean chains 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.
MultiWorkspaceBspServer.handleCopyState (cognitive 18) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:656— MultiWorkspaceBspServer.handleCopyState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ServerTopView.summaryLines (cognitive 18) bleep-cli/src/scala/bleep/commands/server/tui/ServerTopView.scala:134— ServerTopView.summaryLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImportInputData.collectFromFileSystem (cognitive 18) bleep-cli/src/scala/bleep/sbtimport/ImportInputData.scala:147— ImportInputData.collectFromFileSystem has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (6 pts), boolean chains 5, match/switch 2 (4 pts), if/else 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BleepDevDeps.resolveFromJvmClasspath (cognitive 18) bleep-core/src/scala/bleep/BleepDevDeps.scala:133— BleepDevDeps.resolveFromJvmClasspath has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ReactiveBspClient.onBuildTaskProgress (cognitive 18) bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:900— ReactiveBspClient.onBuildTaskProgress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompilationReason.formatted (cognitive 18) bleep-core/src/scala/bleep/testing/BuildEvent.scala:41— CompilationReason.formatted has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), 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.
Project.removeAll (cognitive 18) bleep-model/src/scala/bleep/model/Project.scala:118— Project.removeAll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, match/switch 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.
KotlinJsCompiler.createMessageCollector (cognitive 17) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:320— KotlinJsCompiler.createMessageCollector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 1 (3 pts), 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. This shape REPEATS in the file: one other method here (KotlinJsLinker.createMessageCollector) 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.
KotlinJsLinker.createMessageCollector (cognitive 17) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:697— KotlinJsLinker.createMessageCollector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 1 (3 pts), 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. This shape REPEATS in the file: one other method here (KotlinJsCompiler.createMessageCollector) 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.
KotlinSourceCompiler.compileWithReflectionImpl (cognitive 17) bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.scala:718— KotlinSourceCompiler.compileWithReflectionImpl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2, boolean chains 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
KotlinProjectCompiler.compileJavaSources (cognitive 17) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:278— KotlinProjectCompiler.compileJavaSources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (6 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.
PortableAnalysisMappers.relativizePath (cognitive 17) bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:2213— PortableAnalysisMappers.relativizePath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (17 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MultiWorkspaceBspServer.handleInitialize (cognitive 17) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:467— MultiWorkspaceBspServer.handleInitialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, error handling 3 (5 pts), match/switch 4 (5 pts) (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.
runSbt.apply (cognitive 17) bleep-cli/src/scala/bleep/sbtimport/runSbt.scala:20— runSbt.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 2, boolean chains 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.
FancyBuildDisplay.renderScrollIndicator (cognitive 17) bleep-core/src/scala/bleep/testing/FancyBuildDisplay.scala:1332— FancyBuildDisplay.renderScrollIndicator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YamlComments.extract (cognitive 17) bleep-model/src/scala/bleep/internal/YamlComments.scala:132— YamlComments.extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 5 (7 pts), boolean chains 2 (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.
QuarkusDevRun.main (cognitive 17) bleep-quarkus/src/main/java/bleep/quarkus/QuarkusDevRun.java:36— QuarkusDevRun.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (5 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KotlinNativeProjectCompiler.doKotlinNativeCompile (cognitive 16) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:730— KotlinNativeProjectCompiler.doKotlinNativeCompile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (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.
ScalaNative04Bridge.createBuildLogger (cognitive 16) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:325— ScalaNative04Bridge.createBuildLogger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScalaNative05Bridge.createBuildLogger (cognitive 16) bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:390— ScalaNative05Bridge.createBuildLogger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerMetrics.findMetricsFile (cognitive 16) bleep-cli/src/scala/bleep/commands/ServerMetrics.scala:44— ServerMetrics.findMetricsFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
buildFromMavenPom.convertModule (cognitive 16) bleep-cli/src/scala/bleep/mavenimport/buildFromMavenPom.scala:114— buildFromMavenPom.convertModule has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TranscriptDiffRender.mechanicalTest (cognitive 16) bleep-core/src/scala/bleep/history/TranscriptDiffRender.scala:189— TranscriptDiffRender.mechanicalTest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DiffWatchBuildDisplayImpl.printDiffSideEffects (cognitive 16) bleep-core/src/scala/bleep/testing/BuildDisplay.scala:1316— DiffWatchBuildDisplayImpl.printDiffSideEffects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2 (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.
StackTraceElision.ownerOf (cognitive 16) bleep-core/src/scala/bleep/testing/StackTraceElision.scala:120— StackTraceElision.ownerOf has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 5 (7 pts) (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.
FetchBleepRelease.fetchRelease (cognitive 16) bleep-model/src/scala/bleep/FetchBleepRelease.scala:35— FetchBleepRelease.fetchRelease has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 2 (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.
Mapped.get (cognitive 16) bleep-model/src/scala/bleep/Lazy.scala:103— Mapped.get has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (6 pts), if/else 3 (5 pts), error handling 1 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
YamlComments.identity (cognitive 16) bleep-model/src/scala/bleep/internal/YamlComments.scala:110— YamlComments.identity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Project.intersect (cognitive 16) bleep-model/src/scala/bleep/model/Project.scala:87— Project.intersect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Near-duplicate member pair (116 shared lines) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:69— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:69-234 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:431-618 — These two members are variants of one another: 116 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (94 shared lines) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:38— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:38-224 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:38-294 — These two members are variants of one another: 94 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.
Duplicated block (49 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:123— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:123-171 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:507-555 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:123` 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 (36–39 lines × 2) bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:147— bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:147-185 | bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:214-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/commands/BuildCreateNew.scala:147` 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 (38 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:139— bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:139-176 | bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.scala:364-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (28–33 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:149— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:149-176 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:209-241 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:149` 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 (28–31 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:258— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:258-288 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:657-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:258` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (26–29 lines × 2) bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:34— bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:34-62 | bleep-cli/src/scala/bleep/commands/PublishSetup.scala:191-216 — before extracting anything, compare `bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala` and `bleep-cli/src/scala/bleep/commands/PublishSetup.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/commands/ConfigAuthSetup.scala:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–28 lines × 2) bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:184— bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:184-207 | bleep-cli/src/scala/bleep/sbtimport/generateBuild.scala:116-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24–27 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:326— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:326-352 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:702-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:326` 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 (27 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:339— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:339-365 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:404-430 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:339` 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–26 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:354— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:354-379 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:727-750 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:354` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:190— bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:190-213 | bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:574-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (3–24 lines × 3) bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:447— bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:447-470 | bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:317-319 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:436-459 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:447` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:446` calls `find`, `loadClass` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:317` 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 (23 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:70— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:70-92 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:72-94 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19–22 lines × 3) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3992— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3992-4013 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4161-4179 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4226-4244 — 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3992` 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 (22 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3997— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3997-4018 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4096-4117 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:3997` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16–19 lines × 2) bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:143— bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:143-158 | bleep-cli/src/scala/bleep/sbtimport/generateBuild.scala:66-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–18 lines × 2) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:498— bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:498-515 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:695-711 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:498` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–18 lines × 2) bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:124— bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:124-141 | bleep-cli/src/scala/bleep/commands/ExtractInfo.scala:196-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–17 lines × 2) bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4143— bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4143-4154 | bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4198-4214 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4143` 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, `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4155` calls `nodeBinaryFor`, `explodedProjects` and `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:4215` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 4) bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:80— bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:80-94 | bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala:58-72 | bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala:80-94 | bleep-bsp/src/scala/bleep/analysis/ScalaNativeRunner.scala:58-72 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaJsRunner.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/KotlinJsRunner.scala:80` 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–14 lines × 2) bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:134— bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:134-144 | bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala:192-205 — before extracting anything, compare `bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala` and `bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 225 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–11 lines × 2) bleep-core/src/scala/bleep/commands/SetupDevScript.scala:12— bleep-core/src/scala/bleep/commands/SetupDevScript.scala:12-20 | bleep-core/src/scala/bleep/commands/SetupDevScript.scala:22-32 — both copies are in the same file, so extract the block into 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–9 lines × 2) bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1361— bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1361-1367 | bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:903-911 — 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 `bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1361` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `bleep-core/src/scala/bleep/commands/ReactiveBsp.scala:902` calls `incrementAndGet` and `bleep-cli/src/scala-3/bleep/mcp/BleepMcpServer.scala:1360` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 2) bleep-core/src/scala/bleep/commands/Publish.scala:258— bleep-core/src/scala/bleep/commands/Publish.scala:258-264 | bleep-core/src/scala/bleep/commands/Publish.scala:325-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-core/src/scala/bleep/commands/Publish.scala:258` 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, `bleep-core/src/scala/bleep/commands/Publish.scala:321` calls `CredentialProvider`, `resolveTarget`, `MavenRemotePublisher` and `bleep-core/src/scala/bleep/commands/Publish.scala:257` 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 × 4) bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:152— bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:152-157 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:453-458 | bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:657-662 | bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:762-767 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:152` 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, `bleep-bsp/src/scala/bleep/analysis/ZincBridge.scala:769` calls `filter`, `isRegularFile`, `PlainVirtualFile` and `bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:460` 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 (20 lines × 2) bleepscript/src/main/java/bleepscript/LinkOptions.java:1— bleepscript/src/main/java/bleepscript/LinkOptions.java:1-34 | bleepscript/src/main/java/bleepscript/UserPaths.java:1-20 — 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 `bleepscript/src/main/java/bleepscript/LinkOptions.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Near-duplicate member family (12 members, 2 shared lines) · ×1
Near-duplicate member family (12 members, 2 shared lines) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:17— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:17-66 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:17-66 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/notFound.template.scala:17-66 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/todo.template.scala:17-67 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/unauthorized.template.scala:17-65 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/jsloader.template.scala:15-36 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/badRequest.template.scala:18-67 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/error.template.scala:18-67 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/notFound.template.scala:18-67 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/todo.template.scala:18-68 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/unauthorized.template.scala:18-66 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/jsloader.template.scala:16-37 — These 12 members are variants of one another: a block of 2 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 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 12 times.
D4 · Code Duplication· Near-duplicate member family (6 members, 17 shared lines) · ×1
Near-duplicate member family (6 members, 17 shared lines) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:16— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:16-71 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:16-66 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:17-72 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:17-67 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:16-71 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:16-66 — These 6 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Near-duplicate member family (6 members, 15 shared lines) · ×1
Near-duplicate member family (6 members, 15 shared lines) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:17— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:17-66 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/todo.template.scala:17-67 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/unauthorized.template.scala:17-65 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/error.template.scala:18-67 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/todo.template.scala:18-68 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/unauthorized.template.scala:18-66 — These 6 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 36 shared lines) · ×1
Near-duplicate member family (3 members, 36 shared lines) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:18— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:18-109 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:19-110 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/inject/twirl/forwardsRouter.template.scala:18-109 — These 3 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 19 shared lines) · ×1
Near-duplicate member family (3 members, 19 shared lines) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:16— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:16-38 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:17-39 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/routesPrefix.template.scala:16-38 — These 3 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 13 shared lines) · ×1
Near-duplicate member family (3 members, 13 shared lines) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:16— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:16-41 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:17-42 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javaWrappers.template.scala:16-41 — These 3 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Edited copy of a member (189 corresponding lines) · ×1
Edited copy of a member (189 corresponding lines) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:18— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:18-206 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala:19-207 — These two members are one piece of code written twice and then edited apart: 189 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (132 corresponding lines) · ×1
Edited copy of a member (132 corresponding lines) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala:18— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala:18-149 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devNotFound.template.scala:19-150 — These two members are one piece of code written twice and then edited apart: 132 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×1
Edited copy of a member (27 corresponding lines) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:37— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/select.template.scala:37-63 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/select.template.scala:38-64 — 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 (60 corresponding lines) · ×1
Edited copy of a member (60 corresponding lines) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:15— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:15-74 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/play20/manual.template.scala:16-75 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputDate.template.scala:26— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputDate.template.scala:26-37 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputFile.template.scala:26-37 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputPassword.template.scala:26-37 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/textarea.template.scala:26-37 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputDate.template.scala:27-38 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputFile.template.scala:27-38 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputPassword.template.scala:27-38 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/textarea.template.scala:27-38 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (32 lines × 2) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:16— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:16-47 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/play20/manual.template.scala:17-48 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/play20/manual.template.scala` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/play20/manual.template.scala:16` 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) bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestRunner.scala:643— bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestRunner.scala:643-658 | bleep-bsp/src/scala/bleep/bsp/ScalaNativeTestRunner.scala:663-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–15 lines × 2) bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:313— bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:313-324 | bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:517-531 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/TestRunner.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 (9 lines × 6) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:18— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:18-26 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala:19-28 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/notFound.template.scala:18-26 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/badRequest.template.scala:19-27 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devNotFound.template.scala:20-29 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/notFound.template.scala:19-27 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/badRequest.template.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:18` 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–8 lines × 2) bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:247— bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:247-252 | bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:420-427 — both copies are in the same file, so extract the 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 `bleep-bsp/src/scala/bleep/bsp/TestRunner.scala:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:162— snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:162-168 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:182-188 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:261-267 | snapshot-tests/scalameta/imported/scripts/resources/parsers@jvm3/sources/generated/TreeLifts.scala:274-280 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (2–5 lines × 16) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:28— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala:28-32 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devError.template.scala:30-34 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/devNotFound.template.scala:30-34 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/error.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/notFound.template.scala:28-32 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/todo.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/unauthorized.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/jsloader.template.scala:24-25 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/badRequest.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devError.template.scala:31-35 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/devNotFound.template.scala:31-35 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/error.template.scala:30-34 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/notFound.template.scala:29-33 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/todo.template.scala:30-34 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/unauthorized.template.scala:30-34 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/jsloader.template.scala:25-26 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/defaultpages/badRequest.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/defaultpages/badRequest.template.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/jsloader.template.scala:24` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 8) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputDate.template.scala:27— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputDate.template.scala:27-31 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputFile.template.scala:27-31 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputPassword.template.scala:27-31 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/textarea.template.scala:27-31 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputDate.template.scala:28-32 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputFile.template.scala:28-32 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/inputPassword.template.scala:28-32 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/textarea.template.scala:28-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/inputDate.template.scala:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 4) snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/script.template.scala:31— snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/script.template.scala:31-35 | snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/style.template.scala:31-35 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/script.template.scala:32-36 | snapshot-tests/playframework/imported/scripts/resources/play@jvm3/sources/views/html/helper/style.template.scala:32-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/playframework/imported/scripts/resources/play@jvm213/sources/views/html/helper/script.template.scala:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 6) snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:35— snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:35-41 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:34-40 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:36-42 | snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:35-41 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala:35-41 | snapshot-tests/playframework/imported/scripts/resources/sbt-routes-compiler/sources/play/routes/compiler/static/twirl/reverseRouter.template.scala:34-40 — before extracting anything, compare `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.scala` and `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm3/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.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 4 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 `snapshot-tests/playframework/imported/scripts/resources/play-routes-compiler@jvm213/sources/play/routes/compiler/static/twirl/javascriptReverseRouter.template.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 3) bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:373— bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:373-388 | bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:447-462 | bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:511-526 — 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 `bleep-test-runner/src/main/java/bleep/testing/runner/TestProtocol.java:373` 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 (8 lines × 13) snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39— snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/converter/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/doobie/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/http4s/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/javaparser/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/pekko/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/playframework/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/sbt-ci-release/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/sbt-dynver/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/sbt/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/scalameta/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/tapir/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 | snapshot-tests/zio/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39-46 — before extracting anything, compare `snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java` and `snapshot-tests/converter/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 13) snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29— snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/converter/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/doobie/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/http4s/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/javaparser/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/pekko/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/playframework/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/sbt-ci-release/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/sbt-dynver/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/sbt/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/scalameta/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/tapir/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 | snapshot-tests/zio/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29-33 — before extracting anything, compare `snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java` and `snapshot-tests/converter/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `snapshot-tests/bloop/imported/scripts/src/java/scripts/CopyImportedGeneratedFiles.java:29` 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.
M1 · Documentation (README)· README may be stale · ×1
README may be stale — 410 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
Duplicated block (120 lines × 2 locations) bleep-site/src/pages/index.js:14— bleep-site/src/pages/index.js:14 · bleep-site/src/pages/why.js:16 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (69 lines × 2 locations) bleep-site/src/pages/index.js:1327— bleep-site/src/pages/index.js:1327 · bleep-site/src/pages/why.js:1083 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (28 lines × 2 locations) bleep-site/src/pages/index.js:1287— bleep-site/src/pages/index.js:1287 · bleep-site/src/pages/why.js:1044 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (16 lines × 7 locations) bleep-site/src/pages/index.js:443— bleep-site/src/pages/index.js:443 · bleep-site/src/pages/index.js:541 · bleep-site/src/pages/index.js:691 · bleep-site/src/pages/index.js:907 · +3 more site(s) not listed — the 7 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 2 locations) bleep-site/src/pages/index.js:225— bleep-site/src/pages/index.js:225 · bleep-site/src/pages/why.js:206 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (13 lines × 2 locations) bleep-site/src/pages/index.js:190— bleep-site/src/pages/index.js:190 · bleep-site/src/pages/why.js:174 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (12 lines × 2 locations) bleep-site/src/pages/index.js:724— bleep-site/src/pages/index.js:724 · bleep-site/src/pages/index.js:758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 3 locations) bleep-site/src/pages/why.js:605— bleep-site/src/pages/why.js:605 · bleep-site/src/pages/why.js:624 · bleep-site/src/pages/why.js:644 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3 locations) bleep-site/src/pages/index.js:1144— bleep-site/src/pages/index.js:1144 · bleep-site/src/pages/why.js:817 · bleep-site/src/pages/why.js:944 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 4 locations) bleep-site/src/pages/index.js:325— bleep-site/src/pages/index.js:325 · bleep-site/src/pages/why.js:605 · bleep-site/src/pages/why.js:624 · bleep-site/src/pages/why.js:644 — the 4 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R3 · Large Files· bleep-site/src/pages/index.js · ×1
bleep-site/src/pages/index.js: 1347 lines of code bleep-site/src/pages/index.js:1— bleep-site/src/pages/index.js has 1347 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· bleep-site/src/pages/why.js · ×1
bleep-site/src/pages/why.js: 1105 lines of code bleep-site/src/pages/why.js:1— bleep-site/src/pages/why.js has 1105 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
No test or typecheck script — test ✗ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~147 LoC) bleep-site/src/components/HomepageFeatures/index.js— no import path from any entry point (6 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~128 LoC) bleep-site/src/components/Snippet/index.tsx— no import path from any entry point (6 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~40 LoC) bleep-site/src/components/AsciinemaPlayer.tsx— no import path from any entry point (6 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~30 LoC) bleep-site/src/components/PlainDetails/index.tsx— no import path from any entry point (6 application, 3 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unlisted import '@docusaurus/plugin-content-docs' bleep-site/sidebars.js:3— Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
Unlisted import '@docusaurus/types' bleep-site/docusaurus.config.js:13— Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
Unused dependency '@docusaurus/module-type-aliases' — Declared in bleep-site/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Duplicated predicate intellij-plugin/src/main/kotlin/build/bleep/intellij/actions/RefreshBspAction.kt:22— `project != null && BleepService.getInstance(project).isBleepProject` appears character-identically in 2 files — intellij-plugin/src/main/kotlin/build/bleep/intellij/actions/RefreshBspAction.kt, intellij-plugin/src/main/kotlin/build/bleep/intellij/actions/SetupIdeAction.kt. 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 bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala:172— `!isExcluded && scalaVersionMatches && platformMatches` appears character-identically in 2 files — bleep-cli/src/scala/bleep/mavenimport/generateBuildFromMaven.scala, bleep-cli/src/scala/bleep/sbtimport/generateBuild.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 bleep-bsp/src/scala/bleep/analysis/Compiler.scala:287— `Files.isRegularFile(p) && p.toString.endsWith(".class")` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/analysis/Compiler.scala, bleep-core/src/scala/bleep/commands/RemoteCache.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 bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:192— `cause != null && (cause.getClass.getName.contains("CompilationCanceled") || cause.isInstanceOf[InterruptedException])` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala, bleep-bsp/src/scala/bleep/analysis/KotlinNativeCompiler.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 bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:463— `cause != null && cause.isInstanceOf[InterruptedException]` appears character-identically in 3 files — bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala, bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala, bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.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 bleep-core/src/scala/bleep/ResolveProjects.scala:536— `j.scanForAnnotationProcessors.exists(_.scans) || j.annotationProcessors.values.nonEmpty` appears character-identically in 2 files — bleep-core/src/scala/bleep/ResolveProjects.scala, bleep-model/src/scala/bleep/BuildPaths.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 bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala:82— `java.nio.file.Files.exists(binary) && java.nio.file.Files.isExecutable(binary)` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/analysis/KotlinNativeRunner.scala, bleep-bsp/src/scala/bleep/analysis/ScalaNativeRunner.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 bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:1503— `java.scanForAnnotationProcessors.exists(_.scans) || java.annotationProcessors.values.nonEmpty` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala, bleep-core/src/scala/bleep/ResolveProjects.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 bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala:133— `m.getName == "exec" && m.getParameterCount == 3 && m.getParameterTypes()(0).getName == "org.jetbrains.kotlin.cli.common.messages.MessageColl…` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/analysis/KotlinJsCompiler.scala, bleep-bsp/src/scala/bleep/analysis/KotlinSourceCompiler.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 bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala:338— `m.getName == "result" && m.getParameterCount == 2` appears character-identically in 3 files — bleep-bsp/src/scala/bleep/analysis/ScalaJs1Bridge.scala, bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala, bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.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 bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala:287— `m.getName == methodName && m.getParameterCount == 1` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/analysis/ScalaNative04Bridge.scala, bleep-bsp/src/scala/bleep/analysis/ScalaNative05Bridge.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 bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala:748— `pathStr.endsWith(".klib") && Files.exists(path)` appears character-identically in 2 files — bleep-bsp/src/scala/bleep/analysis/ProjectCompiler.scala, bleep-bsp/src/scala/bleep/bsp/LinkExecutor.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 bleep-core/src/scala/bleep/testing/BuildState.scala:294— `status == TestStatus.Failed || status == TestStatus.Error` appears character-identically in 2 files — bleep-core/src/scala/bleep/testing/BuildState.scala, bleep-core/src/scala/bleep/testing/FancyBuildDisplay.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.
Silent fallback default in catch bleep-bsp-tests/src/scala/bleep/analysis/ScalaNativeLinkIntegrationTest.scala:246— `runCommand` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch bleep-core/src/scala/bleep/analysis/NoopManifestStore.scala:98— `hashContent` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch bleep-core/src/scala/bleep/bsp/BspServerOperations.scala:571— `directorySizeBytes` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch bleep-core/src/scala/bleep/testing/JvmPool.scala:502— `dumpThreads` swallows every exception into `Nil` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Silent fallback default in catch bleep-core/src/scala/bleep/testing/JvmPool.scala:590— `readExitLog` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch case or in the Scaladoc, and the row stops firing.
Fat interface: BleepscriptServices (16 abstract methods) bleepscript/src/main/java/bleepscript/BleepscriptServices.java:22— `BleepscriptServices` declares 16 abstract methods: `createJar`, `defaultManifestCreator`, `fetchClasspath`, `fetchSources`, `forCodegen`, `forScript`, `packageProject`, `packageProjects`, `parseDep`, `parseRelPath`, `publishToFolder`, `publishToLocalIvy`, `publishToLocalMaven`, `publishToResolver`, `runCli`, `signArtifacts`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: Commands (16 abstract methods) bleepscript/src/main/java/bleepscript/Commands.java:6— `Commands` declares 16 abstract methods under just 9 distinct name(s): `clean`, `compile`, `compile`, `link`, `link`, `publish`, `publish`, `publishLocal`, `publishLocal`, `publishSonatype`, `run`, `run`, `script`, `script`, `test`, `test`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 9 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: BspClient (21 abstract members) bleep-bsp-tests/src/scala/bleep/analysis/BspTestHarness.scala:170— `BspClient` declares 21 abstract members: `initialize`, `buildTargets`, `compile`, `compile`, `test`, `run`, `cleanCache`, `shutdown`, `link`, `compileAsync`, `compileAsync`, `testAsync`, `runAsync`, `cancelRequest`, `events`, `logMessages`, `diagnosticsByFile`, `clear`, `scalacOptions`, `javacOptions`, `rawRequest`. Counted over its ABSTRACT members — a `def` with no body or a `val`/`var` with no initializer, once per signature; concrete members, private and protected members, and members of a companion `object` are not counted, because no implementer is forced to write them. Those 21 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 1 of 452 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 452 of the 874 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: bleep-cli/src/scala/bleep/internal/Version.scala. 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.
Orphaned file bleep-cli/src/scala/bleep/internal/Version.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.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala:637— `handleInitialized` has an empty body — confirm it's an intentional no-op and not an unfinished method.
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.
No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
No SAST REDACTED:6— No static application security testing detected. For this repository's stack, add scalafix or scapegoat (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 29872 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling· Dependabot does not watch npm/maven/gradle/gitsubmodule · ×1
Dependabot does not watch npm/maven/gradle/gitsubmodule REDACTED:7— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `maven`, `gradle`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
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 463 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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 4 file(s) — `bleep-bsp/src/scala/bleep/analysis/ClasspathAnalyzer.scala`, `bleep-bsp/src/scala/bleep/bsp/MultiWorkspaceBspServer.scala`, `bleep-core/src/scala/bleep/packaging/GenLayout.scala`, `bleep-plugin-quarkus/src/main/java/bleep/plugin/quarkus/QuarkusAppModel.java` — so the PII/GDPR sweep did not cover them at all.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1b50d-3cd4-7749-a184-4d5ff354a398 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 57 · Warnings: 633 · Recommendations: 34 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 07-11-2026 @ 08:08 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.