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

twitter/rsc

Measured 26 October 2026, 07:09 UTC, at code version 5d8bbf8

No regression since the last survey

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

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

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

A medium codebase: 71,656 lines of product code in 8 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Production Readiness, 44

Findings by how serious they are

2 critical 863 serious 111 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 07:09 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

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

63of 63 dimensions measured by tools.
957of 976 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
63dimensions across 6 lenses, read from 71,656 lines of product code in 8 projects.
Chapters

Executive summary

twitter/rsc falls short of our standard for a preview release because we found no logging, tracing or health checks in the code. It scores 54 out of 100 and is rated Adequate, and both of its critical findings are security problems in the packages it uses.

Production Readiness, at 44, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 4 points. Adding a diagnostic log would lift Production Readiness itself, worth about 7 points. Raising Production Readiness to 62 would lift the score to about 60.

Two known security holes in the packages the code depends on can be used by attackers. Updating the vulnerable packages would close this risk.

The product code is 71,656 lines, about €71,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 44 · counts for 46%Maturity 54 · counts for 25%Code Health 61 · counts for 14%Performance 66 · counts for 8%Security and Compliance 82 · counts for 4%Architecture 90 · counts for 2%

If Production Readiness rose from 44 to 62, the lowest score rated Strong, the score would rise from 54 to about 60.

Code composition: what the lines of code are
Product code 98%Tests 2%
Fixed since the last survey: 46 findings

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

  • Async & latency hygiene · Sync-over-async blocking examples/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Future.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
  • Async & latency hygiene · Sync-over-async blocking examples/original/core/src/main/scala/com/twitter/util/Futures.scala
Rebuild cost: about €71,000 · Estimate
Cost to rebuild€24,000 to €120,000, for 395 to 1,252 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 54. 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.
SizeMedium: 71,656 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 4 points · Low effort · ADR Quality
2
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 7 points · Medium effort · Observability
3
Resolve the 80 Orphaned file finding(s) in Knowledge Freshness — start with Scopes.scala (3), Defns.scala (3), Tpts.scala (3).
Raises the score by about 4 points · Medium effort · Knowledge Freshness

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 €71,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 44 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.1 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 201 lines over the last 90 days, which is about 815 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch check check rsc rsc check->rsc scalasig scalasig rsc->scalasig scalafixInput scalafixInput scalafixOutput scalafixOutput scalafixRules scalafixRules scalafixRules->rsc scalap scalap scalap->scalasig tests tests tests->check tests->rsc tests->scalap

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.

124 modules, with 257 dependencies between them. 2 loops run through 34 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 rsc.checkoutline.Checker2 rsc.lexis3 rsc.checkbase.SettingsBase4 rsc.gensym5 rsc.parse6 rsc.pretty.Weights7 scala.meta.scalasig8 rsc.checkbytecode9 rsc.parse.java10 scala.meta.scalasig.highlevel11 rsc.classpath.javacp.Javacp12 rsc.classpath.scalacp13 rsc.semantics14 rsc.classpath.javacp15 rsc.classpath.scalacp.Symbols16 rsc.syntax17 rsc.classpath18 rsc.outline19 rsc.symtab20 scala.meta.internal.scalasig21 rsc.pretty22 rsc.rules.semantics23 rsc.symtab.Scopes24 rsc.input25 scala.meta.scalasig.lowlevel26 rsc.report27 rsc.rules.RscCompat28 rsc.scalasig29 rsc.checkbase30 rsc.parse.scala31 rsc.rules32 rsc.scalasig.Pickle33 rsc.scan.java34 rsc.checkoutline35 rsc.checkparse36 rsc.checkscalasig37 rsc.diffoutline38 rsc.scan.scala39 rsc.semanticdb40 rsc
1 rsc.checkoutline.Checker
2 rsc.lexis
3 rsc.checkbase.SettingsBase1
4 rsc.gensym11
5 rsc.parse1
6 rsc.pretty.Weights6
7 scala.meta.scalasig43
8 rsc.checkbytecode123
9 rsc.parse.java1112432
10 scala.meta.scalasig.highlevel6517512
11 rsc.classpath.javacp.Javacp35
12 rsc.classpath.scalacp14
13 rsc.semantics1212
14 rsc.classpath.javacp111
15 rsc.classpath.scalacp.Symbols121
16 rsc.syntax161122
17 rsc.classpath12
18 rsc.outline131110313123
19 rsc.symtab1112
20 scala.meta.internal.scalasig3821
21 rsc.pretty111616221
22 rsc.rules.semantics66214
23 rsc.symtab.Scopes1122
24 rsc.input14
25 scala.meta.scalasig.lowlevel654243132
26 rsc.report95433
27 rsc.rules.RscCompat2344
28 rsc.scalasig1124211
29 rsc.checkbase21
30 rsc.parse.scala1121104632
31 rsc.rules111122
32 rsc.scalasig.Pickle2112
33 rsc.scan.java12221
34 rsc.checkoutline111133
35 rsc.checkparse144
36 rsc.checkscalasig12334
37 rsc.diffoutline122
38 rsc.scan.scala122211
39 rsc.semanticdb114231511113
40 rsc11112221322521
Uses a module listed above itPart of a loopThe module itself
1 rsc.checkoutline.Checker2 rsc.lexis3 rsc.checkbase.SettingsBase4 rsc.gensym5 rsc.parse6 rsc.pretty.Weights7 scala.meta.scalasig8 rsc.checkbytecode9 rsc.parse.java10 scala.meta.scalasig.highlevel11 rsc.classpath.javacp.Javacp12 rsc.classpath.scalacp13 rsc.semantics14 rsc.classpath.javacp15 rsc.classpath.scalacp.Symbols16 rsc.syntax17 rsc.classpath18 rsc.outline19 rsc.symtab20 scala.meta.internal.scalasig21 rsc.pretty22 rsc.rules.semantics23 rsc.symtab.Scopes24 rsc.input25 scala.meta.scalasig.lowlevel26 rsc.report27 rsc.rules.RscCompat28 rsc.scalasig29 rsc.checkbase30 rsc.parse.scala31 rsc.rules32 rsc.scalasig.Pickle33 rsc.scan.java34 rsc.checkoutline35 rsc.checkparse36 rsc.checkscalasig37 rsc.diffoutline38 rsc.scan.scala39 rsc.semanticdb40 rscrsc.checkoutline.Checker1rsc.lexis2rsc.checkbase.SettingsBase3rsc.gensym4rsc.parse5rsc.pretty.Weights6scala.meta.scalasig7rsc.checkbytecode8rsc.parse.java9scala.meta.scalasig.highlevel10rsc.classpath.javacp.Javacp11rsc.classpath.scalacp12rsc.semantics13rsc.classpath.javacp14rsc.classpath.scalacp.Symbols15rsc.syntax16rsc.classpath17rsc.outline18rsc.symtab19scala.meta.internal.scalasig20rsc.pretty21rsc.rules.semantics22rsc.symtab.Scopes23rsc.input24scala.meta.scalasig.lowlevel25rsc.report26rsc.rules.RscCompat27rsc.scalasig28rsc.checkbase29rsc.parse.scala30rsc.rules31rsc.scalasig.Pickle32rsc.scan.java33rsc.checkoutline34rsc.checkparse35rsc.checkscalasig36rsc.diffoutline37rsc.scan.scala38rsc.semanticdb39rsc401111643123111243265175123514121211112116112212131110313123111238211116162216621411221465424313295433234411242112111211046321111222112122211111331441233412212221111423151111311112221322521+84 more modules (most-connected shown)

At a glance — Code Health · 61% · Adequate · gated by D2, X5 ·

At a glance — Architecture · 90% · Adequate · gated by D26 ·

At a glance — Maturity · 54% · Adequate · gated by D34, M2 ·

At a glance — Readiness · 44% · Adequate · gated by P2 ·

At a glance — Security · 82% · Adequate · gated by D36 ·

At a glance — Performance · 66% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures4High / Critical

Roadmap

Begin by implementing diagnostic logging with verbose flags to capture error paths, ensuring users can provide actionable bug reports. Simultaneously, address the lack of architectural documentation by creating an ADR folder and resolving the single missing ADR to record significant design decisions. Next, clean up knowledge freshness by removing or updating the eighty orphaned files, prioritizing Scopes, Defns, and Tpts. Finally, establish CI/CD gates to run the test suite and block merges until tests pass.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+4.3 ptsLowADR Quality
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.+6.6 ptsMediumObservability
Resolve the 80 Orphaned file finding(s) in Knowledge Freshness — start with Scopes.scala (3), Defns.scala (3), Tpts.scala (3).+4.3 ptsMediumKnowledge Freshness
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.+3.1 ptsMediumArchitecture documentation
Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.+2.1 ptsMediumCI/CD gates
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+2.1 ptsMediumRelease Hygiene
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.+1.9 ptsMediumDocumentation (README)
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.+1.8 ptsMediumNullable reference types

File quality

Per-file score 0–10 — a quality signature. Of 165 files carrying findings, judged against the Preview bar: 0% slop · 18% mixed · 82% near-clean.

FileScoreBandWorst signal
scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala5.7MixedCyclomatic Complexity: LsymOps.id (cyclomatic 18)
REDACTED5.8MixedDependency Vulnerabilities: High CVE: REDACTED
rsc/src/main/scala/rsc/pretty/TreeStr.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/outline/Outliner.scala6.0MixedExplicit Debt: FixmeComment
scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/semanticdb/Defns.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/scalasig/Pickle.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/semanticdb/Tpts.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/outline/Scheduler.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/parse/scala/Terms.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/classpath/scalacp/SymbolInformations.scala6.0MixedExplicit Debt: FixmeComment
scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/classpath/javacp/Javacp.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/parse/scala/Pats.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/semanticdb/Templates.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/semanticdb/Prefixes.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/classpath/scalacp/Symbols.scala6.0MixedExplicit Debt: FixmeComment
check/src/main/scala/rsc/checkoutline/Checker.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/outline/Synthesizer.scala6.0MixedExplicit Debt: FixmeComment
rsc/src/main/scala/rsc/outline/Env.scala6.0MixedExplicit Debt: FixmeComment

How the grades work

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

Critical — 2

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

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

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

Could not be resolved — 11

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 63 of 63 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 63 dimensions across the health lenses
D1D2D3D4D5D6D9D12D13D14D15D17D20D26D28D29D30D34D35D36D43AX10AX3AX4AX6AX8GD1IC1M1M2M3M4P1P10P2P3P6PF1PF2PF3S1X1X12X13X14X15X16X17X18X19X20X21X22X23X24X25X26X27X28X29X3X30X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1770b-11e0-7384-86ec-8eb19fa5b47b.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.scala) and this repository declares an sbt build (repository root, 7 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 (10 contributor(s) across 835 commit(s) sampled, automation and bot accounts excluded). One of them holds 83% of the history; the other 9 hold 1.9% 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.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 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 (project/plugins.sbt), 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.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a REDACTED scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • 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.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 46 further occurrence(s) are not listed individually; the score already reflects all 86.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

54 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TreeStr.impl at 219. A further 11 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 DupeTreeOps.dupe at 145 — they are counted neither in the figure above nor in this dimension's score. 5 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: rsc/src/main/scala/rsc/syntax/Dupe.scala (DupeTreeOps.dupe at 145), rsc/src/main/scala/rsc/pretty/Weights.scala (WeightTreeOps.weight at 78), scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/Tags.scala (EntryTagMappings.entryTag at 44), rsc/src/main/scala/rsc/scalasig/Key.scala (TypeKey.disambig at 16), scalasig/scalasig/src/main/scala/scala/meta/internal/data/DataClass.scala (DataClass.datum 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.

Scanner.decimalNumber (cyclomatic 20) · ×2rsc/src/main/scala/rsc/scan/java/Scanner.scala:155
Scanner.quote (cyclomatic 20) · ×2rsc/src/main/scala/rsc/scan/java/Scanner.scala:412
TreeStr.impl (cyclomatic 219)rsc/src/main/scala/rsc/pretty/TreeStr.scala:90
PrettyToken.pretty (cyclomatic 204)rsc/src/main/scala/rsc/pretty/PrettyToken.scala:17
ScalasigCodec.fromClassfile (cyclomatic 111)scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigCodec.scala:17

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

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with TreeStr.impl (cyclomatic 219), PrettyToken.pretty (cyclomatic 204), ScalasigCodec.fromClassfile (cyclomatic 111). — 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 4 together lifts Cyclomatic Complexity from 4.3 to about 6.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity3.5 / 10Weak✓ Tool-verified

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

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

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

80 method(s) exceeded the cognitive complexity threshold of 15; the worst was TreeStr.impl at 133.

Scanner.quote (cognitive 30) · ×2rsc/src/main/scala/rsc/scan/java/Scanner.scala:412
Scanner.decimalNumber (cognitive 27) · ×2rsc/src/main/scala/rsc/scan/java/Scanner.scala:155
Scanner.comment (cognitive 16) · ×2rsc/src/main/scala/rsc/scan/java/Scanner.scala:119
TreeStr.impl (cognitive 133)rsc/src/main/scala/rsc/pretty/TreeStr.scala:90
SemanticdbPrinter.pprint (cognitive 93)scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:24

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

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cognitive Complexity — start with TreeStr.impl (cognitive 133), SemanticdbPrinter.pprint (cognitive 93), ScalasigCodec.fromClassfile (cognitive 73). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cognitive Complexity from 3.5 to about 5.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.5 / 10Stronggated by 11 serious findings✓ Tool-verified

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

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

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

11 god class(es) detected.

FileTooLong: scalasig/Pickle.scala · ×8rsc/src/main/scala/rsc/scalasig/Pickle.scala
TooManyMethods: HardlinkOps · ×2rsc/src/main/scala/rsc/scalasig/Pickle.scala:573
ClassTooLong: TreeStrrsc/src/main/scala/rsc/pretty/TreeStr.scala:11

What to do

  1. Resolve the 8 FileTooLong finding(s) in God Classes — start with Pickle.scala, TreeStr.scala, ScalasigHighlevel.scala. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 2 TooManyMethods finding(s) in God Classes — start with Pickle.scala, Synthesizer.scala. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 ClassTooLong finding(s) in God Classes — start with TreeStr.scala. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication6.6 / 10Adequate✓ Tool-verified

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

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

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

494 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. 470 of the 517 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (8 lines × 2) · ×50check/src/main/scala/rsc/checkbytecode/Settings.scala:20
Duplicated block (5 lines × 2) · ×48rsc/src/main/scala/rsc/scan/java/Scanner.scala:27
Duplicated block (6 lines × 2) · ×43rsc/src/main/scala/rsc/outline/Synthesizer.scala:359
Duplicated block (9 lines × 2) · ×35rsc/src/main/scala/rsc/parse/java/Messages.scala:35
Duplicated block (10 lines × 2) · ×31rsc/src/main/scala/rsc/pretty/PrettyToken.scala:59

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

What to do

  1. Resolve the 50 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Activity.scala (14), Buf.scala (5), Promise.scala (4). — One of this dimension's main actionable groups (50 warning-level).
  2. Resolve the 48 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with Buf.scala (11), BufByteWriterImpl.scala (8), AsyncStream.scala (4). — One of this dimension's main actionable groups (48 warning-level).
  3. Resolve the 43 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with AsyncStream.scala (8), Buf.scala (5), ByteReader.scala (4). — One of this dimension's main actionable groups (43 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

8 production modules (sbt), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a dependsOn spread (deps: _*) and a project whose directory a helper computes are not visible there; 1 module(s) off the main sequence, with abstractness counted on 5 of the 8 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: scalasig

What to do

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

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

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

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

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

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

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

2 of 112 classes have LCOM4 above 3.

Low cohesion: Synthesizer (LCOM4 7) · ×2rsc/src/main/scala/rsc/outline/Synthesizer.scala:15

What to do

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

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

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

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

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

11 test methods: 11 unit, 0 integration, 0 BDD, 0 e2e. The Scala suite contributes 11 test case(s) across 5 file(s) in a test source set declaring at least one — every `test("…")`, `it("…")`, `property("…")` and `"…" in {…}` registration and every JUnit `@Test`, which is how munit, ScalaTest, utest, ZIO Test and specs2 declare a case; a case registered under a computed name is not counted, so this is a floor. Its tier split is INFERRED from paths and file names, except sbt's src/it source set, which the build declares.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D12 · Dependency Hygiene9.7 / 10Exemplary✓ Tool-verified

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

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

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

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

Outdated: ch.qos.logback:logback-classic · ×7

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 7 declared sbt dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the production coordinates this repository's 2 sbt build file(s) (REDACTED and project/*.scala) declare with a literal version, directly or through a string-literal val — `%%` resolved to the Scala binary suffix Central publishes under, test-scoped declarations excluded — the same declaration-site closure this analysis reads for dependency currency. sbt has no lockfile a checkout carries, so this is deliberately NOT the transitive closure. 16 further production coordinate(s) are declared with a version the build computes rather than writes as a literal — sbt is a program, and this pass does not run it — and are NOT graded: this verdict covers what the build pins literally or through a string-literal val, not the full graph.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt9.6 / 10Stronggated by 134 serious findings✓ Tool-verified

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

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

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

134 deducted task-comment markers across 71656 LoC (0.2/KLoC) → score 9.6. 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.

FixmeComment · ×123scalasig/scalap/src/main/scala/scala/meta/scalap/Settings.scala:30
TodoComment · ×11scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:133

What to do

  1. Resolve the 123 FixmeComment finding(s) in Explicit Debt — start with Checker.scala (37), RscCompat.scala (14), Pickle.scala (9). — One of this dimension's main actionable groups (123 warning-level).
  2. Resolve the 11 TodoComment finding(s) in Explicit Debt — start with AsyncMeter.scala (4), Var.scala (2), RscCompat.scala. — One of this dimension's main actionable groups (11 warning-level).
  3. 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.

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

1 of 1 build units (sbt) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

semgrep found no security issues.

✓ On the Gold path — maintain.

Detailed fixes: d29_recommendation.md.

D30 · Dependency Vulnerabilities8.8 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

2 finding(s): 0 critical, 2 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

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

D34 · Knowledge Freshness0.0 / 10Critical✓ Tool-verified

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

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

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

83 of 83 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is rsc/src/main/scala/rsc/scalasig/Pickle.scala. Counted over 83 of the 300 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×80rsc/src/main/scala/rsc/outline/Scheduler.scala:1
Most significant orphaned file · ×3rsc/src/main/scala/rsc/scalasig/Pickle.scala:1
Dormant codebase

What to do

  1. Resolve the 80 Orphaned file finding(s) in Knowledge Freshness — start with Scopes.scala (3), Defns.scala (3), Tpts.scala (3). — One of this dimension's main actionable groups (80 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Pickle.scala, ScalasigHighlevel.scala, TreeStr.scala. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: TreeStr.scala↔Dupe.scala 96%; Scheduler.scala↔Dupe.scala 58%

Change coupling: TreeStr.scala ↔ Dupe.scala · ×2rsc/src/main/scala/rsc/pretty/TreeStr.scala:1

What to do

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

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

D36 · Supply-chain Provenance & Signing3.3 / 10Weak✓ Tool-verified

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

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

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

1/3 supply-chain integrity signals present (provenance, signing, SBOM).

REDACTED
REDACTED

What to do

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

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

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

What to do

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

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

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

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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

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

AX6 · Interface segregation9.8 / 10Exemplary✓ Tool-verified

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

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

  • `ByteReader` declares 30 abstract members: `remaining`, `remainingUntil`, `process`, `process`, `readByte`, `readUnsignedByte`, `readShortBE`, `readShortLE`, `readUnsignedShortBE`, `readUnsignedShortLE`, `readMediumBE`, `readMediumLE`, `readUnsignedMediumBE`, `readUnsignedMediumLE`, `readIntBE`, `readIntLE`, `readUnsignedIntBE`, `readUnsignedIntLE`, `readLongBE`, `readLongLE`, `readUnsignedLongBE`, `readUnsignedLongLE`, `readFloatBE`, `readFloatLE`, `readDoubleBE`, `readDoubleLE`, `readBytes`, `readString`, `skip`, `readAll`. 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 30 declarations carry 29 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 29 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. (×2) — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:14, examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:17
  • `ByteWriter` declares 16 abstract members under just 15 distinct name(s): `writeString`, `writeBytes`, `writeBytes`, `writeByte`, `writeShortBE`, `writeShortLE`, `writeMediumBE`, `writeMediumLE`, `writeIntBE`, `writeIntLE`, `writeLongBE`, `writeLongLE`, `writeFloatBE`, `writeFloatLE`, `writeDoubleBE`, `writeDoubleLE`. 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. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 15 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. (×2) — examples/core/src/main/scala/com/twitter/io/ByteWriter.scala:25, examples/original/core/src/main/scala/com/twitter/io/ByteWriter.scala:28

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.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

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

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

GD1 · Unfinished & placeholder code9.8 / 10Exemplary✓ Tool-verified

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.

  • `resolveSuper` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. (×2) — rsc/src/main/scala/rsc/outline/Env.scala:117, rsc/src/main/scala/rsc/outline/Env.scala:122
  • `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. (×6) — rsc/src/main/scala/rsc/pretty/PrettyCompiler.scala:26, rsc/src/main/scala/rsc/pretty/PrettyEntry.scala:19, rsc/src/main/scala/rsc/pretty/PrettyEnv.scala:12, …

What to do

  • Finish or delete the members whose body is still `???` or a "not implemented" throw where nothing overrides them, and replace placeholder text before shipping.
IC1 · Incompleteness & stubs7.3 / 10Strong✓ Tool-verified

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.

  • `resolveSuper` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface. (×2) — rsc/src/main/scala/rsc/outline/Env.scala:117, rsc/src/main/scala/rsc/outline/Env.scala:122
  • `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface. (×6) — rsc/src/main/scala/rsc/pretty/PrettyCompiler.scala:26, rsc/src/main/scala/rsc/pretty/PrettyEntry.scala:19, rsc/src/main/scala/rsc/pretty/PrettyEnv.scala:12, …

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
M1 · Documentation (README)6.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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

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

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

What to do

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

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

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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

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

P1 · CI/CD gates5.0 / 10Adequate✓ Tool-verified

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.

  • A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.
  • A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.

What to do

  • Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
  • Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Keep implementation types off the public surface (Java: package-private (no modifier), or leave its package out of `module-info` exports) — even for a small library, every public type is a stability contract.
P2 · Observability0.0 / 10Critical✓ Tool-verified

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

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

  • No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.

What to do

  • Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
P3 · Security & performance tooling5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF1 · Benchmark discipline8.5 / 10Exemplary✓ Tool-verified

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

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

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

What to do

  • Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
PF2 · Allocation hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 1 use(s) across 27,080 production line(s) (~0.0/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
  • Scala: on hot paths, make small wrappers value classes (extends AnyVal), @specialized generic code over primitives, use primitive collections, and presize builders.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `join` is async and calls Await.result — 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. (×39) — examples/core/src/main/scala/com/twitter/util/Future.scala:307, examples/core/src/main/scala/com/twitter/util/Future.scala:316, examples/core/src/main/scala/com/twitter/util/Future.scala:326, …
  • `joinWith` is async and calls Await.result — 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. — examples/core/src/main/scala/com/twitter/util/Future.scala:2058

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.
S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Read from this repository's Scala source and the Java beside it: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves no HTTP of its own — no HTTP-server artifact (akka-http, pekko-http, http4s, Play, Finagle, zio-http, cask, Scalatra, a tapir server, Jetty, Undertow, …) outside test scope in its build, and no server package imported or server bound in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.

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

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

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.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X18 · Disposal-pattern correctness3.8 / 10Weak✓ Tool-verified

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

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

  • `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) — scalasig/scalasig/src/main/scala/scala/meta/scalasig/Binaries.scala:19, check/src/main/scala/rsc/checkbase/Fingerprint.scala:43
  • `new JarFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and it is held in `jar`, and every later use of `jar` in its block reads a member through it — it is never returned, passed, stored, captured by a lambda, reassigned or released, 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(new JarFile(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — scalasig/scalasig/src/main/scala/scala/meta/scalasig/Binaries.scala:33
  • `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`. — check/src/main/scala/rsc/checkbase/ToolUtil.scala:27

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.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

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

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

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

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

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` comprehension or `foreach` leaves the mutable collection it is walking alone — an `ArrayBuffer` or `ListBuffer` counts its changes and its iterator checks the count, an `ArrayDeque` (and `mutable.Queue`/`mutable.Stack`) is walked by index up to its starting length, and a `java.util` collection walked through `asScala` is fail-fast, so a body that adds to or removes from the very collection the loop is walking makes a later step throw `ConcurrentModificationException` (`IndexOutOfBoundsException` for a deque) and the remaining elements are never seen.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

What to do

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

Reference — by lens

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

LensScoreRatingImpact
Code Health61%Adequate — gated by D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture90%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity54%Adequate — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness44%Adequate — gated by P2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security82%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance66%StrongStrongest area.
Unscored — 1 check(s) recorded observations but carry no score

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

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

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

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 53 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Scala imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Scala code is a Play controller, a Cask routes object, a Scalatra servlet, a Finatra controller, an Akka/Pekko HTTP routes holder or a JSR-330/Spring singleton, so no instance is shared between request threads.
  • 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, a MongoDB or Cassandra driver, JDBC) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Slick table or in a SQL migration's CREATE TABLE or ALTER TABLE — and no database or data-store client (Slick, Doobie, Quill, ScalikeJDBC, Anorm, Skunk, JDBC, MongoDB, Cassandra, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~1188 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 — the .scala suite was found but not re-run
  • 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.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D21 Naming Consistency — Naming consistency is measured on C# only; Java, 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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .java, .scala, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • 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) — 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.
  • 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.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 456 value object(s); 4 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — 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
  • X2 Cancellation propagation — no C# was loaded; this repository's Scala and Java were read, and no request in it can be cancelled by a caller — a Scala request takes no token: a Future cannot be cancelled, and cats-effect, ZIO and Monix interrupt the fiber that made the request from outside the call, not through a parameter; a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter
  • 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 — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 2 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
Serious — 863 finding(s)
D17 · Explicit Debt · FixmeComment · ×123
  • FixmeComment scalasig/scalap/src/main/scala/scala/meta/scalap/Settings.scala:30 — // FIXME: https://github.com/twitter/rsc/issues/166
  • FixmeComment rsc/src/main/scala/rsc/settings/Settings.scala:20 — // FIXME: https://github.com/twitter/rsc/issues/166
  • FixmeComment check/src/main/scala/rsc/diffoutline/Settings.scala:12 — // FIXME: https://github.com/twitter/rsc/issues/166
  • FixmeComment check/src/main/scala/rsc/checkparse/Settings.scala:10 — // FIXME: https://github.com/twitter/rsc/issues/166
  • FixmeComment check/src/main/scala/rsc/checkoutline/Settings.scala:12 — // FIXME: https://github.com/twitter/rsc/issues/166
  • FixmeComment check/src/main/scala/rsc/checkbytecode/Settings.scala:17 — // FIXME: https://github.com/twitter/rsc/issues/166
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:69 — // FIXME: https://github.com/scalameta/scalameta/issues/1872
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:177 — // FIXME: https://github.com/twitter/rsc/issues/142
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:128 — // FIXME: https://github.com/twitter/rsc/issues/142
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:200 — // FIXME: https://github.com/twitter/rsc/issues/358
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:296 — // FIXME: https://github.com/scalameta/scalameta/issues/1725
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/semantics/Scopes.scala:124 — // FIXME: https://github.com/twitter/rsc/issues/318
  • FixmeComment scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:160 — // FIXME: https://github.com/twitter/rsc/issues/150
  • FixmeComment scalafix/output/src/main/scala/rsc/tests/RscCompat.scala:104 — // FIXME: https://github.com/twitter/rsc/issues/143
  • FixmeComment scalafix/input/src/main/scala/rsc/tests/RscCompat.scala:112 — // FIXME: https://github.com/twitter/rsc/issues/143
  • FixmeComment scalafix/output/src/main/scala/rsc/tests/RscCompat.scala:109 — // FIXME: https://github.com/twitter/rsc/issues/145
  • FixmeComment scalafix/input/src/main/scala/rsc/tests/RscCompat.scala:117 — // FIXME: https://github.com/twitter/rsc/issues/145
  • FixmeComment scalafix/output/src/main/scala/rsc/tests/RscCompat.scala:120 — // FIXME: https://github.com/twitter/rsc/issues/317
  • FixmeComment scalafix/input/src/main/scala/rsc/tests/RscCompat.scala:128 — // FIXME: https://github.com/twitter/rsc/issues/317
  • FixmeComment scalafix/output/src/main/scala/rsc/tests/RscCompat.scala:129 — // FIXME: https://github.com/twitter/rsc/issues/144
  • FixmeComment scalafix/input/src/main/scala/rsc/tests/RscCompat.scala:137 — // FIXME: https://github.com/twitter/rsc/issues/144
  • FixmeComment scalafix/output/src/main/scala/rsc/tests/RscCompat.scala:176 — // FIXME: https://github.com/scalameta/scalameta/issues/1872#issuecomment-498705622
  • FixmeComment scalafix/input/src/main/scala/rsc/tests/RscCompat.scala:184 — // FIXME: https://github.com/scalameta/scalameta/issues/1872#issuecomment-498705622
  • FixmeComment rsc/src/main/scala/rsc/syntax/Trees.scala:406 — // FIXME: https://github.com/twitter/rsc/issues/81
  • FixmeComment rsc/src/main/scala/rsc/syntax/Trees.scala:523 — // FIXME: https://github.com/twitter/rsc/issues/81
  • + 98 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×50
  • Duplicated block (8 lines × 2) check/src/main/scala/rsc/checkbytecode/Settings.scala:20 — check/src/main/scala/rsc/checkbytecode/Settings.scala:20-27 | check/src/main/scala/rsc/checkoutline/Settings.scala:15-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 `check/src/main/scala/rsc/checkbytecode/Settings.scala:20` it does not close everything it opens, so those exact lines 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) rsc/src/main/scala/rsc/parse/java/Messages.scala:16 — rsc/src/main/scala/rsc/parse/java/Messages.scala:16-23 | rsc/src/main/scala/rsc/parse/scala/Messages.scala:16-23 — `rsc/src/main/scala/rsc/parse/java/Messages.scala` and `rsc/src/main/scala/rsc/parse/scala/Messages.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 2 separate duplicated blocks between them, totalling at least 17 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (8 lines × 2) rsc/src/main/scala/rsc/pretty/Printer.scala:13 — rsc/src/main/scala/rsc/pretty/Printer.scala:13-20 | scalasig/scalasig/src/main/scala/scala/meta/internal/data/DataPrinter.scala:19-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) rsc/src/main/scala/rsc/pretty/Repl.scala:75 — rsc/src/main/scala/rsc/pretty/Repl.scala:75-82 | rsc/src/main/scala/rsc/pretty/Str.scala:67-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:354 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:354-361 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:357-364 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:190 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:190-197 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:193-200 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:92 — examples/core/src/main/scala/com/twitter/io/Buf.scala:92-99 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:95-102 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:92` it does not close everything it opens, so those exact lines 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:680 — examples/core/src/main/scala/com/twitter/io/Buf.scala:680-687 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:683-690 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1195 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1195-1202 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1198-1205 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1195` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:142 — examples/core/src/main/scala/com/twitter/util/Activity.scala:142-149 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:145-152 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:445 — examples/core/src/main/scala/com/twitter/util/Activity.scala:445-452 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:448-455 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:445` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:481 — examples/core/src/main/scala/com/twitter/util/Activity.scala:481-488 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:484-491 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:481` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:519 — examples/core/src/main/scala/com/twitter/util/Activity.scala:519-526 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:522-529 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:519` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:559 — examples/core/src/main/scala/com/twitter/util/Activity.scala:559-566 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:562-569 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:559` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:601 — examples/core/src/main/scala/com/twitter/util/Activity.scala:601-608 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:604-611 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:601` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:645 — examples/core/src/main/scala/com/twitter/util/Activity.scala:645-652 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:648-655 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:645` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:691 — examples/core/src/main/scala/com/twitter/util/Activity.scala:691-698 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:694-701 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:691` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:739 — examples/core/src/main/scala/com/twitter/util/Activity.scala:739-746 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:742-749 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:739` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:789 — examples/core/src/main/scala/com/twitter/util/Activity.scala:789-796 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:792-799 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:789` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:841 — examples/core/src/main/scala/com/twitter/util/Activity.scala:841-848 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:844-851 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:841` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:895 — examples/core/src/main/scala/com/twitter/util/Activity.scala:895-902 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:898-905 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:895` 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) examples/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala:35 — examples/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala:35-42 | examples/original/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala:38-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:521 — examples/core/src/main/scala/com/twitter/util/Promise.scala:521-528 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:524-531 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/util/CountDownLatch.scala:7 — examples/core/src/main/scala/com/twitter/util/CountDownLatch.scala:7-14 | examples/original/core/src/main/scala/com/twitter/util/CountDownLatch.scala:10-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:286 — examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:286-293 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:289-296 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 25 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×48
  • Duplicated block (5 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:27 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:27-31 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:235-239 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/scan/java/Scanner.scala:27` 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) rsc/src/main/scala/rsc/syntax/Dupe.scala:51 — rsc/src/main/scala/rsc/syntax/Dupe.scala:51-55 | rsc/src/main/scala/rsc/syntax/Dupe.scala:59-63 — both copies are in the same file, so extract the block into 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) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:209 — scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:209-213 | scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:254-258 — both copies are in the same file, so extract the block into 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) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:376 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:376-380 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:379-383 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:376` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:485 — examples/core/src/main/scala/com/twitter/io/Buf.scala:485-489 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:488-492 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:485` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1150 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1150-1154 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1153-1157 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1150` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1187 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1187-1191 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1190-1194 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1187` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1206 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1206-1210 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1209-1213 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1206` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1224 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1224-1228 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1227-1231 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1224` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1261 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1261-1265 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1264-1268 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1261` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1280 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1280-1284 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1283-1287 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1280` 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) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:136 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:136-140 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:139-143 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:136` 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) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:149 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:149-153 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:152-156 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:149` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:162 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:162-166 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:165-169 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:162` 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) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:175 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:175-179 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:178-182 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:175` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:192 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:192-196 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:195-199 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:192` 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) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:209 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:209-213 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:212-216 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:209` 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:434 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:434-438 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:437-441 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:464 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:464-468 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:467-471 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/util/Time.scala:225 — examples/core/src/main/scala/com/twitter/util/Time.scala:225-229 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:228-232 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Time.scala` and `examples/original/core/src/main/scala/com/twitter/util/Time.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Time.scala:225` 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) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:81 — examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:81-85 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:84-88 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:81` 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) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:37 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:37-41 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:40-44 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:56 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:56-60 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:59-63 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:654 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:654-658 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:657-661 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:682 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:682-686 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:685-689 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 23 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×43
  • Duplicated block (6 lines × 2) rsc/src/main/scala/rsc/outline/Synthesizer.scala:359 — rsc/src/main/scala/rsc/outline/Synthesizer.scala:359-364 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:467-472 — both copies are in the same file, so extract the block into 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) rsc/src/main/scala/rsc/pretty/TreeStr.scala:144 — rsc/src/main/scala/rsc/pretty/TreeStr.scala:144-149 | rsc/src/main/scala/rsc/pretty/TreeStr.scala:156-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) rsc/src/main/scala/rsc/syntax/Dupe.scala:67 — rsc/src/main/scala/rsc/syntax/Dupe.scala:67-72 | rsc/src/main/scala/rsc/syntax/Dupe.scala:80-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:57 — scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:57-62 | scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:212-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `sym` to `h.Symbol` in one and `l.Symbol` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:54` calls `Field`, `Message`, `Scalar` and `scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:210` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:46 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:46-51 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:49-54 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:804 — examples/core/src/main/scala/com/twitter/io/Buf.scala:804-809 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:807-812 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:804` 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:441 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:441-446 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:444-449 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/ByteReader.scala:441` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:456 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:456-461 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:459-464 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/ByteReader.scala:456` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/util/Duration.scala:375 — examples/core/src/main/scala/com/twitter/util/Duration.scala:375-380 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:378-383 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/util/Duration.scala:383 — examples/core/src/main/scala/com/twitter/util/Duration.scala:383-388 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:386-391 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Duration.scala:383` 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) examples/core/src/main/scala/com/twitter/util/Promise.scala:78 — examples/core/src/main/scala/com/twitter/util/Promise.scala:78-83 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:81-86 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Promise.scala:78` 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) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:50 — examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:50-55 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:53-58 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Offer.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:238 — examples/core/src/main/scala/com/twitter/io/Buf.scala:238-243 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:241-246 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:385 — examples/core/src/main/scala/com/twitter/io/Buf.scala:385-390 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:388-393 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:887 — examples/core/src/main/scala/com/twitter/io/Buf.scala:887-892 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:890-895 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:940 — examples/core/src/main/scala/com/twitter/io/Buf.scala:940-945 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:943-948 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:39 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:39-44 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:42-47 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:88 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:88-93 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:91-96 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `OverflowException` names `ByteWriter.OverflowException` in one and `com.twitter.io.ByteWriter.OverflowException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:98 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:98-103 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:101-106 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:319 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:319-324 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:322-327 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:514 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:514-519 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:517-522 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:61 — examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:61-66 | examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:64-69 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` and `examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/util/Duration.scala:423 — examples/core/src/main/scala/com/twitter/util/Duration.scala:423-428 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:426-431 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/util/Event.scala:42 — examples/core/src/main/scala/com/twitter/util/Event.scala:42-47 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:45-50 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) examples/core/src/main/scala/com/twitter/util/Future.scala:1061 — examples/core/src/main/scala/com/twitter/util/Future.scala:1061-1066 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1064-1069 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 18 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking examples/core/src/main/scala/com/twitter/util/Future.scala:307 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:316 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:326 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:340 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:355 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:378 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:403 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:430 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:459 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:490 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:524 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:560 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:598 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:638 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:680 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:724 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:770 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:818 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:868 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:920 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:974 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Future.scala:2058 — `joinWith` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Futures.scala:41 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Futures.scala:50 — `join` is async and calls Await.result — 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 examples/core/src/main/scala/com/twitter/util/Futures.scala:60 — `join` is async and calls Await.result — 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.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×35
  • Duplicated block (9 lines × 2) rsc/src/main/scala/rsc/parse/java/Messages.scala:35 — rsc/src/main/scala/rsc/parse/java/Messages.scala:35-43 | rsc/src/main/scala/rsc/parse/scala/Messages.scala:35-43 — `rsc/src/main/scala/rsc/parse/java/Messages.scala` and `rsc/src/main/scala/rsc/parse/scala/Messages.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 2 separate duplicated blocks between them, totalling at least 17 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) rsc/src/main/scala/rsc/parse/scala/Defns.scala:44 — rsc/src/main/scala/rsc/parse/scala/Defns.scala:44-52 | rsc/src/main/scala/rsc/parse/scala/Defns.scala:61-69 — both copies are in the same file, so extract the block into 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) rsc/src/main/scala/rsc/parse/java/Helpers.scala:13 — rsc/src/main/scala/rsc/parse/java/Helpers.scala:13-21 | rsc/src/main/scala/rsc/parse/scala/Helpers.scala:14-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.
  • Duplicated block (9 lines × 2) rsc/src/main/scala/rsc/scan/java/Messages.scala:12 — rsc/src/main/scala/rsc/scan/java/Messages.scala:12-20 | rsc/src/main/scala/rsc/scan/scala/Messages.scala:12-20 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:514 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:514-522 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:640-648 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:202 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:202-210 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:205-213 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1269 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1269-1277 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1272-1280 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1269` 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:407 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:407-415 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:410-418 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:418 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:418-426 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:421-429 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) examples/core/src/main/scala/com/twitter/io/Charsets.scala:26 — examples/core/src/main/scala/com/twitter/io/Charsets.scala:26-34 | examples/original/core/src/main/scala/com/twitter/io/Charsets.scala:29-37 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Charsets.scala` and `examples/original/core/src/main/scala/com/twitter/io/Charsets.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. 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) examples/core/src/main/scala/com/twitter/io/Charsets.scala:43 — examples/core/src/main/scala/com/twitter/io/Charsets.scala:43-51 | examples/original/core/src/main/scala/com/twitter/io/Charsets.scala:46-54 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Charsets.scala` and `examples/original/core/src/main/scala/com/twitter/io/Charsets.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. 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) examples/core/src/main/scala/com/twitter/io/Files.scala:19 — examples/core/src/main/scala/com/twitter/io/Files.scala:19-27 | examples/original/core/src/main/scala/com/twitter/io/Files.scala:22-30 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Files.scala` and `examples/original/core/src/main/scala/com/twitter/io/Files.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 `examples/core/src/main/scala/com/twitter/io/Files.scala:19` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:274 — examples/core/src/main/scala/com/twitter/util/Activity.scala:274-282 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:277-285 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:274` 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:950 — examples/core/src/main/scala/com/twitter/util/Activity.scala:950-958 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:953-961 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:950` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:3863 — examples/core/src/main/scala/com/twitter/util/Local.scala:3863-3871 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3866-3874 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Local.scala:3863` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:264 — examples/core/src/main/scala/com/twitter/io/Buf.scala:264-272 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:267-275 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:385 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:385-393 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:388-396 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:395 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:395-403 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:398-406 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:504 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:504-512 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:507-515 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:166 — examples/core/src/main/scala/com/twitter/io/Reader.scala:166-174 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:169-177 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:189 — examples/core/src/main/scala/com/twitter/io/Reader.scala:189-197 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:192-200 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:254 — examples/core/src/main/scala/com/twitter/io/Reader.scala:254-262 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:257-265 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:77 — examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:77-85 | examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala:80-88 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BoundedStack.scala` and `examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala` as WHOLE FILES: this scan already matched 4 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 (9 lines × 2) examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:87 — examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:87-95 | examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala:90-98 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BoundedStack.scala` and `examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala` as WHOLE FILES: this scan already matched 4 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 (9 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:266 — examples/core/src/main/scala/com/twitter/util/Event.scala:266-274 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:269-277 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×31
  • Duplicated block (10 lines × 2) rsc/src/main/scala/rsc/pretty/PrettyToken.scala:59 — rsc/src/main/scala/rsc/pretty/PrettyToken.scala:59-68 | rsc/src/main/scala/rsc/pretty/PrettyToken.scala:168-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/pretty/PrettyToken.scala:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:125 — examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:125-134 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:128-137 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:125` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:155 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:155-164 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:158-167 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:155` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:252 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:252-261 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:255-264 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:252` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:273 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:273-282 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:276-285 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.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.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:731 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:731-740 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:734-743 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:731` it does not close everything it opens, so those exact lines 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) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:114 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:114-123 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:117-126 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:161 — examples/core/src/main/scala/com/twitter/io/Buf.scala:161-170 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:164-173 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:296 — examples/core/src/main/scala/com/twitter/util/Activity.scala:296-305 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:299-308 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:296` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Duration.scala:393 — examples/core/src/main/scala/com/twitter/util/Duration.scala:393-402 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:396-405 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:126 — examples/core/src/main/scala/com/twitter/util/Event.scala:126-135 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:129-138 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:131 — examples/core/src/main/scala/com/twitter/util/Future.scala:131-140 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:134-143 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Future.scala:131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:109 — examples/core/src/main/scala/com/twitter/util/NetUtil.scala:109-118 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:112-121 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NetUtil.scala` and `examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:478 — examples/core/src/main/scala/com/twitter/util/Promise.scala:478-487 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:481-490 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Timer.scala:88 — examples/core/src/main/scala/com/twitter/util/Timer.scala:88-97 | examples/original/core/src/main/scala/com/twitter/util/Timer.scala:91-100 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Timer.scala` and `examples/original/core/src/main/scala/com/twitter/util/Timer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/conversions/percent.scala:28 — examples/core/src/main/scala/com/twitter/conversions/percent.scala:28-37 | examples/original/core/src/main/scala/com/twitter/conversions/percent.scala:31-40 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/percent.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/percent.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 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 `examples/core/src/main/scala/com/twitter/conversions/percent.scala:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:693 — examples/core/src/main/scala/com/twitter/io/Buf.scala:693-702 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:696-705 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:747 — examples/core/src/main/scala/com/twitter/io/Buf.scala:747-756 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:750-759 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1024 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1024-1033 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1027-1036 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:199 — examples/core/src/main/scala/com/twitter/io/Reader.scala:199-208 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:202-211 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:368 — examples/core/src/main/scala/com/twitter/io/Reader.scala:368-377 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:371-380 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:102 — examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:102-111 | examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:105-114 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` and `examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Duration.scala:355 — examples/core/src/main/scala/com/twitter/util/Duration.scala:355-364 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:358-367 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1605 — examples/core/src/main/scala/com/twitter/util/Future.scala:1605-1614 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1608-1617 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:4919 — examples/core/src/main/scala/com/twitter/util/Local.scala:4919-4928 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4922-4931 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×27
  • Duplicated block (7 lines × 2) check/src/main/scala/rsc/checkoutline/Checker.scala:172 — check/src/main/scala/rsc/checkoutline/Checker.scala:172-178 | check/src/main/scala/rsc/checkoutline/Checker.scala:182-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) rsc/src/main/scala/rsc/outline/Synthesizer.scala:618 — rsc/src/main/scala/rsc/outline/Synthesizer.scala:618-624 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:681-687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/outline/Synthesizer.scala:618` 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) scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasigs.scala:9 — scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasigs.scala:9-19 | scalasig/scalasig/src/main/scala/scala/meta/scalasig/lowlevel/Scalasigs.scala:9-15 — 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) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:294 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:294-300 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:297-303 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:546 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:546-552 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:549-555 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:546` 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:105 — examples/core/src/main/scala/com/twitter/io/Buf.scala:105-111 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:108-114 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:105` 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:471 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:471-477 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:474-480 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/ByteReader.scala:471` 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) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:487 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:487-493 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:490-496 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/ByteReader.scala:487` 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) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:178 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:178-184 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:181-187 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:49 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:49-55 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:52-58 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:109 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:109-115 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:112-118 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:121 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:121-127 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:124-130 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/TempDirectory.scala:33 — examples/core/src/main/scala/com/twitter/io/TempDirectory.scala:33-39 | examples/original/core/src/main/scala/com/twitter/io/TempDirectory.scala:36-42 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/TempDirectory.scala` and `examples/original/core/src/main/scala/com/twitter/io/TempDirectory.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:81 — examples/core/src/main/scala/com/twitter/util/Activity.scala:81-87 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:84-90 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:253 — examples/core/src/main/scala/com/twitter/util/Event.scala:253-259 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:256-262 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:237 — examples/core/src/main/scala/com/twitter/util/Future.scala:237-243 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:240-246 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1079 — examples/core/src/main/scala/com/twitter/util/Future.scala:1079-1085 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1082-1088 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1132 — examples/core/src/main/scala/com/twitter/util/Future.scala:1132-1138 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1135-1141 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1325 — examples/core/src/main/scala/com/twitter/util/Future.scala:1325-1331 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1328-1334 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1332 — examples/core/src/main/scala/com/twitter/util/Future.scala:1332-1338 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1335-1341 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:235 — examples/core/src/main/scala/com/twitter/util/Local.scala:235-241 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:238-244 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:239 — examples/core/src/main/scala/com/twitter/util/Promise.scala:239-245 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:242-248 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:877 — examples/core/src/main/scala/com/twitter/util/Promise.scala:877-883 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:880-886 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/util/StateMachine.scala:14 — examples/core/src/main/scala/com/twitter/util/StateMachine.scala:14-20 | examples/original/core/src/main/scala/com/twitter/util/StateMachine.scala:17-23 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/StateMachine.scala` and `examples/original/core/src/main/scala/com/twitter/util/StateMachine.scala` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:403 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:403-409 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:406-412 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×19
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:72 — examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:72-82 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:75-85 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Offer.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:72` 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) examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:124 — examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:124-134 | examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala:127-137 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/StringOps.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:868 — examples/core/src/main/scala/com/twitter/io/Buf.scala:868-878 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:871-881 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:902 — examples/core/src/main/scala/com/twitter/io/Buf.scala:902-912 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:905-915 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:64 — examples/core/src/main/scala/com/twitter/util/Activity.scala:64-74 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:67-77 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:320 — examples/core/src/main/scala/com/twitter/util/Activity.scala:320-330 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:323-333 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:320` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:45 — examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:45-55 | examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala:48-58 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BoundedStack.scala` and `examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala` as WHOLE FILES: this scan already matched 4 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:315 — examples/core/src/main/scala/com/twitter/util/Event.scala:315-325 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:318-328 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:2019 — examples/core/src/main/scala/com/twitter/util/Future.scala:2019-2029 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2022-2032 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:2059 — examples/core/src/main/scala/com/twitter/util/Future.scala:2059-2069 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2062-2072 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Future.scala:2059` it does not close everything it opens, so those exact lines 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) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:92 — examples/core/src/main/scala/com/twitter/util/NetUtil.scala:92-102 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:95-105 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NetUtil.scala` and `examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Pool.scala:30 — examples/core/src/main/scala/com/twitter/util/Pool.scala:30-40 | examples/original/core/src/main/scala/com/twitter/util/Pool.scala:33-43 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Pool.scala` and `examples/original/core/src/main/scala/com/twitter/util/Pool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Signal.scala:83 — examples/core/src/main/scala/com/twitter/util/Signal.scala:83-93 | examples/original/core/src/main/scala/com/twitter/util/Signal.scala:86-96 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Signal.scala` and `examples/original/core/src/main/scala/com/twitter/util/Signal.scala` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Timer.scala:364 — examples/core/src/main/scala/com/twitter/util/Timer.scala:364-374 | examples/original/core/src/main/scala/com/twitter/util/Timer.scala:367-377 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Timer.scala` and `examples/original/core/src/main/scala/com/twitter/util/Timer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:411 — examples/core/src/main/scala/com/twitter/io/Buf.scala:411-421 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:414-424 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:65 — examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:65-75 | examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala:68-78 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala` and `examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1309 — examples/core/src/main/scala/com/twitter/util/Future.scala:1309-1319 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1312-1322 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:2298 — examples/core/src/main/scala/com/twitter/util/Future.scala:2298-2308 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2301-2311 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:211 — examples/core/src/main/scala/com/twitter/util/Promise.scala:211-221 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:214-224 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×16
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:363 — examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:363-374 | examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:366-377 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Serialized.scala:26 — examples/core/src/main/scala/com/twitter/concurrent/Serialized.scala:26-37 | examples/original/core/src/main/scala/com/twitter/concurrent/Serialized.scala:29-40 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Serialized.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Serialized.scala` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:78 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:78-89 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:81-92 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1158 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1158-1169 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1161-1172 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1232 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1232-1243 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1235-1246 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1232` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala:22 — examples/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala:22-33 | examples/original/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala:25-36 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala` and `examples/original/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:148 — examples/core/src/main/scala/com/twitter/io/Reader.scala:148-159 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:151-162 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:346 — examples/core/src/main/scala/com/twitter/util/Activity.scala:346-357 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:349-360 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:67 — examples/core/src/main/scala/com/twitter/util/Event.scala:67-78 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:70-81 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:2072 — examples/core/src/main/scala/com/twitter/util/Future.scala:2072-2083 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2075-2086 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Future.scala:2072` 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) examples/core/src/main/scala/com/twitter/util/Promise.scala:706 — examples/core/src/main/scala/com/twitter/util/Promise.scala:706-717 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:709-720 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:254 — examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:254-265 | examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:257-268 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/conversions/string.scala:140 — examples/core/src/main/scala/com/twitter/conversions/string.scala:140-151 | examples/original/core/src/main/scala/com/twitter/conversions/string.scala:143-154 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/string.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/string.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/io/Files.scala:39 — examples/core/src/main/scala/com/twitter/io/Files.scala:39-50 | examples/original/core/src/main/scala/com/twitter/io/Files.scala:42-53 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Files.scala` and `examples/original/core/src/main/scala/com/twitter/io/Files.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 (12 lines × 2) examples/core/src/main/scala/com/twitter/util/Base64Long.scala:34 — examples/core/src/main/scala/com/twitter/util/Base64Long.scala:34-45 | examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala:37-48 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Base64Long.scala` and `examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) examples/core/src/main/scala/com/twitter/util/WindowedAdder.scala:86 — examples/core/src/main/scala/com/twitter/util/WindowedAdder.scala:86-97 | examples/original/core/src/main/scala/com/twitter/util/WindowedAdder.scala:89-100 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/WindowedAdder.scala` and `examples/original/core/src/main/scala/com/twitter/util/WindowedAdder.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 · Duplicated block (13 lines × 2) · ×15
  • Duplicated block (13 lines × 2) scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:31 — scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:31-43 | scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:47-59 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:176 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:176-188 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:179-191 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:116 — examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:116-128 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:119-131 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Offer.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:299 — examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:299-311 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:302-314 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Offer.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:147 — examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:147-159 | examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:150-162 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) examples/core/src/main/scala/com/twitter/util/Activity.scala:374 — examples/core/src/main/scala/com/twitter/util/Activity.scala:374-386 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:377-389 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:21 — examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:21-33 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:24-36 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/ConstFuture.scala` and `examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) examples/core/src/main/scala/com/twitter/util/Event.scala:295 — examples/core/src/main/scala/com/twitter/util/Event.scala:295-307 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:298-310 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:267 — examples/core/src/main/scala/com/twitter/util/Future.scala:267-279 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:270-282 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1109 — examples/core/src/main/scala/com/twitter/util/Future.scala:1109-1121 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1112-1124 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/util/StorageUnit.scala:132 — examples/core/src/main/scala/com/twitter/util/StorageUnit.scala:132-144 | examples/original/core/src/main/scala/com/twitter/util/StorageUnit.scala:135-147 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/StorageUnit.scala` and `examples/original/core/src/main/scala/com/twitter/util/StorageUnit.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) examples/core/src/main/scala/com/twitter/util/Var.scala:484 — examples/core/src/main/scala/com/twitter/util/Var.scala:484-496 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:487-499 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Var.scala` and `examples/original/core/src/main/scala/com/twitter/util/Var.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/NamedPoolThreadFactory.scala:26 — examples/core/src/main/scala/com/twitter/concurrent/NamedPoolThreadFactory.scala:26-38 | examples/original/core/src/main/scala/com/twitter/concurrent/NamedPoolThreadFactory.scala:29-41 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/NamedPoolThreadFactory.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/NamedPoolThreadFactory.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala:155 — examples/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala:155-167 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala:158-170 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:161 — examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:161-173 | examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:164-176 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×14
  • Duplicated block (15 lines × 2) rsc/src/main/scala/rsc/outline/Outliner.scala:219 — rsc/src/main/scala/rsc/outline/Outliner.scala:219-233 | rsc/src/main/scala/rsc/outline/Outliner.scala:247-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) rsc/src/main/scala/rsc/scalasig/Pickle.scala:1074 — rsc/src/main/scala/rsc/scalasig/Pickle.scala:1074-1088 | rsc/src/main/scala/rsc/scalasig/Pickle.scala:1113-1127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/scalasig/Pickle.scala:1074` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:104 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:104-118 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:91-105 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/scan/java/Scanner.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 (15 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:653 — examples/core/src/main/scala/com/twitter/io/Buf.scala:653-667 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:656-670 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/io/TempFolder.scala:38 — examples/core/src/main/scala/com/twitter/io/TempFolder.scala:38-52 | examples/original/core/src/main/scala/com/twitter/io/TempFolder.scala:41-55 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/TempFolder.scala` and `examples/original/core/src/main/scala/com/twitter/io/TempFolder.scala` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:404 — examples/core/src/main/scala/com/twitter/util/Activity.scala:404-418 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:407-421 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:233 — examples/core/src/main/scala/com/twitter/util/Event.scala:233-247 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:236-250 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1680 — examples/core/src/main/scala/com/twitter/util/Future.scala:1680-1694 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1683-1697 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Future.scala:1680` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/RandomSocket.scala:25 — examples/core/src/main/scala/com/twitter/util/RandomSocket.scala:25-39 | examples/original/core/src/main/scala/com/twitter/util/RandomSocket.scala:28-42 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/RandomSocket.scala` and `examples/original/core/src/main/scala/com/twitter/util/RandomSocket.scala` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/StorageUnit.scala:38 — examples/core/src/main/scala/com/twitter/util/StorageUnit.scala:38-52 | examples/original/core/src/main/scala/com/twitter/util/StorageUnit.scala:41-55 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/StorageUnit.scala` and `examples/original/core/src/main/scala/com/twitter/util/StorageUnit.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/conversions/DurationOps.scala:23 — examples/core/src/main/scala/com/twitter/conversions/DurationOps.scala:23-37 | examples/original/core/src/main/scala/com/twitter/conversions/DurationOps.scala:26-40 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/DurationOps.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/DurationOps.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/Pool.scala:76 — examples/core/src/main/scala/com/twitter/util/Pool.scala:76-90 | examples/original/core/src/main/scala/com/twitter/util/Pool.scala:79-93 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Pool.scala` and `examples/original/core/src/main/scala/com/twitter/util/Pool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/Timer.scala:312 — examples/core/src/main/scala/com/twitter/util/Timer.scala:312-326 | examples/original/core/src/main/scala/com/twitter/util/Timer.scala:315-329 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Timer.scala` and `examples/original/core/src/main/scala/com/twitter/util/Timer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:352 — examples/core/src/main/scala/com/twitter/util/Local.scala:352-366 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:355-369 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×12
  • Duplicated block (16 lines × 2) rsc/src/main/scala/rsc/parse/java/Terms.scala:60 — rsc/src/main/scala/rsc/parse/java/Terms.scala:60-75 | rsc/src/main/scala/rsc/parse/scala/Lits.scala:36-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:254 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:254-269 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:461-476 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:706 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:706-721 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:709-724 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:706` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Broker.scala:44 — examples/core/src/main/scala/com/twitter/concurrent/Broker.scala:44-59 | examples/original/core/src/main/scala/com/twitter/concurrent/Broker.scala:47-62 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Broker.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Broker.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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:494 — examples/core/src/main/scala/com/twitter/io/Buf.scala:494-509 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:497-512 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:838 — examples/core/src/main/scala/com/twitter/io/Buf.scala:838-853 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:841-856 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/io/BufReader.scala:13 — examples/core/src/main/scala/com/twitter/io/BufReader.scala:13-28 | examples/original/core/src/main/scala/com/twitter/io/BufReader.scala:16-31 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufReader.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:118 — examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:118-133 | examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala:121-136 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala` and `examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:207 — examples/core/src/main/scala/com/twitter/util/Future.scala:207-222 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:210-225 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:798 — examples/core/src/main/scala/com/twitter/util/Promise.scala:798-813 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:801-816 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/conversions/StorageUnitOps.scala:20 — examples/core/src/main/scala/com/twitter/conversions/StorageUnitOps.scala:20-35 | examples/original/core/src/main/scala/com/twitter/conversions/StorageUnitOps.scala:23-38 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/StorageUnitOps.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/StorageUnitOps.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:85 — examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:85-100 | examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala:88-103 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala` and `examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×12
  • Duplicated block (14 lines × 2) rsc/src/main/scala/rsc/classpath/scalacp/Scalalib.scala:57 — rsc/src/main/scala/rsc/classpath/scalacp/Scalalib.scala:57-70 | rsc/src/main/scala/rsc/classpath/scalacp/Scalalib.scala:94-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/classpath/scalacp/Scalalib.scala:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) rsc/src/main/scala/rsc/parse/java/Defns.scala:97 — rsc/src/main/scala/rsc/parse/java/Defns.scala:97-110 | rsc/src/main/scala/rsc/parse/java/Sources.scala:50-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 `rsc/src/main/scala/rsc/parse/java/Defns.scala:97` it does not close everything it opens, so those exact lines 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) rsc/src/main/scala/rsc/parse/java/Ids.scala:13 — rsc/src/main/scala/rsc/parse/java/Ids.scala:13-26 | rsc/src/main/scala/rsc/parse/scala/Paths.scala:14-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:583 — examples/core/src/main/scala/com/twitter/io/Buf.scala:583-596 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:586-599 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/io/TempFile.scala:54 — examples/core/src/main/scala/com/twitter/io/TempFile.scala:54-67 | examples/original/core/src/main/scala/com/twitter/io/TempFile.scala:57-70 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/TempFile.scala` and `examples/original/core/src/main/scala/com/twitter/io/TempFile.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:84 — examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:84-97 | examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:87-100 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` and `examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:108 — examples/core/src/main/scala/com/twitter/util/Event.scala:108-121 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:111-124 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:11 — examples/core/src/main/scala/com/twitter/util/NetUtil.scala:11-24 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:14-27 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NetUtil.scala` and `examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:147 — examples/core/src/main/scala/com/twitter/util/NetUtil.scala:147-160 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:150-163 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NetUtil.scala` and `examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/util/Time.scala:179 — examples/core/src/main/scala/com/twitter/util/Time.scala:179-192 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:182-195 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Time.scala` and `examples/original/core/src/main/scala/com/twitter/util/Time.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/util/Time.scala:600 — examples/core/src/main/scala/com/twitter/util/Time.scala:600-613 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:603-616 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Time.scala` and `examples/original/core/src/main/scala/com/twitter/util/Time.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) examples/core/src/main/scala/com/twitter/util/Var.scala:214 — examples/core/src/main/scala/com/twitter/util/Var.scala:214-227 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:217-230 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Var.scala` and `examples/original/core/src/main/scala/com/twitter/util/Var.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D17 · Explicit Debt · TodoComment · ×11
  • TodoComment scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:133 — //TODO getOrElse is a workaround for a bug in semanticdb that may cause symbols to — 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 scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:55 — // TODO: At the moment, we return None for local symbols, since they don't have a desc. — 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 rsc/src/main/scala/rsc/semanticdb/Prefixes.scala:39 — // TODO: should we refactor this resolution logic into Env? — 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 rsc/src/main/scala/rsc/pretty/PrettyCompiler.scala:21 — // TODO: Implement me. — 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 rsc/src/main/scala/rsc/outline/Env.scala:141 — // TODO: Add comment explaining what this is — 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 examples/original/core/src/main/scala/com/twitter/util/Var.scala:72 — // TODO: Right now we rely on synchronous propagation; and — 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 examples/core/src/main/scala/com/twitter/util/Var.scala:69 — // TODO: Right now we rely on synchronous propagation; and — 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 examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:197 — // TODO: we may want to check the Deadline and not bother scheduling it if its — 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 examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:194 — // TODO: we may want to check the Deadline and not bother scheduling it if its — 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 examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:333 — // TODO: investigate using an explicit lock so we can just call unlock() — 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 examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:330 — // TODO: investigate using an explicit lock so we can just call unlock() — 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×10
  • Members sharing a duplicated core (4 members, 50+ identical tokens) check/src/main/scala/rsc/checkbytecode/Settings.scala:19 — check/src/main/scala/rsc/checkbytecode/Settings.scala:19-59 | check/src/main/scala/rsc/checkoutline/Settings.scala:14-37 | check/src/main/scala/rsc/checkparse/Settings.scala:12-32 | check/src/main/scala/rsc/checkscalasig/Settings.scala:16-48 — 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) rsc/src/main/scala/rsc/report/Messages.scala:230 — rsc/src/main/scala/rsc/report/Messages.scala:230-240 | rsc/src/main/scala/rsc/report/Messages.scala:246-255 | rsc/src/main/scala/rsc/report/Messages.scala:315-325 | rsc/src/main/scala/rsc/report/Messages.scala:331-340 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:152 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:152-164 | examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:249-261 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:155-167 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:252-264 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:65 — examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:65-81 | examples/core/src/main/scala/com/twitter/conversions/string.scala:79-95 | examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala:68-84 | examples/original/core/src/main/scala/com/twitter/conversions/string.scala:82-98 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:92 — examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:92-107 | examples/core/src/main/scala/com/twitter/conversions/string.scala:109-124 | examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala:95-110 | examples/original/core/src/main/scala/com/twitter/conversions/string.scala:112-127 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/io/Buf.scala:1157 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1157-1169 | examples/core/src/main/scala/com/twitter/io/Buf.scala:1194-1210 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1160-1172 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1197-1213 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/io/Buf.scala:1231 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1231-1243 | examples/core/src/main/scala/com/twitter/io/Buf.scala:1268-1284 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1234-1246 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1271-1287 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:37 — examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:37-58 | examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:60-81 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:40-61 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:63-84 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/Future.scala:362 — examples/core/src/main/scala/com/twitter/util/Future.scala:362-371 | examples/core/src/main/scala/com/twitter/util/Futures.scala:96-105 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:365-374 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:99-108 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/Future.scala:386 — examples/core/src/main/scala/com/twitter/util/Future.scala:386-396 | examples/core/src/main/scala/com/twitter/util/Futures.scala:120-130 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:389-399 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:123-133 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×9
  • Duplicated block (18 lines × 2) rsc/src/main/scala/rsc/parse/java/Parser.scala:30 — rsc/src/main/scala/rsc/parse/java/Parser.scala:30-47 | rsc/src/main/scala/rsc/parse/scala/Parser.scala:39-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/parse/java/Parser.scala:30` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:217 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:217-234 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:318-335 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (18 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:205 — examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:205-222 | examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala:208-225 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Scheduler.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:221 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:221-238 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:224-241 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) examples/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala:39 — examples/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala:39-56 | examples/original/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala:42-59 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala` and `examples/original/core/src/main/scala/com/twitter/io/OutputStreamWriter.scala` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 (18 lines × 2) examples/core/src/main/scala/com/twitter/util/Base64Long.scala:108 — examples/core/src/main/scala/com/twitter/util/Base64Long.scala:108-125 | examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala:111-128 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Base64Long.scala` and `examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:41 — examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:41-58 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:44-61 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/ConstFuture.scala` and `examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:41` 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) examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:64 — examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:64-81 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:67-84 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/ConstFuture.scala` and `examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:64` 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) examples/core/src/main/scala/com/twitter/util/Local.scala:404 — examples/core/src/main/scala/com/twitter/util/Local.scala:404-421 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:407-424 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D3 · God Classes · FileTooLong · ×8
  • FileTooLong: scalasig/Pickle.scala rsc/src/main/scala/rsc/scalasig/Pickle.scala — FileTooLong — 1039 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Pickle (25-1340). The bar is 500 significant lines; this is 539 over it, 2.08× 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: pretty/TreeStr.scala rsc/src/main/scala/rsc/pretty/TreeStr.scala — FileTooLong — 787 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: TreeStr (11-893). The bar is 500 significant lines; this is 287 over it, 1.57× 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: scalasig/ScalasigHighlevel.scala scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala — FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ScalasigHighlevel (11-703). The bar is 500 significant lines; this is 165 over it, 1.33× 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: scalasig/ScalasigCodec.scala scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigCodec.scala — FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 90 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: outline/Scheduler.scala rsc/src/main/scala/rsc/outline/Scheduler.scala — FileTooLong — 573 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Scheduler (25-759). The bar is 500 significant lines; this is 73 over it, 1.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: scala/Scanner.scala rsc/src/main/scala/rsc/scan/scala/Scanner.scala — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Scanner (13-649). The bar is 500 significant lines; this is 28 over it, 1.06× 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: outline/Synthesizer.scala rsc/src/main/scala/rsc/outline/Synthesizer.scala — FileTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Synthesizer (15-698). The bar is 500 significant lines; this is 9 over it, 1.02× 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: syntax/Dupe.scala rsc/src/main/scala/rsc/syntax/Dupe.scala — FileTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3 over it, 1.01× 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×8
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:787 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:787-805 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:790-808 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/io/BufInputStream.scala:47 — examples/core/src/main/scala/com/twitter/io/BufInputStream.scala:47-65 | examples/original/core/src/main/scala/com/twitter/io/BufInputStream.scala:50-68 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufInputStream.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufInputStream.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:221 — examples/core/src/main/scala/com/twitter/io/Reader.scala:221-239 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:224-242 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/util/Closable.scala:75 — examples/core/src/main/scala/com/twitter/util/Closable.scala:75-93 | examples/original/core/src/main/scala/com/twitter/util/Closable.scala:78-96 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Closable.scala` and `examples/original/core/src/main/scala/com/twitter/util/Closable.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/util/Duration.scala:335 — examples/core/src/main/scala/com/twitter/util/Duration.scala:335-353 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:338-356 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:71 — examples/core/src/main/scala/com/twitter/util/NetUtil.scala:71-89 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:74-92 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NetUtil.scala` and `examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteWriter.scala:123 — examples/core/src/main/scala/com/twitter/io/ByteWriter.scala:123-141 | examples/original/core/src/main/scala/com/twitter/io/ByteWriter.scala:126-144 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteWriter.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteWriter.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) examples/core/src/main/scala/com/twitter/util/Throwables.scala:23 — examples/core/src/main/scala/com/twitter/util/Throwables.scala:23-41 | examples/original/core/src/main/scala/com/twitter/util/Throwables.scala:26-44 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Throwables.scala` and `examples/original/core/src/main/scala/com/twitter/util/Throwables.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 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 `examples/core/src/main/scala/com/twitter/util/Throwables.scala:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×8
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:133 — examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:133-149 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:136-152 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Spool.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:37 — examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:37-53 | examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala:40-56 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/StringOps.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/conversions/string.scala:49 — examples/core/src/main/scala/com/twitter/conversions/string.scala:49-65 | examples/original/core/src/main/scala/com/twitter/conversions/string.scala:52-68 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/string.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/string.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:476 — examples/core/src/main/scala/com/twitter/io/Reader.scala:476-492 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:479-495 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/util/Base64Long.scala:149 — examples/core/src/main/scala/com/twitter/util/Base64Long.scala:149-165 | examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala:152-168 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Base64Long.scala` and `examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:86 — examples/core/src/main/scala/com/twitter/util/Event.scala:86-102 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:89-105 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/util/Var.scala:274 — examples/core/src/main/scala/com/twitter/util/Var.scala:274-290 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:277-293 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Var.scala` and `examples/original/core/src/main/scala/com/twitter/util/Var.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Var.scala:274` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Once.scala:13 — examples/core/src/main/scala/com/twitter/concurrent/Once.scala:13-29 | examples/original/core/src/main/scala/com/twitter/concurrent/Once.scala:16-32 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Once.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Once.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 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×8
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/outline/Env.scala:117 — `resolveSuper` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/outline/Env.scala:122 — `resolveSuper` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/pretty/PrettyCompiler.scala:26 — `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/pretty/PrettyEntry.scala:19 — `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/pretty/PrettyEnv.scala:12 — `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/pretty/PrettyRoot.scala:12 — `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/pretty/PrettyTodo.scala:20 — `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` rsc/src/main/scala/rsc/pretty/PrettyWork.scala:76 — `repl` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×8
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/outline/Env.scala:117 — `resolveSuper` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/outline/Env.scala:122 — `resolveSuper` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/pretty/PrettyCompiler.scala:26 — `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/pretty/PrettyEntry.scala:19 — `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/pretty/PrettyEnv.scala:12 — `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/pretty/PrettyRoot.scala:12 — `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/pretty/PrettyTodo.scala:20 — `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is ??? / NotImplementedError rsc/src/main/scala/rsc/pretty/PrettyWork.scala:76 — `repl` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×7
  • Duplicated block (24 lines × 2) rsc/src/main/scala/rsc/scan/java/Characters.scala:14 — rsc/src/main/scala/rsc/scan/java/Characters.scala:14-37 | rsc/src/main/scala/rsc/scan/scala/Characters.scala:14-37 — `rsc/src/main/scala/rsc/scan/java/Characters.scala` and `rsc/src/main/scala/rsc/scan/scala/Characters.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 24 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (24 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:69 — examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:69-92 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:72-95 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala:119 — examples/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala:119-142 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala:122-145 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncSemaphore.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:466 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:466-489 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:469-492 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:136 — examples/core/src/main/scala/com/twitter/io/Buf.scala:136-159 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:139-162 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:136` 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 (24 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:337 — examples/core/src/main/scala/com/twitter/io/Buf.scala:337-360 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:340-363 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) examples/core/src/main/scala/com/twitter/util/Time.scala:424 — examples/core/src/main/scala/com/twitter/util/Time.scala:424-447 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:427-450 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Time.scala` and `examples/original/core/src/main/scala/com/twitter/util/Time.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×7
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/io/Pipe.scala:196 — examples/core/src/main/scala/com/twitter/io/Pipe.scala:196-225 | examples/original/core/src/main/scala/com/twitter/io/Pipe.scala:199-228 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Pipe.scala` and `examples/original/core/src/main/scala/com/twitter/io/Pipe.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:334 — examples/core/src/main/scala/com/twitter/io/Reader.scala:334-363 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:337-366 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:422 — examples/core/src/main/scala/com/twitter/io/Reader.scala:422-451 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:425-454 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:178 — examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:178-207 | examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:181-210 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` and `examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1246 — examples/core/src/main/scala/com/twitter/util/Future.scala:1246-1275 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1249-1278 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:35 — examples/core/src/main/scala/com/twitter/util/NetUtil.scala:35-64 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:38-67 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NetUtil.scala` and `examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) examples/core/src/main/scala/com/twitter/util/Credentials.scala:39 — examples/core/src/main/scala/com/twitter/util/Credentials.scala:39-68 | examples/original/core/src/main/scala/com/twitter/util/Credentials.scala:42-71 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Credentials.scala` and `examples/original/core/src/main/scala/com/twitter/util/Credentials.scala` as WHOLE FILES: 92% 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 `examples/core/src/main/scala/com/twitter/util/Credentials.scala:39` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×7
  • Duplicated block (10 lines × 4) examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:38 — examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:38-47 | examples/core/src/main/scala/com/twitter/util/ConstFuture.scala:61-70 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:41-50 | examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala:64-73 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/ConstFuture.scala` and `examples/original/core/src/main/scala/com/twitter/util/ConstFuture.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/ConstFuture.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 (10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:708 — examples/core/src/main/scala/com/twitter/util/Future.scala:708-717 | examples/core/src/main/scala/com/twitter/util/Futures.scala:443-452 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:711-720 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:446-455 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:708` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:754 — examples/core/src/main/scala/com/twitter/util/Future.scala:754-763 | examples/core/src/main/scala/com/twitter/util/Futures.scala:489-498 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:757-766 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:492-501 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:754` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:802 — examples/core/src/main/scala/com/twitter/util/Future.scala:802-811 | examples/core/src/main/scala/com/twitter/util/Futures.scala:537-546 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:805-814 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:540-549 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:802` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:852 — examples/core/src/main/scala/com/twitter/util/Future.scala:852-861 | examples/core/src/main/scala/com/twitter/util/Futures.scala:587-596 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:855-864 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:590-599 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:852` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:904 — examples/core/src/main/scala/com/twitter/util/Future.scala:904-913 | examples/core/src/main/scala/com/twitter/util/Futures.scala:639-648 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:907-916 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:642-651 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:904` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:958 — examples/core/src/main/scala/com/twitter/util/Future.scala:958-967 | examples/core/src/main/scala/com/twitter/util/Futures.scala:693-702 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:961-970 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:696-705 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:958` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×6
  • Duplicated block (31 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Broker.scala:61 — examples/core/src/main/scala/com/twitter/concurrent/Broker.scala:61-91 | examples/original/core/src/main/scala/com/twitter/concurrent/Broker.scala:64-94 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Broker.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Broker.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 (31 lines × 2) examples/core/src/main/scala/com/twitter/io/InputStreamReader.scala:37 — examples/core/src/main/scala/com/twitter/io/InputStreamReader.scala:37-67 | examples/original/core/src/main/scala/com/twitter/io/InputStreamReader.scala:40-70 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/InputStreamReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/InputStreamReader.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) examples/core/src/main/scala/com/twitter/io/Pipe.scala:97 — examples/core/src/main/scala/com/twitter/io/Pipe.scala:97-127 | examples/original/core/src/main/scala/com/twitter/io/Pipe.scala:100-130 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Pipe.scala` and `examples/original/core/src/main/scala/com/twitter/io/Pipe.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) examples/core/src/main/scala/com/twitter/io/Pipe.scala:134 — examples/core/src/main/scala/com/twitter/io/Pipe.scala:134-164 | examples/original/core/src/main/scala/com/twitter/io/Pipe.scala:137-167 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Pipe.scala` and `examples/original/core/src/main/scala/com/twitter/io/Pipe.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (31 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:765 — examples/core/src/main/scala/com/twitter/util/Promise.scala:765-795 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:768-798 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (31 lines × 2) examples/core/src/main/scala/com/twitter/conversions/time.scala:26 — examples/core/src/main/scala/com/twitter/conversions/time.scala:26-56 | examples/original/core/src/main/scala/com/twitter/conversions/time.scala:29-59 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/time.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/time.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 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 `examples/core/src/main/scala/com/twitter/conversions/time.scala:26` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×6
  • Duplicated block (25 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:994 — examples/core/src/main/scala/com/twitter/io/Buf.scala:994-1018 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:997-1021 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) examples/core/src/main/scala/com/twitter/io/Pipe.scala:169 — examples/core/src/main/scala/com/twitter/io/Pipe.scala:169-193 | examples/original/core/src/main/scala/com/twitter/io/Pipe.scala:172-196 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Pipe.scala` and `examples/original/core/src/main/scala/com/twitter/io/Pipe.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (25 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:2139 — examples/core/src/main/scala/com/twitter/util/Future.scala:2139-2163 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2142-2166 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (25 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:440 — examples/core/src/main/scala/com/twitter/util/Local.scala:440-464 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:443-467 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Local.scala:440` 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 (25 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:563 — examples/core/src/main/scala/com/twitter/util/Promise.scala:563-587 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:566-590 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) examples/core/src/main/scala/com/twitter/util/Var.scala:63 — examples/core/src/main/scala/com/twitter/util/Var.scala:63-87 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:66-90 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Var.scala` and `examples/original/core/src/main/scala/com/twitter/util/Var.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×6
  • Duplicated block (21 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:113 — examples/core/src/main/scala/com/twitter/io/Buf.scala:113-133 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:116-136 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) examples/core/src/main/scala/com/twitter/io/Reader.scala:394 — examples/core/src/main/scala/com/twitter/io/Reader.scala:394-414 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:397-417 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Reader.scala` and `examples/original/core/src/main/scala/com/twitter/io/Reader.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:622 — examples/core/src/main/scala/com/twitter/util/Promise.scala:622-642 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:625-645 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) examples/core/src/main/scala/com/twitter/util/Signal.scala:52 — examples/core/src/main/scala/com/twitter/util/Signal.scala:52-72 | examples/original/core/src/main/scala/com/twitter/util/Signal.scala:55-75 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Signal.scala` and `examples/original/core/src/main/scala/com/twitter/util/Signal.scala` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) examples/core/src/main/scala/com/twitter/util/WindowedAdder.scala:46 — examples/core/src/main/scala/com/twitter/util/WindowedAdder.scala:46-66 | examples/original/core/src/main/scala/com/twitter/util/WindowedAdder.scala:49-69 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/WindowedAdder.scala` and `examples/original/core/src/main/scala/com/twitter/util/WindowedAdder.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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:504 — examples/core/src/main/scala/com/twitter/util/Local.scala:504-524 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:507-527 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×5
  • Duplicated block (29 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:500 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:500-528 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:503-531 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:58 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:58-86 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:61-89 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:136 — examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:136-164 | examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala:139-167 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala` and `examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (29 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:589 — examples/core/src/main/scala/com/twitter/util/Promise.scala:589-617 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:592-620 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (29 lines × 2) examples/core/src/main/scala/com/twitter/util/TokenBucket.scala:43 — examples/core/src/main/scala/com/twitter/util/TokenBucket.scala:43-71 | examples/original/core/src/main/scala/com/twitter/util/TokenBucket.scala:46-74 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/TokenBucket.scala` and `examples/original/core/src/main/scala/com/twitter/util/TokenBucket.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 · Duplicated block (28 lines × 2) · ×5
  • Duplicated block (28 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:704 — examples/core/src/main/scala/com/twitter/io/Buf.scala:704-731 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:707-734 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:957 — examples/core/src/main/scala/com/twitter/io/Buf.scala:957-984 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:960-987 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1291 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1291-1318 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1294-1321 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) examples/core/src/main/scala/com/twitter/util/TokenBucket.scala:87 — examples/core/src/main/scala/com/twitter/util/TokenBucket.scala:87-114 | examples/original/core/src/main/scala/com/twitter/util/TokenBucket.scala:90-117 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/TokenBucket.scala` and `examples/original/core/src/main/scala/com/twitter/util/TokenBucket.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 (28 lines × 2) examples/core/src/main/scala/com/twitter/io/StreamIO.scala:17 — examples/core/src/main/scala/com/twitter/io/StreamIO.scala:17-44 | examples/original/core/src/main/scala/com/twitter/io/StreamIO.scala:20-47 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/StreamIO.scala` and `examples/original/core/src/main/scala/com/twitter/io/StreamIO.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 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 `examples/core/src/main/scala/com/twitter/io/StreamIO.scala:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×5
  • Duplicated block (20 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:761 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:761-780 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:764-783 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:761` 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 (20 lines × 2) examples/core/src/main/scala/com/twitter/util/Base64Long.scala:82 — examples/core/src/main/scala/com/twitter/util/Base64Long.scala:82-101 | examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala:85-104 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Base64Long.scala` and `examples/original/core/src/main/scala/com/twitter/util/Base64Long.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:499 — examples/core/src/main/scala/com/twitter/util/Promise.scala:499-518 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:502-521 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) examples/core/src/main/scala/com/twitter/util/TwitterDateFormat.scala:32 — examples/core/src/main/scala/com/twitter/util/TwitterDateFormat.scala:32-51 | examples/original/core/src/main/scala/com/twitter/util/TwitterDateFormat.scala:35-54 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/TwitterDateFormat.scala` and `examples/original/core/src/main/scala/com/twitter/util/TwitterDateFormat.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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) examples/core/src/main/scala/com/twitter/conversions/storage.scala:25 — examples/core/src/main/scala/com/twitter/conversions/storage.scala:25-44 | examples/original/core/src/main/scala/com/twitter/conversions/storage.scala:28-47 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/storage.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/storage.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 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 `examples/core/src/main/scala/com/twitter/conversions/storage.scala:25` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×4
  • Duplicated block (34 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:120 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:120-153 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:109-142 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (34 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:599 — examples/core/src/main/scala/com/twitter/io/Buf.scala:599-632 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:602-635 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (34 lines × 2) examples/core/src/main/scala/com/twitter/util/Activity.scala:195 — examples/core/src/main/scala/com/twitter/util/Activity.scala:195-228 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:198-231 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (34 lines × 2) examples/core/src/main/scala/com/twitter/util/Duration.scala:226 — examples/core/src/main/scala/com/twitter/util/Duration.scala:226-259 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:229-262 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Duration.scala` and `examples/original/core/src/main/scala/com/twitter/util/Duration.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×4
  • Duplicated block (32 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:173 — examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:173-204 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:176-207 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (32 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:276 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:276-307 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:279-310 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `OverflowException` names `ByteWriter.OverflowException` in one and `com.twitter.io.ByteWriter.OverflowException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (32 lines × 2) examples/core/src/main/scala/com/twitter/util/Var.scala:319 — examples/core/src/main/scala/com/twitter/util/Var.scala:319-350 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:322-353 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Var.scala` and `examples/original/core/src/main/scala/com/twitter/util/Var.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (32 lines × 2) examples/core/src/main/scala/com/twitter/util/SlowProbeProxyTimer.scala:43 — examples/core/src/main/scala/com/twitter/util/SlowProbeProxyTimer.scala:43-74 | examples/original/core/src/main/scala/com/twitter/util/SlowProbeProxyTimer.scala:46-77 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/SlowProbeProxyTimer.scala` and `examples/original/core/src/main/scala/com/twitter/util/SlowProbeProxyTimer.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 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×4
  • Duplicated block (26 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:100 — examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:100-125 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:103-128 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) examples/core/src/main/scala/com/twitter/util/Disposable.scala:96 — examples/core/src/main/scala/com/twitter/util/Disposable.scala:96-121 | examples/original/core/src/main/scala/com/twitter/util/Disposable.scala:99-124 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Disposable.scala` and `examples/original/core/src/main/scala/com/twitter/util/Disposable.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) examples/core/src/main/scala/com/twitter/util/Timer.scala:387 — examples/core/src/main/scala/com/twitter/util/Timer.scala:387-412 | examples/original/core/src/main/scala/com/twitter/util/Timer.scala:390-415 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Timer.scala` and `examples/original/core/src/main/scala/com/twitter/util/Timer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) examples/core/src/main/scala/com/twitter/util/NoFuture.scala:10 — examples/core/src/main/scala/com/twitter/util/NoFuture.scala:10-35 | examples/original/core/src/main/scala/com/twitter/util/NoFuture.scala:13-38 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/NoFuture.scala` and `examples/original/core/src/main/scala/com/twitter/util/NoFuture.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 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.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the function that made it · ×4
  • Disposable created and abandoned in the function that made it scalasig/scalasig/src/main/scala/scala/meta/scalasig/Binaries.scala:19 — `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 scalasig/scalasig/src/main/scala/scala/meta/scalasig/Binaries.scala:33 — `new JarFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and it is held in `jar`, and every later use of `jar` in its block reads a member through it — it is never returned, passed, stored, captured by a lambda, reassigned or released, 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(new JarFile(…)) { 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 check/src/main/scala/rsc/checkbase/Fingerprint.scala:43 — `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 check/src/main/scala/rsc/checkbase/ToolUtil.scala:27 — `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`.
D1 · Cyclomatic Complexity · Scanner.decimalNumber (cyclomatic 20) · ×2
  • Scanner.decimalNumber (cyclomatic 20) rsc/src/main/scala/rsc/scan/java/Scanner.scala:155 — Scanner.decimalNumber 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.
  • Scanner.decimalNumber (cyclomatic 20) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:144 — Scanner.decimalNumber 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.
D1 · Cyclomatic Complexity · Scanner.quote (cyclomatic 20) · ×2
  • Scanner.quote (cyclomatic 20) rsc/src/main/scala/rsc/scan/java/Scanner.scala:412 — Scanner.quote 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.
  • Scanner.quote (cyclomatic 20) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:478 — Scanner.quote 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.
D2 · Cognitive Complexity · Scanner.quote (cognitive 30) · ×2
  • Scanner.quote (cognitive 30) rsc/src/main/scala/rsc/scan/java/Scanner.scala:412 — Scanner.quote has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Scanner.quote (cognitive 30) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:478 — Scanner.quote has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scanner.decimalNumber (cognitive 27) · ×2
  • Scanner.decimalNumber (cognitive 27) rsc/src/main/scala/rsc/scan/java/Scanner.scala:155 — Scanner.decimalNumber has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 4 (9 pts), boolean chains 5, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Scanner.decimalNumber (cognitive 27) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:144 — Scanner.decimalNumber has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 4 (9 pts), boolean chains 5, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scanner.comment (cognitive 16) · ×2
  • Scanner.comment (cognitive 16) rsc/src/main/scala/rsc/scan/java/Scanner.scala:119 — Scanner.comment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 4). 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.
  • Scanner.comment (cognitive 16) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:108 — Scanner.comment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 4). 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.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: HardlinkOps rsc/src/main/scala/rsc/scalasig/Pickle.scala:573 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Synthesizer rsc/src/main/scala/rsc/outline/Synthesizer.scala:15 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: TreeStr.scala ↔ Dupe.scala rsc/src/main/scala/rsc/pretty/TreeStr.scala:1 — `rsc/src/main/scala/rsc/pretty/TreeStr.scala` and `rsc/src/main/scala/rsc/syntax/Dupe.scala` change together 96% of the time (23 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are `403f4bb4` Express literal type inference with Symtab.desugars.rets; `f16f19e4` Implement enums (fix #244); `c630b27c` Fix checkoutline discrepancies on JavaFunction.java — run `git show` on any of them.
  • Change coupling: Scheduler.scala ↔ Dupe.scala rsc/src/main/scala/rsc/outline/Scheduler.scala:1 — `rsc/src/main/scala/rsc/outline/Scheduler.scala` and `rsc/src/main/scala/rsc/syntax/Dupe.scala` change together 58% of the time (14 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `403f4bb4` Express literal type inference with Symtab.desugars.rets; `f16f19e4` Implement enums (fix #244); `b7e0c02d` Mjar non-wildcard existentials (fix #94) — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:184 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:184-196 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:187-199 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:201 — examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:201-213 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:204-216 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala:1180 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1180-1191 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1183-1194 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala:1254 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1254-1265 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1257-1268 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (301 lines × 2) · ×2
  • Duplicated block (301 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:1427 — examples/core/src/main/scala/com/twitter/util/Local.scala:1427-1727 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:1430-1730 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (301 lines × 2) examples/core/src/main/scala/com/twitter/util/Try.scala:25 — examples/core/src/main/scala/com/twitter/util/Try.scala:25-325 | examples/original/core/src/main/scala/com/twitter/util/Try.scala:28-328 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Try.scala` and `examples/original/core/src/main/scala/com/twitter/util/Try.scala` as WHOLE FILES: 93% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Try.scala:25` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×2
  • Duplicated block (62 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:226 — examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:226-287 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:229-290 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Offer.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (62 lines × 2) examples/core/src/main/scala/com/twitter/util/Diff.scala:69 — examples/core/src/main/scala/com/twitter/util/Diff.scala:69-130 | examples/original/core/src/main/scala/com/twitter/util/Diff.scala:72-133 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Diff.scala` and `examples/original/core/src/main/scala/com/twitter/util/Diff.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 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 `examples/core/src/main/scala/com/twitter/util/Diff.scala:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×2
  • Duplicated block (43 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:511 — examples/core/src/main/scala/com/twitter/io/Buf.scala:511-553 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:514-556 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (43 lines × 2) examples/core/src/main/scala/com/twitter/util/ClosableOnce.scala:18 — examples/core/src/main/scala/com/twitter/util/ClosableOnce.scala:18-60 | examples/original/core/src/main/scala/com/twitter/util/ClosableOnce.scala:21-63 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/ClosableOnce.scala` and `examples/original/core/src/main/scala/com/twitter/util/ClosableOnce.scala` as WHOLE FILES: 95% 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 `examples/core/src/main/scala/com/twitter/util/ClosableOnce.scala:18` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×2
  • Duplicated block (41 lines × 2) examples/core/src/main/scala/com/twitter/util/Var.scala:389 — examples/core/src/main/scala/com/twitter/util/Var.scala:389-429 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:392-432 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Var.scala` and `examples/original/core/src/main/scala/com/twitter/util/Var.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 186 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (41 lines × 2) examples/core/src/main/scala/com/twitter/io/Writer.scala:91 — examples/core/src/main/scala/com/twitter/io/Writer.scala:91-131 | examples/original/core/src/main/scala/com/twitter/io/Writer.scala:94-134 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Writer.scala` and `examples/original/core/src/main/scala/com/twitter/io/Writer.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 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 `examples/core/src/main/scala/com/twitter/io/Writer.scala:91` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (28 lines × 4) · ×2
  • Duplicated block (28 lines × 4) examples/core/src/main/scala/com/twitter/util/Local.scala:2946 — examples/core/src/main/scala/com/twitter/util/Local.scala:2946-2973 | examples/core/src/main/scala/com/twitter/util/Local.scala:3357-3384 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2949-2976 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3360-3387 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Local.scala:2946` 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 lines × 4) examples/core/src/main/scala/com/twitter/util/Local.scala:3909 — examples/core/src/main/scala/com/twitter/util/Local.scala:3909-3936 | examples/core/src/main/scala/com/twitter/util/Local.scala:4381-4408 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3912-3939 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4384-4411 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Local.scala:3909` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:134 — examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:134-156 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala:137-159 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncQueue.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriter.scala:23 — examples/core/src/main/scala/com/twitter/io/BufByteWriter.scala:23-45 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriter.scala:26-48 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/BufByteWriter.scala` and `examples/original/core/src/main/scala/com/twitter/io/BufByteWriter.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 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.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×2
  • Duplicated block (16 lines × 4) examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:66 — examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:66-81 | examples/core/src/main/scala/com/twitter/conversions/string.scala:80-95 | examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala:69-84 | examples/original/core/src/main/scala/com/twitter/conversions/string.scala:83-98 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/StringOps.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:576 — examples/core/src/main/scala/com/twitter/util/Future.scala:576-591 | examples/core/src/main/scala/com/twitter/util/Futures.scala:311-326 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:579-594 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:314-329 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:576` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:93 — examples/core/src/main/scala/com/twitter/conversions/StringOps.scala:93-107 | examples/core/src/main/scala/com/twitter/conversions/string.scala:110-124 | examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala:96-110 | examples/original/core/src/main/scala/com/twitter/conversions/string.scala:113-127 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/conversions/StringOps.scala` and `examples/original/core/src/main/scala/com/twitter/conversions/StringOps.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:539 — examples/core/src/main/scala/com/twitter/util/Future.scala:539-553 | examples/core/src/main/scala/com/twitter/util/Futures.scala:274-288 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:542-556 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:277-291 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:539` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) examples/core/src/main/scala/com/twitter/io/Buf.scala:1157 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1157-1163 | examples/core/src/main/scala/com/twitter/io/Buf.scala:1194-1200 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1160-1166 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1197-1203 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1157` it does not close everything it opens, so those exact lines 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) examples/core/src/main/scala/com/twitter/io/Buf.scala:1231 — examples/core/src/main/scala/com/twitter/io/Buf.scala:1231-1237 | examples/core/src/main/scala/com/twitter/io/Buf.scala:1268-1274 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1234-1240 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1271-1277 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:1231` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: Synthesizer (LCOM4 7) rsc/src/main/scala/rsc/outline/Synthesizer.scala:15 — Synthesizer's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ScalasigHighlevel (LCOM4 4) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:11 — ScalasigHighlevel'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.
D1 · Cyclomatic Complexity · TreeStr.impl (cyclomatic 219) · ×1
  • TreeStr.impl (cyclomatic 219) rsc/src/main/scala/rsc/pretty/TreeStr.scala:90 — TreeStr.impl has cyclomatic complexity 219 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PrettyToken.pretty (cyclomatic 204) · ×1
  • PrettyToken.pretty (cyclomatic 204) rsc/src/main/scala/rsc/pretty/PrettyToken.scala:17 — PrettyToken.pretty has cyclomatic complexity 204 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ScalasigCodec.fromClassfile (cyclomatic 111) · ×1
  • ScalasigCodec.fromClassfile (cyclomatic 111) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigCodec.scala:17 — ScalasigCodec.fromClassfile has cyclomatic complexity 111 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ScalasigCodec.toClassfile (cyclomatic 91) · ×1
  • ScalasigCodec.toClassfile (cyclomatic 91) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigCodec.scala:243 — ScalasigCodec.toClassfile has cyclomatic complexity 91 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Outliner.resolveSym (cyclomatic 54) · ×1
  • Outliner.resolveSym (cyclomatic 54) rsc/src/main/scala/rsc/outline/Outliner.scala:213 — Outliner.resolveSym has cyclomatic complexity 54 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticdbPrinter.pprint (cyclomatic 50) · ×1
  • SemanticdbPrinter.pprint (cyclomatic 50) scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:24 — SemanticdbPrinter.pprint has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefnOps.properties (cyclomatic 41) · ×1
  • DefnOps.properties (cyclomatic 41) rsc/src/main/scala/rsc/semanticdb/Defns.scala:71 — DefnOps.properties has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HardlinkOps.flags (cyclomatic 40) · ×1
  • HardlinkOps.flags (cyclomatic 40) rsc/src/main/scala/rsc/scalasig/Pickle.scala:805 — HardlinkOps.flags has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TptOps.tpe (cyclomatic 40) · ×1
  • TptOps.tpe (cyclomatic 40) rsc/src/main/scala/rsc/semanticdb/Tpts.scala:17 — TptOps.tpe has cyclomatic complexity 40 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Scanner.operator (cyclomatic 36) · ×1
  • Scanner.operator (cyclomatic 36) rsc/src/main/scala/rsc/scan/java/Scanner.scala:271 — Scanner.operator has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Scheduler.assignSym (cyclomatic 33) · ×1
  • Scheduler.assignSym (cyclomatic 33) rsc/src/main/scala/rsc/outline/Scheduler.scala:52 — Scheduler.assignSym has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Scanner.dispatchNormal (cyclomatic 33) · ×1
  • Scanner.dispatchNormal (cyclomatic 33) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:226 — Scanner.dispatchNormal has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PrettyOutline.desc (cyclomatic 29) · ×1
  • PrettyOutline.desc (cyclomatic 29) rsc/src/main/scala/rsc/pretty/PrettyOutline.scala:9 — PrettyOutline.desc has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Terms.term1 (cyclomatic 28) · ×1
  • Terms.term1 (cyclomatic 28) rsc/src/main/scala/rsc/parse/scala/Terms.scala:50 — Terms.term1 has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Scanner.next (cyclomatic 27) · ×1
  • Scanner.next (cyclomatic 27) rsc/src/main/scala/rsc/scan/java/Scanner.scala:18 — Scanner.next 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.
D1 · Cyclomatic Complexity · TypeTypeOps.stpe (cyclomatic 26) · ×1
  • TypeTypeOps.stpe (cyclomatic 26) rsc/src/main/scala/rsc/classpath/scalacp/Types.scala:14 — TypeTypeOps.stpe has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SymbolInformationOps.sprops (cyclomatic 25) · ×1
  • SymbolInformationOps.sprops (cyclomatic 25) rsc/src/main/scala/rsc/classpath/scalacp/SymbolInformations.scala:49 — SymbolInformationOps.sprops has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RscCompat.collectRewriteTargets (cyclomatic 24) · ×1
  • RscCompat.collectRewriteTargets (cyclomatic 24) scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:100 — RscCompat.collectRewriteTargets 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.
D1 · Cyclomatic Complexity · Templates.templateBraces (cyclomatic 23) · ×1
  • Templates.templateBraces (cyclomatic 23) rsc/src/main/scala/rsc/parse/scala/Templates.scala:88 — Templates.templateBraces has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Javacp.sinfos (cyclomatic 22) · ×1
  • Javacp.sinfos (cyclomatic 22) rsc/src/main/scala/rsc/classpath/javacp/Javacp.scala:25 — Javacp.sinfos has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Pats.simplePat (cyclomatic 22) · ×1
  • Pats.simplePat (cyclomatic 22) rsc/src/main/scala/rsc/parse/scala/Pats.scala:85 — Pats.simplePat has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TemplateOps.desugaredParents (cyclomatic 22) · ×1
  • TemplateOps.desugaredParents (cyclomatic 22) rsc/src/main/scala/rsc/semanticdb/Templates.scala:15 — TemplateOps.desugaredParents has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Outliner.apply (cyclomatic 21) · ×1
  • Outliner.apply (cyclomatic 21) rsc/src/main/scala/rsc/outline/Outliner.scala:139 — Outliner.apply has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Scheduler.sketch (cyclomatic 21) · ×1
  • Scheduler.sketch (cyclomatic 21) rsc/src/main/scala/rsc/outline/Scheduler.scala:547 — Scheduler.sketch has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Settings.parse (cyclomatic 21) · ×1
  • Settings.parse (cyclomatic 21) rsc/src/main/scala/rsc/settings/Settings.scala:22 — Settings.parse has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Terms.maybeLit (cyclomatic 20) · ×1
  • Terms.maybeLit (cyclomatic 20) rsc/src/main/scala/rsc/parse/java/Terms.scala:32 — Terms.maybeLit has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · in.nextToken (cyclomatic 20) · ×1
  • in.nextToken (cyclomatic 20) rsc/src/main/scala/rsc/parse/scala/Scanners.scala:29 — in.nextToken has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Pickle.emitSig (cyclomatic 20) · ×1
  • Pickle.emitSig (cyclomatic 20) rsc/src/main/scala/rsc/scalasig/Pickle.scala:173 — Pickle.emitSig has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Prefixes.prefix (cyclomatic 20) · ×1
  • Prefixes.prefix (cyclomatic 20) rsc/src/main/scala/rsc/semanticdb/Prefixes.scala:19 — Prefixes.prefix has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticdbPrinter.pprint (cyclomatic 20) · ×1
  • SemanticdbPrinter.pprint (cyclomatic 20) scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:219 — SemanticdbPrinter.pprint has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Lits.literal (cyclomatic 19) · ×1
  • Lits.literal (cyclomatic 19) rsc/src/main/scala/rsc/parse/scala/Lits.scala:20 — Lits.literal has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Terms.blockStats (cyclomatic 19) · ×1
  • Terms.blockStats (cyclomatic 19) rsc/src/main/scala/rsc/parse/scala/Terms.scala:447 — Terms.blockStats has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Str.generatedMessage (cyclomatic 19) · ×1
  • Str.generatedMessage (cyclomatic 19) rsc/src/main/scala/rsc/pretty/Str.scala:115 — Str.generatedMessage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TreeStr.printStats (cyclomatic 19) · ×1
  • TreeStr.printStats (cyclomatic 19) rsc/src/main/scala/rsc/pretty/TreeStr.scala:813 — TreeStr.printStats has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainBase.process (cyclomatic 18) · ×1
  • MainBase.process (cyclomatic 18) check/src/main/scala/rsc/checkbase/MainBase.scala:26 — MainBase.process has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SymbolFormatOps.sdesc (cyclomatic 18) · ×1
  • SymbolFormatOps.sdesc (cyclomatic 18) rsc/src/main/scala/rsc/classpath/scalacp/Symbols.scala:80 — SymbolFormatOps.sdesc has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Scheduler.defnTemplate (cyclomatic 18) · ×1
  • Scheduler.defnTemplate (cyclomatic 18) rsc/src/main/scala/rsc/outline/Scheduler.scala:302 — Scheduler.defnTemplate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Terms.simpleTerm (cyclomatic 18) · ×1
  • Terms.simpleTerm (cyclomatic 18) rsc/src/main/scala/rsc/parse/scala/Terms.scala:243 — Terms.simpleTerm has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Pickle.emitEmbeddedSym (cyclomatic 18) · ×1
  • Pickle.emitEmbeddedSym (cyclomatic 18) rsc/src/main/scala/rsc/scalasig/Pickle.scala:78 — Pickle.emitEmbeddedSym has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RscCompat.ascribeInferredType (cyclomatic 18) · ×1
  • RscCompat.ascribeInferredType (cyclomatic 18) scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:266 — RscCompat.ascribeInferredType has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · LsymOps.id (cyclomatic 18) · ×1
  • LsymOps.id (cyclomatic 18) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:619 — LsymOps.id has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ScalasigHighlevel.process (cyclomatic 90) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SymbolInformationOps.skind (cyclomatic 17) · ×1
  • SymbolInformationOps.skind (cyclomatic 17) rsc/src/main/scala/rsc/classpath/scalacp/SymbolInformations.scala:23 — SymbolInformationOps.skind has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Pickle.emitTpe (cyclomatic 17) · ×1
  • Pickle.emitTpe (cyclomatic 17) rsc/src/main/scala/rsc/scalasig/Pickle.scala:254 — Pickle.emitTpe has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HardlinkOps.ssig (cyclomatic 17) · ×1
  • HardlinkOps.ssig (cyclomatic 17) rsc/src/main/scala/rsc/scalasig/Pickle.scala:847 — HardlinkOps.ssig has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefnOps.access (cyclomatic 17) · ×1
  • DefnOps.access (cyclomatic 17) rsc/src/main/scala/rsc/semanticdb/Defns.scala:181 — DefnOps.access 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: DefnOps.kind (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HighlevelEntityPrettifier.apply (cyclomatic 17) · ×1
  • HighlevelEntityPrettifier.apply (cyclomatic 17) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:52 — HighlevelEntityPrettifier.apply has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: HighlevelEntityPrettifier.entityTag (cyclomatic 85) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Checker.check (cyclomatic 16) · ×1
  • Checker.check (cyclomatic 16) check/src/main/scala/rsc/checkoutline/Checker.scala:18 — Checker.check has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Scheduler.stats (cyclomatic 16) · ×1
  • Scheduler.stats (cyclomatic 16) rsc/src/main/scala/rsc/outline/Scheduler.scala:650 — Scheduler.stats has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Modifiers.mods (cyclomatic 16) · ×1
  • Modifiers.mods (cyclomatic 16) rsc/src/main/scala/rsc/parse/java/Modifiers.scala:12 — Modifiers.mods has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Modifiers.defnFlags (cyclomatic 16) · ×1
  • Modifiers.defnFlags (cyclomatic 16) rsc/src/main/scala/rsc/parse/scala/Modifiers.scala:81 — Modifiers.defnFlags 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.
D2 · Cognitive Complexity · TreeStr.impl (cognitive 133) · ×1
  • TreeStr.impl (cognitive 133) rsc/src/main/scala/rsc/pretty/TreeStr.scala:90 — TreeStr.impl has cognitive complexity 133 (threshold 15). Drivers by points: match/switch 34 (77 pts), if/else 31 (50 pts), boolean chains 6 (nesting depth added 62). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SemanticdbPrinter.pprint (cognitive 93) · ×1
  • SemanticdbPrinter.pprint (cognitive 93) scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:24 — SemanticdbPrinter.pprint has cognitive complexity 93 (threshold 15). Drivers by points: if/else 34 (56 pts), match/switch 11 (30 pts), boolean chains 7 (nesting depth added 41). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ScalasigCodec.fromClassfile (cognitive 73) · ×1
  • ScalasigCodec.fromClassfile (cognitive 73) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigCodec.scala:17 — ScalasigCodec.fromClassfile has cognitive complexity 73 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 8 (26 pts), match/switch 5 (13 pts), boolean chains 2 (nesting depth added 43). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Outliner.resolveSym (cognitive 70) · ×1
  • Outliner.resolveSym (cognitive 70) rsc/src/main/scala/rsc/outline/Outliner.scala:213 — Outliner.resolveSym has cognitive complexity 70 (threshold 15). Drivers by points: match/switch 13 (42 pts), if/else 11 (28 pts) (nesting depth added 46). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scanner.operator (cognitive 70) · ×1
  • Scanner.operator (cognitive 70) rsc/src/main/scala/rsc/scan/java/Scanner.scala:271 — Scanner.operator has cognitive complexity 70 (threshold 15). Drivers by points: if/else 51 (70 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scheduler.assignSym (cognitive 53) · ×1
  • Scheduler.assignSym (cognitive 53) rsc/src/main/scala/rsc/outline/Scheduler.scala:52 — Scheduler.assignSym has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 9 (24 pts) (nesting depth added 31). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Javacp.sinfos (cognitive 47) · ×1
  • Javacp.sinfos (cognitive 47) rsc/src/main/scala/rsc/classpath/javacp/Javacp.scala:25 — Javacp.sinfos has cognitive complexity 47 (threshold 15). Drivers by points: if/else 27 (35 pts), match/switch 5 (10 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Terms.term1 (cognitive 47) · ×1
  • Terms.term1 (cognitive 47) rsc/src/main/scala/rsc/parse/scala/Terms.scala:50 — Terms.term1 has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (35 pts), match/switch 5 (11 pts), boolean chains 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.
D2 · Cognitive Complexity · HighlevelEntityPrettifier.apply (cognitive 46) · ×1
  • HighlevelEntityPrettifier.apply (cognitive 46) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:52 — HighlevelEntityPrettifier.apply has cognitive complexity 46 (threshold 15). Drivers by points: match/switch 6 (26 pts), if/else 13 (18 pts), loops 1 (2 pts) (nesting depth added 26). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LowlevelEntityPrettifier.apply (cognitive 46) · ×1
  • LowlevelEntityPrettifier.apply (cognitive 46) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:209 — LowlevelEntityPrettifier.apply has cognitive complexity 46 (threshold 15). Drivers by points: match/switch 6 (26 pts), if/else 13 (18 pts), loops 1 (2 pts) (nesting depth added 26). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SymbolInformationOps.sprops (cognitive 42) · ×1
  • SymbolInformationOps.sprops (cognitive 42) rsc/src/main/scala/rsc/classpath/scalacp/SymbolInformations.scala:49 — SymbolInformationOps.sprops has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 9 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · in.nextToken (cognitive 42) · ×1
  • in.nextToken (cognitive 42) rsc/src/main/scala/rsc/parse/scala/Scanners.scala:29 — in.nextToken has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Prefixes.prefix (cognitive 42) · ×1
  • Prefixes.prefix (cognitive 42) rsc/src/main/scala/rsc/semanticdb/Prefixes.scala:19 — Prefixes.prefix has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 7 (31 pts), if/else 9, boolean chains 2 (nesting depth added 24). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scanner.string (cognitive 41) · ×1
  • Scanner.string (cognitive 41) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:548 — Scanner.string has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (9 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HardlinkOps.flags (cognitive 39) · ×1
  • HardlinkOps.flags (cognitive 39) rsc/src/main/scala/rsc/scalasig/Pickle.scala:805 — HardlinkOps.flags has cognitive complexity 39 (threshold 15). Drivers by points: if/else 35, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DefnOps.properties (cognitive 39) · ×1
  • DefnOps.properties (cognitive 39) rsc/src/main/scala/rsc/semanticdb/Defns.scala:71 — DefnOps.properties has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28, boolean chains 6, match/switch 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Str.generatedMessage (cognitive 36) · ×1
  • Str.generatedMessage (cognitive 36) rsc/src/main/scala/rsc/pretty/Str.scala:115 — Str.generatedMessage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (35 pts), match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TreeStr.printStats (cognitive 36) · ×1
  • TreeStr.printStats (cognitive 36) rsc/src/main/scala/rsc/pretty/TreeStr.scala:813 — TreeStr.printStats has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 4 (14 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pats.simplePat (cognitive 35) · ×1
  • Pats.simplePat (cognitive 35) rsc/src/main/scala/rsc/parse/scala/Pats.scala:85 — Pats.simplePat has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 5 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Templates.templateBraces (cognitive 34) · ×1
  • Templates.templateBraces (cognitive 34) rsc/src/main/scala/rsc/parse/scala/Templates.scala:88 — Templates.templateBraces has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EligibilityOps.isVisible (cognitive 34) · ×1
  • EligibilityOps.isVisible (cognitive 34) rsc/src/main/scala/rsc/semanticdb/Eligibility.scala:18 — EligibilityOps.isVisible has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 2 (8 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TemplateOps.desugaredParents (cognitive 34) · ×1
  • TemplateOps.desugaredParents (cognitive 34) rsc/src/main/scala/rsc/semanticdb/Templates.scala:15 — TemplateOps.desugaredParents has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 7 (15 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RscCompat.targetsForPolymorphicDefaultParams (cognitive 34) · ×1
  • RscCompat.targetsForPolymorphicDefaultParams (cognitive 34) scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:214 — RscCompat.targetsForPolymorphicDefaultParams has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (15 pts), match/switch 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Synthesizer.paramss (cognitive 33) · ×1
  • Synthesizer.paramss (cognitive 33) rsc/src/main/scala/rsc/outline/Synthesizer.scala:243 — Synthesizer.paramss has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 4 (12 pts), boolean chains 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Index.apply (cognitive 32) · ×1
  • Index.apply (cognitive 32) rsc/src/main/scala/rsc/classpath/Index.scala:32 — Index.apply has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Terms.maybeLit (cognitive 32) · ×1
  • Terms.maybeLit (cognitive 32) rsc/src/main/scala/rsc/parse/java/Terms.scala:32 — Terms.maybeLit has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 2 (3 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scheduler.defnTemplate (cognitive 31) · ×1
  • Scheduler.defnTemplate (cognitive 31) rsc/src/main/scala/rsc/outline/Scheduler.scala:302 — Scheduler.defnTemplate has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 7 (11 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ClassfileReader.decode7to8 (cognitive 31) · ×1
  • ClassfileReader.decode7to8 (cognitive 31) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileReader.scala:44 — ClassfileReader.decode7to8 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Params.overridesNonNullary (cognitive 30) · ×1
  • Params.overridesNonNullary (cognitive 30) rsc/src/main/scala/rsc/semanticdb/Params.scala:34 — Params.overridesNonNullary has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 8 (21 pts), if/else 7, boolean chains 2 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RscCompat.ascribeInferredType (cognitive 29) · ×1
  • RscCompat.ascribeInferredType (cognitive 29) scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:266 — RscCompat.ascribeInferredType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 6 (11 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pickle.emitEmbeddedSym (cognitive 28) · ×1
  • Pickle.emitEmbeddedSym (cognitive 28) rsc/src/main/scala/rsc/scalasig/Pickle.scala:78 — Pickle.emitEmbeddedSym has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pickle.emitSig (cognitive 28) · ×1
  • Pickle.emitSig (cognitive 28) rsc/src/main/scala/rsc/scalasig/Pickle.scala:173 — Pickle.emitSig has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SemanticdbPrinter.pprint (cognitive 28) · ×1
  • SemanticdbPrinter.pprint (cognitive 28) scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:219 — SemanticdbPrinter.pprint has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (18 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HardlinkOps.ssig (cognitive 27) · ×1
  • HardlinkOps.ssig (cognitive 27) rsc/src/main/scala/rsc/scalasig/Pickle.scala:847 — HardlinkOps.ssig has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 5 (9 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SymbolFormatOps.sdesc (cognitive 26) · ×1
  • SymbolFormatOps.sdesc (cognitive 26) rsc/src/main/scala/rsc/classpath/scalacp/Symbols.scala:80 — SymbolFormatOps.sdesc has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 4 (12 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Defns.defnDef (cognitive 26) · ×1
  • Defns.defnDef (cognitive 26) rsc/src/main/scala/rsc/parse/scala/Defns.scala:23 — Defns.defnDef has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Paths.rawPath (cognitive 26) · ×1
  • Paths.rawPath (cognitive 26) rsc/src/main/scala/rsc/parse/scala/Paths.scala:111 — Paths.rawPath has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (26 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scanner.dispatchNormal (cognitive 26) · ×1
  • Scanner.dispatchNormal (cognitive 26) rsc/src/main/scala/rsc/scan/scala/Scanner.scala:226 — Scanner.dispatchNormal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Modifiers.defnFlags (cognitive 25) · ×1
  • Modifiers.defnFlags (cognitive 25) rsc/src/main/scala/rsc/parse/scala/Modifiers.scala:81 — Modifiers.defnFlags has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Pickle.emitScope (cognitive 25) · ×1
  • Pickle.emitScope (cognitive 25) rsc/src/main/scala/rsc/scalasig/Pickle.scala:139 — Pickle.emitScope has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolOps.name (cognitive 25) · ×1
  • SymbolOps.name (cognitive 25) rsc/src/main/scala/rsc/scalasig/Pickle.scala:531 — SymbolOps.name has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Writer.writeChildren (cognitive 24) · ×1
  • Writer.writeChildren (cognitive 24) rsc/src/main/scala/rsc/semanticdb/Writer.scala:100 — Writer.writeChildren has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 4 (10 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ClassfileWriter.encode8to7 (cognitive 24) · ×1
  • ClassfileWriter.encode8to7 (cognitive 24) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileWriter.scala:20 — ClassfileWriter.encode8to7 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SymbolInformationOps.skind (cognitive 23) · ×1
  • SymbolInformationOps.skind (cognitive 23) rsc/src/main/scala/rsc/classpath/scalacp/SymbolInformations.scala:23 — SymbolInformationOps.skind has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Outliner.apply (cognitive 23) · ×1
  • Outliner.apply (cognitive 23) rsc/src/main/scala/rsc/outline/Outliner.scala:32 — Outliner.apply has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 4 (11 pts) (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Work.block (cognitive 23) · ×1
  • Work.block (cognitive 23) rsc/src/main/scala/rsc/outline/Work.scala:12 — Work.block has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 3 (6 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MainBase.process (cognitive 22) · ×1
  • MainBase.process (cognitive 22) check/src/main/scala/rsc/checkbase/MainBase.scala:26 — MainBase.process has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2, error handling 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.
D2 · Cognitive Complexity · Env.resolve (cognitive 22) · ×1
  • Env.resolve (cognitive 22) rsc/src/main/scala/rsc/outline/Env.scala:41 — Env.resolve has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 4 (7 pts), loops 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Terms.simpleTerm (cognitive 22) · ×1
  • Terms.simpleTerm (cognitive 22) rsc/src/main/scala/rsc/parse/scala/Terms.scala:243 — Terms.simpleTerm has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4 (9 pts), loops 1 (2 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DefnOps.access (cognitive 22) · ×1
  • DefnOps.access (cognitive 22) rsc/src/main/scala/rsc/semanticdb/Defns.scala:181 — DefnOps.access has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 6 (9 pts), boolean chains 2 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LsymOps.id (cognitive 22) · ×1
  • LsymOps.id (cognitive 22) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:619 — LsymOps.id has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 3 (6 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scheduler.stats (cognitive 21) · ×1
  • Scheduler.stats (cognitive 21) rsc/src/main/scala/rsc/outline/Scheduler.scala:650 — Scheduler.stats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 4 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Defns.templateStats (cognitive 21) · ×1
  • Defns.templateStats (cognitive 21) rsc/src/main/scala/rsc/parse/java/Defns.scala:89 — Defns.templateStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Terms.blockStats (cognitive 21) · ×1
  • Terms.blockStats (cognitive 21) rsc/src/main/scala/rsc/parse/scala/Terms.scala:447 — Terms.blockStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Prefixes.prefix (cognitive 21) · ×1
  • Prefixes.prefix (cognitive 21) rsc/src/main/scala/rsc/semanticdb/Prefixes.scala:89 — Prefixes.prefix has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 8 (9 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TptOps.tpe (cognitive 21) · ×1
  • TptOps.tpe (cognitive 21) rsc/src/main/scala/rsc/semanticdb/Tpts.scala:17 — TptOps.tpe has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 5 (10 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Checker.check (cognitive 20) · ×1
  • Checker.check (cognitive 20) check/src/main/scala/rsc/checkoutline/Checker.scala:18 — Checker.check has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Classpath.load (cognitive 20) · ×1
  • Classpath.load (cognitive 20) rsc/src/main/scala/rsc/classpath/Classpath.scala:44 — Classpath.load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lits.literal (cognitive 20) · ×1
  • Lits.literal (cognitive 20) rsc/src/main/scala/rsc/parse/scala/Lits.scala:20 — Lits.literal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 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.
D2 · Cognitive Complexity · Binaries.apply (cognitive 20) · ×1
  • Binaries.apply (cognitive 20) scalasig/scalasig/src/main/scala/scala/meta/scalasig/Binaries.scala:17 — Binaries.apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (3 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Synthesizer.defaultGetters (cognitive 18) · ×1
  • Synthesizer.defaultGetters (cognitive 18) rsc/src/main/scala/rsc/outline/Synthesizer.scala:75 — Synthesizer.defaultGetters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Sources.packageStats (cognitive 18) · ×1
  • Sources.packageStats (cognitive 18) rsc/src/main/scala/rsc/parse/scala/Sources.scala:53 — Sources.packageStats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Scanner.next (cognitive 18) · ×1
  • Scanner.next (cognitive 18) rsc/src/main/scala/rsc/scan/java/Scanner.scala:18 — Scanner.next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Compiler.run (cognitive 17) · ×1
  • Compiler.run (cognitive 17) rsc/src/main/scala/rsc/Compiler.scala:32 — Compiler.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolInformationOps.saccess (cognitive 17) · ×1
  • SymbolInformationOps.saccess (cognitive 17) rsc/src/main/scala/rsc/classpath/scalacp/SymbolInformations.scala:133 — SymbolInformationOps.saccess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 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.
D2 · Cognitive Complexity · Outliner.apply (cognitive 17) · ×1
  • Outliner.apply (cognitive 17) rsc/src/main/scala/rsc/outline/Outliner.scala:76 — Outliner.apply has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 3 (7 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Scheduler.parents (cognitive 17) · ×1
  • Scheduler.parents (cognitive 17) rsc/src/main/scala/rsc/outline/Scheduler.scala:459 — Scheduler.parents has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ImporterScope.resolve (cognitive 17) · ×1
  • ImporterScope.resolve (cognitive 17) rsc/src/main/scala/rsc/outline/Scopes.scala:317 — ImporterScope.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Defns.defnValOrVar (cognitive 17) · ×1
  • Defns.defnValOrVar (cognitive 17) rsc/src/main/scala/rsc/parse/scala/Defns.scala:128 — Defns.defnValOrVar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PrettyOutline.desc (cognitive 17) · ×1
  • PrettyOutline.desc (cognitive 17) rsc/src/main/scala/rsc/pretty/PrettyOutline.scala:9 — PrettyOutline.desc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4 (7 pts) (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Pickle.emitExternalSym (cognitive 17) · ×1
  • Pickle.emitExternalSym (cognitive 17) rsc/src/main/scala/rsc/scalasig/Pickle.scala:40 — Pickle.emitExternalSym has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Synthesizer.paramAccessors (cognitive 16) · ×1
  • Synthesizer.paramAccessors (cognitive 16) rsc/src/main/scala/rsc/outline/Synthesizer.scala:206 — Synthesizer.paramAccessors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PrettyWork.str (cognitive 16) · ×1
  • PrettyWork.str (cognitive 16) rsc/src/main/scala/rsc/pretty/PrettyWork.scala:23 — PrettyWork.str has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassfileCodec.fromBinary (cognitive 16) · ×1
  • ClassfileCodec.fromBinary (cognitive 16) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileCodec.scala:14 — ClassfileCodec.fromBinary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 2 (6 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: TreeStr rsc/src/main/scala/rsc/pretty/TreeStr.scala:11 — ClassTooLong — 781 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 381 over it, 1.95× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×1
  • Duplicated block (68 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:413 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:413-480 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:479-546 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) rsc/src/main/scala/rsc/scan/java/Scanner.scala:156 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:156-208 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:145-197 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) rsc/src/main/scala/rsc/parse/scala/Templates.scala:145 — rsc/src/main/scala/rsc/parse/scala/Templates.scala:145-178 | rsc/src/main/scala/rsc/parse/scala/Terms.scala:479-513 — 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 `rsc/src/main/scala/rsc/parse/scala/Templates.scala:145` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) rsc/src/main/scala/rsc/scan/java/Scanner.scala:455 — rsc/src/main/scala/rsc/scan/java/Scanner.scala:455-470 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:521-536 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:568-583 — `rsc/src/main/scala/rsc/scan/java/Scanner.scala` and `rsc/src/main/scala/rsc/scan/scala/Scanner.scala` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 9 separate duplicated blocks between them, totalling at least 234 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/scan/java/Scanner.scala:455` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–15 lines × 2) · ×1
  • Duplicated block (9–15 lines × 2) scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:155 — scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:155-169 | scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:189-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:155` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) rsc/src/main/scala/rsc/parse/scala/Sources.scala:61 — rsc/src/main/scala/rsc/parse/scala/Sources.scala:61-74 | rsc/src/main/scala/rsc/parse/scala/Templates.scala:138-151 | rsc/src/main/scala/rsc/parse/scala/Terms.scala:472-485 — 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 `rsc/src/main/scala/rsc/parse/scala/Sources.scala:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) check/src/main/scala/rsc/checkbytecode/Settings.scala:47 — check/src/main/scala/rsc/checkbytecode/Settings.scala:47-59 | check/src/main/scala/rsc/checkoutline/Settings.scala:25-37 | check/src/main/scala/rsc/checkparse/Settings.scala:20-32 | check/src/main/scala/rsc/checkscalasig/Settings.scala:36-48 — 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 `check/src/main/scala/rsc/checkbytecode/Settings.scala:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `check/src/main/scala/rsc/checkoutline/Settings.scala:23` calls `split`, `get`, `loop` and `check/src/main/scala/rsc/checkparse/Settings.scala:19` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) rsc/src/main/scala/rsc/outline/Synthesizer.scala:421 — rsc/src/main/scala/rsc/outline/Synthesizer.scala:421-431 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:599-609 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:668-678 — 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 `rsc/src/main/scala/rsc/outline/Synthesizer.scala:421` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) rsc/src/main/scala/rsc/outline/Outliner.scala:235 — rsc/src/main/scala/rsc/outline/Outliner.scala:235-244 | rsc/src/main/scala/rsc/outline/Outliner.scala:263-272 | rsc/src/main/scala/rsc/outline/Outliner.scala:301-311 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) rsc/src/main/scala/rsc/report/Messages.scala:232 — rsc/src/main/scala/rsc/report/Messages.scala:232-240 | rsc/src/main/scala/rsc/report/Messages.scala:247-255 | rsc/src/main/scala/rsc/report/Messages.scala:317-325 | rsc/src/main/scala/rsc/report/Messages.scala:332-340 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/report/Messages.scala:232` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) rsc/src/main/scala/rsc/parse/scala/Templates.scala:165 — rsc/src/main/scala/rsc/parse/scala/Templates.scala:165-172 | rsc/src/main/scala/rsc/parse/scala/Terms.scala:499-506 | rsc/src/main/scala/rsc/parse/scala/Tpts.scala:140-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `rsc/src/main/scala/rsc/parse/scala/Templates.scala:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) rsc/src/main/scala/rsc/parse/java/Terms.scala:45 — rsc/src/main/scala/rsc/parse/java/Terms.scala:45-52 | rsc/src/main/scala/rsc/parse/scala/Lits.scala:21-27 — 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 `rsc/src/main/scala/rsc/parse/java/Terms.scala:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Near-duplicate member family (4 members, 5 shared lines) · ×1
  • Near-duplicate member family (4 members, 5 shared lines) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:448 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:448-461 | examples/core/src/main/scala/com/twitter/io/ByteReader.scala:479-493 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:451-464 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:482-496 — These 4 members are variants of one another: a block of 5 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member pair (70 shared lines) · ×1
  • Near-duplicate member pair (70 shared lines) examples/core/src/main/scala/com/twitter/io/Buf.scala:91 — examples/core/src/main/scala/com/twitter/io/Buf.scala:91-170 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:94-173 — These two members are variants of one another: 70 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:424 — examples/core/src/main/scala/com/twitter/util/Local.scala:424-464 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:427-467 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:463 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:463-477 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:466-480 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:433 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:433-446 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:436-449 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (60 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (60 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/Future.scala:412 — examples/core/src/main/scala/com/twitter/util/Future.scala:412-423 | examples/core/src/main/scala/com/twitter/util/Future.scala:440-452 | examples/core/src/main/scala/com/twitter/util/Future.scala:470-483 | examples/core/src/main/scala/com/twitter/util/Future.scala:502-517 | examples/core/src/main/scala/com/twitter/util/Future.scala:538-553 | examples/core/src/main/scala/com/twitter/util/Future.scala:575-591 | examples/core/src/main/scala/com/twitter/util/Future.scala:614-631 | examples/core/src/main/scala/com/twitter/util/Future.scala:655-673 | examples/core/src/main/scala/com/twitter/util/Future.scala:698-717 | examples/core/src/main/scala/com/twitter/util/Future.scala:743-763 | examples/core/src/main/scala/com/twitter/util/Future.scala:790-811 | examples/core/src/main/scala/com/twitter/util/Future.scala:839-861 | examples/core/src/main/scala/com/twitter/util/Future.scala:890-913 | examples/core/src/main/scala/com/twitter/util/Future.scala:943-967 | examples/core/src/main/scala/com/twitter/util/Future.scala:998-1023 | examples/core/src/main/scala/com/twitter/util/Futures.scala:146-157 | examples/core/src/main/scala/com/twitter/util/Futures.scala:174-186 | examples/core/src/main/scala/com/twitter/util/Futures.scala:204-218 | examples/core/src/main/scala/com/twitter/util/Futures.scala:238-252 | examples/core/src/main/scala/com/twitter/util/Futures.scala:273-288 | examples/core/src/main/scala/com/twitter/util/Futures.scala:310-326 | examples/core/src/main/scala/com/twitter/util/Futures.scala:349-366 | examples/core/src/main/scala/com/twitter/util/Futures.scala:390-408 | examples/core/src/main/scala/com/twitter/util/Futures.scala:433-452 | examples/core/src/main/scala/com/twitter/util/Futures.scala:478-498 | examples/core/src/main/scala/com/twitter/util/Futures.scala:525-546 | examples/core/src/main/scala/com/twitter/util/Futures.scala:574-596 | examples/core/src/main/scala/com/twitter/util/Futures.scala:625-648 | examples/core/src/main/scala/com/twitter/util/Futures.scala:678-702 | examples/core/src/main/scala/com/twitter/util/Futures.scala:733-758 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:415-426 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:443-455 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:473-486 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:505-520 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:541-556 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:578-594 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:617-634 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:658-676 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:701-720 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:746-766 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:793-814 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:842-864 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:893-916 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:946-970 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1001-1026 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:149-160 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:177-189 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:207-221 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:241-255 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:276-291 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:313-329 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:352-369 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:393-411 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:436-455 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:481-501 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:528-549 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:577-599 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:628-651 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:681-705 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:736-761 — These 60 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 60 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 60 times.
D4 · Code Duplication · Members sharing a duplicated core (34 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (34 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/Activity.scala:296 — examples/core/src/main/scala/com/twitter/util/Activity.scala:296-305 | examples/core/src/main/scala/com/twitter/util/Activity.scala:320-330 | examples/core/src/main/scala/com/twitter/util/Activity.scala:346-357 | examples/core/src/main/scala/com/twitter/util/Activity.scala:374-386 | examples/core/src/main/scala/com/twitter/util/Activity.scala:404-418 | examples/core/src/main/scala/com/twitter/util/Activity.scala:438-452 | examples/core/src/main/scala/com/twitter/util/Activity.scala:473-488 | examples/core/src/main/scala/com/twitter/util/Activity.scala:510-526 | examples/core/src/main/scala/com/twitter/util/Activity.scala:549-566 | examples/core/src/main/scala/com/twitter/util/Activity.scala:590-608 | examples/core/src/main/scala/com/twitter/util/Activity.scala:633-652 | examples/core/src/main/scala/com/twitter/util/Activity.scala:678-698 | examples/core/src/main/scala/com/twitter/util/Activity.scala:725-746 | examples/core/src/main/scala/com/twitter/util/Activity.scala:774-796 | examples/core/src/main/scala/com/twitter/util/Activity.scala:825-848 | examples/core/src/main/scala/com/twitter/util/Activity.scala:878-902 | examples/core/src/main/scala/com/twitter/util/Activity.scala:933-958 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:299-308 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:323-333 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:349-360 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:377-389 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:407-421 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:441-455 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:476-491 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:513-529 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:552-569 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:593-611 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:636-655 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:681-701 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:728-749 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:777-799 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:828-851 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:881-905 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:936-961 — These 34 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 34 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 34 times.
D4 · Code Duplication · Members sharing a duplicated core (16 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (16 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/Local.scala:330 — examples/core/src/main/scala/com/twitter/util/Local.scala:330-338 | examples/core/src/main/scala/com/twitter/util/Local.scala:392-401 | examples/core/src/main/scala/com/twitter/util/Local.scala:491-501 | examples/core/src/main/scala/com/twitter/util/Local.scala:810-821 | examples/core/src/main/scala/com/twitter/util/Local.scala:1412-1424 | examples/core/src/main/scala/com/twitter/util/Local.scala:2115-2128 | examples/core/src/main/scala/com/twitter/util/Local.scala:2927-2941 | examples/core/src/main/scala/com/twitter/util/Local.scala:3856-3871 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:333-341 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:395-404 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:494-504 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:813-824 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:1415-1427 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2118-2131 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2930-2944 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3859-3874 — These 16 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 16 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 16 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) examples/core/src/main/scala/com/twitter/util/Local.scala:2944 — examples/core/src/main/scala/com/twitter/util/Local.scala:2944-3350 | examples/core/src/main/scala/com/twitter/util/Local.scala:3353-3819 | examples/core/src/main/scala/com/twitter/util/Local.scala:3874-4339 | examples/core/src/main/scala/com/twitter/util/Local.scala:4342-4837 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2947-3353 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3356-3822 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3877-4342 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4345-4840 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Duplicated block (496 lines × 2) · ×1
  • Duplicated block (496 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:4342 — examples/core/src/main/scala/com/twitter/util/Local.scala:4342-4837 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4345-4840 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (467 lines × 2) · ×1
  • Duplicated block (467 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:3353 — examples/core/src/main/scala/com/twitter/util/Local.scala:3353-3819 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3356-3822 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (466 lines × 2) · ×1
  • Duplicated block (466 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:3874 — examples/core/src/main/scala/com/twitter/util/Local.scala:3874-4339 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3877-4342 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (408 lines × 2) · ×1
  • Duplicated block (408 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:2485 — examples/core/src/main/scala/com/twitter/util/Local.scala:2485-2892 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2488-2895 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (407 lines × 2) · ×1
  • Duplicated block (407 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:2944 — examples/core/src/main/scala/com/twitter/util/Local.scala:2944-3350 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2947-3353 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (353 lines × 2) · ×1
  • Duplicated block (353 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:1730 — examples/core/src/main/scala/com/twitter/util/Local.scala:1730-2082 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:1733-2085 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (352 lines × 2) · ×1
  • Duplicated block (352 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:2131 — examples/core/src/main/scala/com/twitter/util/Local.scala:2131-2482 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2134-2485 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (302 lines × 2) · ×1
  • Duplicated block (302 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:1080 — examples/core/src/main/scala/com/twitter/util/Local.scala:1080-1381 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:1083-1384 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (255 lines × 2) · ×1
  • Duplicated block (255 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:527 — examples/core/src/main/scala/com/twitter/util/Local.scala:527-781 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:530-784 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (254 lines × 2) · ×1
  • Duplicated block (254 lines × 2) examples/core/src/main/scala/com/twitter/util/Local.scala:824 — examples/core/src/main/scala/com/twitter/util/Local.scala:824-1077 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:827-1080 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (80 lines × 2) · ×1
  • Duplicated block (80 lines × 2) examples/core/src/main/scala/com/twitter/util/Memoize.scala:79 — examples/core/src/main/scala/com/twitter/util/Memoize.scala:79-158 | examples/original/core/src/main/scala/com/twitter/util/Memoize.scala:82-161 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Memoize.scala` and `examples/original/core/src/main/scala/com/twitter/util/Memoize.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 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.
D4 · Code Duplication · Duplicated block (61 lines × 2) · ×1
  • Duplicated block (61 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Tx.scala:80 — examples/core/src/main/scala/com/twitter/concurrent/Tx.scala:80-140 | examples/original/core/src/main/scala/com/twitter/concurrent/Tx.scala:83-143 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/Tx.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/Tx.scala` as WHOLE FILES: 99% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×1
  • Duplicated block (52 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:433 — examples/core/src/main/scala/com/twitter/io/Buf.scala:433-484 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:436-487 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/Buf.scala` and `examples/original/core/src/main/scala/com/twitter/io/Buf.scala` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 629 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/io/Buf.scala:433` it does not close everything it opens, so those 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.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) examples/core/src/main/scala/com/twitter/util/FuturePool.scala:126 — examples/core/src/main/scala/com/twitter/util/FuturePool.scala:126-175 | examples/original/core/src/main/scala/com/twitter/util/FuturePool.scala:129-178 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/FuturePool.scala` and `examples/original/core/src/main/scala/com/twitter/util/FuturePool.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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:1188 — examples/core/src/main/scala/com/twitter/util/Future.scala:1188-1236 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1191-1239 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/original/core/src/main/scala/com/twitter/util/Future.scala` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 552 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:313 — examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:313-360 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:316-363 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:226 — examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:226-272 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:229-275 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) examples/core/src/main/scala/com/twitter/util/Config.scala:134 — examples/core/src/main/scala/com/twitter/util/Config.scala:134-178 | examples/original/core/src/main/scala/com/twitter/util/Config.scala:137-181 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Config.scala` and `examples/original/core/src/main/scala/com/twitter/util/Config.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 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 `examples/core/src/main/scala/com/twitter/util/Config.scala:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:367 — examples/core/src/main/scala/com/twitter/util/Event.scala:367-406 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:370-409 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:189 — examples/core/src/main/scala/com/twitter/util/Event.scala:189-227 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:192-230 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:832 — examples/core/src/main/scala/com/twitter/util/Promise.scala:832-869 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:835-872 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:147 — examples/core/src/main/scala/com/twitter/util/Event.scala:147-183 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:150-186 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Event.scala` and `examples/original/core/src/main/scala/com/twitter/util/Event.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 257 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) examples/core/src/main/scala/com/twitter/util/Closable.scala:106 — examples/core/src/main/scala/com/twitter/util/Closable.scala:106-140 | examples/original/core/src/main/scala/com/twitter/util/Closable.scala:109-143 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Closable.scala` and `examples/original/core/src/main/scala/com/twitter/util/Closable.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:130 — examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:130-162 | examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala:133-165 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` and `examples/original/core/src/main/scala/com/twitter/io/exp/ActivitySource.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (30 lines × 4) · ×1
  • Duplicated block (30 lines × 4) examples/core/src/main/scala/com/twitter/util/Local.scala:3876 — examples/core/src/main/scala/com/twitter/util/Local.scala:3876-3905 | examples/core/src/main/scala/com/twitter/util/Local.scala:4346-4375 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3879-3908 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4349-4378 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Local.scala:3876` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (29 lines × 4) · ×1
  • Duplicated block (29 lines × 4) examples/core/src/main/scala/com/twitter/util/Local.scala:3755 — examples/core/src/main/scala/com/twitter/util/Local.scala:3755-3783 | examples/core/src/main/scala/com/twitter/util/Local.scala:4276-4304 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3758-3786 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4279-4307 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Local.scala:3755` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:540 — examples/core/src/main/scala/com/twitter/util/Promise.scala:540-561 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:543-564 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Promise.scala` and `examples/original/core/src/main/scala/com/twitter/util/Promise.scala` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:615 — examples/core/src/main/scala/com/twitter/util/Future.scala:615-631 | examples/core/src/main/scala/com/twitter/util/Futures.scala:350-366 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:618-634 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:353-369 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:615` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×1
  • Duplicated block (14–15 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:503 — examples/core/src/main/scala/com/twitter/util/Future.scala:503-517 | examples/core/src/main/scala/com/twitter/util/Futures.scala:239-252 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:506-520 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:242-255 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Futures.scala:239` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:470 — examples/core/src/main/scala/com/twitter/util/Future.scala:470-483 | examples/core/src/main/scala/com/twitter/util/Futures.scala:205-218 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:473-486 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:208-221 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:470` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×1
  • Duplicated block (12–13 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:440 — examples/core/src/main/scala/com/twitter/util/Future.scala:440-452 | examples/core/src/main/scala/com/twitter/util/Futures.scala:175-186 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:443-455 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:178-189 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:440` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×1
  • Duplicated block (11–12 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:412 — examples/core/src/main/scala/com/twitter/util/Future.scala:412-423 | examples/core/src/main/scala/com/twitter/util/Futures.scala:147-157 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:415-426 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:150-160 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:412` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:386 — examples/core/src/main/scala/com/twitter/util/Future.scala:386-396 | examples/core/src/main/scala/com/twitter/util/Futures.scala:121-130 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:389-399 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:124-133 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:1013 — examples/core/src/main/scala/com/twitter/util/Future.scala:1013-1023 | examples/core/src/main/scala/com/twitter/util/Futures.scala:748-758 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1016-1026 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:751-761 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:1013` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 56) · ×1
  • Duplicated block (9–10 lines × 56) examples/core/src/main/scala/com/twitter/util/Future.scala:441 — examples/core/src/main/scala/com/twitter/util/Future.scala:441-450 | examples/core/src/main/scala/com/twitter/util/Future.scala:471-479 | examples/core/src/main/scala/com/twitter/util/Future.scala:503-512 | examples/core/src/main/scala/com/twitter/util/Future.scala:539-547 | examples/core/src/main/scala/com/twitter/util/Future.scala:576-584 | examples/core/src/main/scala/com/twitter/util/Future.scala:615-623 | examples/core/src/main/scala/com/twitter/util/Future.scala:656-664 | examples/core/src/main/scala/com/twitter/util/Future.scala:699-707 | examples/core/src/main/scala/com/twitter/util/Future.scala:744-752 | examples/core/src/main/scala/com/twitter/util/Future.scala:791-799 | examples/core/src/main/scala/com/twitter/util/Future.scala:840-848 | examples/core/src/main/scala/com/twitter/util/Future.scala:891-899 | examples/core/src/main/scala/com/twitter/util/Future.scala:944-952 | examples/core/src/main/scala/com/twitter/util/Future.scala:999-1007 | examples/core/src/main/scala/com/twitter/util/Futures.scala:175-184 | examples/core/src/main/scala/com/twitter/util/Futures.scala:205-214 | examples/core/src/main/scala/com/twitter/util/Futures.scala:239-247 | examples/core/src/main/scala/com/twitter/util/Futures.scala:274-282 | examples/core/src/main/scala/com/twitter/util/Futures.scala:311-319 | examples/core/src/main/scala/com/twitter/util/Futures.scala:350-358 | examples/core/src/main/scala/com/twitter/util/Futures.scala:391-399 | examples/core/src/main/scala/com/twitter/util/Futures.scala:434-442 | examples/core/src/main/scala/com/twitter/util/Futures.scala:479-487 | examples/core/src/main/scala/com/twitter/util/Futures.scala:526-534 | examples/core/src/main/scala/com/twitter/util/Futures.scala:575-583 | examples/core/src/main/scala/com/twitter/util/Futures.scala:626-634 | examples/core/src/main/scala/com/twitter/util/Futures.scala:679-687 | examples/core/src/main/scala/com/twitter/util/Futures.scala:734-742 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:444-453 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:474-482 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:506-515 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:542-550 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:579-587 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:618-626 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:659-667 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:702-710 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:747-755 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:794-802 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:843-851 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:894-902 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:947-955 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1002-1010 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:178-187 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:208-217 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:242-250 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:277-285 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:314-322 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:353-361 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:394-402 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:437-445 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:482-490 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:529-537 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:578-586 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:629-637 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:682-690 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:737-745 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:441` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/core/src/main/scala/com/twitter/util/Future.scala:479` calls `result` and `examples/core/src/main/scala/com/twitter/util/Future.scala:450` 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) examples/core/src/main/scala/com/twitter/util/Future.scala:362 — examples/core/src/main/scala/com/twitter/util/Future.scala:362-371 | examples/core/src/main/scala/com/twitter/util/Futures.scala:97-105 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:365-374 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:100-108 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 60) · ×1
  • Duplicated block (8–9 lines × 60) examples/core/src/main/scala/com/twitter/util/Future.scala:413 — examples/core/src/main/scala/com/twitter/util/Future.scala:413-421 | examples/core/src/main/scala/com/twitter/util/Future.scala:441-448 | examples/core/src/main/scala/com/twitter/util/Future.scala:471-478 | examples/core/src/main/scala/com/twitter/util/Future.scala:503-511 | examples/core/src/main/scala/com/twitter/util/Future.scala:539-546 | examples/core/src/main/scala/com/twitter/util/Future.scala:576-583 | examples/core/src/main/scala/com/twitter/util/Future.scala:615-622 | examples/core/src/main/scala/com/twitter/util/Future.scala:656-663 | examples/core/src/main/scala/com/twitter/util/Future.scala:699-706 | examples/core/src/main/scala/com/twitter/util/Future.scala:744-751 | examples/core/src/main/scala/com/twitter/util/Future.scala:791-798 | examples/core/src/main/scala/com/twitter/util/Future.scala:840-847 | examples/core/src/main/scala/com/twitter/util/Future.scala:891-898 | examples/core/src/main/scala/com/twitter/util/Future.scala:944-951 | examples/core/src/main/scala/com/twitter/util/Future.scala:999-1006 | examples/core/src/main/scala/com/twitter/util/Futures.scala:147-155 | examples/core/src/main/scala/com/twitter/util/Futures.scala:175-182 | examples/core/src/main/scala/com/twitter/util/Futures.scala:205-213 | examples/core/src/main/scala/com/twitter/util/Futures.scala:239-246 | examples/core/src/main/scala/com/twitter/util/Futures.scala:274-281 | examples/core/src/main/scala/com/twitter/util/Futures.scala:311-318 | examples/core/src/main/scala/com/twitter/util/Futures.scala:350-357 | examples/core/src/main/scala/com/twitter/util/Futures.scala:391-398 | examples/core/src/main/scala/com/twitter/util/Futures.scala:434-441 | examples/core/src/main/scala/com/twitter/util/Futures.scala:479-486 | examples/core/src/main/scala/com/twitter/util/Futures.scala:526-533 | examples/core/src/main/scala/com/twitter/util/Futures.scala:575-582 | examples/core/src/main/scala/com/twitter/util/Futures.scala:626-633 | examples/core/src/main/scala/com/twitter/util/Futures.scala:679-686 | examples/core/src/main/scala/com/twitter/util/Futures.scala:734-741 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:416-424 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:444-451 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:474-481 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:506-514 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:542-549 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:579-586 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:618-625 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:659-666 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:702-709 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:747-754 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:794-801 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:843-850 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:894-901 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:947-954 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1002-1009 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:150-158 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:178-185 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:208-216 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:242-249 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:277-284 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:314-321 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:353-360 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:394-401 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:437-444 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:482-489 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:529-536 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:578-585 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:629-636 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:682-689 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:737-744 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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 `examples/core/src/main/scala/com/twitter/util/Future.scala:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/core/src/main/scala/com/twitter/util/Future.scala:448` calls `result` and `examples/core/src/main/scala/com/twitter/util/Future.scala:421` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 24) · ×1
  • Duplicated block (8–9 lines × 24) examples/core/src/main/scala/com/twitter/util/Future.scala:753 — examples/core/src/main/scala/com/twitter/util/Future.scala:753-761 | examples/core/src/main/scala/com/twitter/util/Future.scala:800-807 | examples/core/src/main/scala/com/twitter/util/Future.scala:849-856 | examples/core/src/main/scala/com/twitter/util/Future.scala:900-907 | examples/core/src/main/scala/com/twitter/util/Future.scala:953-960 | examples/core/src/main/scala/com/twitter/util/Future.scala:1008-1015 | examples/core/src/main/scala/com/twitter/util/Futures.scala:488-496 | examples/core/src/main/scala/com/twitter/util/Futures.scala:535-542 | examples/core/src/main/scala/com/twitter/util/Futures.scala:584-591 | examples/core/src/main/scala/com/twitter/util/Futures.scala:635-642 | examples/core/src/main/scala/com/twitter/util/Futures.scala:688-695 | examples/core/src/main/scala/com/twitter/util/Futures.scala:743-750 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:756-764 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:803-810 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:852-859 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:903-910 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:956-963 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1011-1018 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:491-499 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:538-545 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:587-594 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:638-645 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:691-698 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:746-753 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Future.scala` and `examples/core/src/main/scala/com/twitter/util/Futures.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 222 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/core/src/main/scala/com/twitter/util/Future.scala:807` calls `result` and `examples/core/src/main/scala/com/twitter/util/Future.scala:761` 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.
D4 · Code Duplication · Duplicated block (8 lines × 16) · ×1
  • Duplicated block (8 lines × 16) examples/core/src/main/scala/com/twitter/util/Local.scala:330 — examples/core/src/main/scala/com/twitter/util/Local.scala:330-337 | examples/core/src/main/scala/com/twitter/util/Local.scala:392-399 | examples/core/src/main/scala/com/twitter/util/Local.scala:491-498 | examples/core/src/main/scala/com/twitter/util/Local.scala:810-817 | examples/core/src/main/scala/com/twitter/util/Local.scala:1412-1419 | examples/core/src/main/scala/com/twitter/util/Local.scala:2115-2122 | examples/core/src/main/scala/com/twitter/util/Local.scala:2927-2934 | examples/core/src/main/scala/com/twitter/util/Local.scala:3856-3863 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:333-340 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:395-402 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:494-501 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:813-820 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:1415-1422 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2118-2125 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:2930-2937 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:3859-3866 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Local.scala` and `examples/original/core/src/main/scala/com/twitter/util/Local.scala` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 4337 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:152 — examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:152-159 | examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:249-256 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:155-162 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:252-259 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 276 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.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.
D4 · Code Duplication · Duplicated block (6–7 lines × 34) · ×1
  • Duplicated block (6–7 lines × 34) examples/core/src/main/scala/com/twitter/util/Activity.scala:297 — examples/core/src/main/scala/com/twitter/util/Activity.scala:297-303 | examples/core/src/main/scala/com/twitter/util/Activity.scala:321-326 | examples/core/src/main/scala/com/twitter/util/Activity.scala:347-352 | examples/core/src/main/scala/com/twitter/util/Activity.scala:375-380 | examples/core/src/main/scala/com/twitter/util/Activity.scala:405-411 | examples/core/src/main/scala/com/twitter/util/Activity.scala:439-444 | examples/core/src/main/scala/com/twitter/util/Activity.scala:474-479 | examples/core/src/main/scala/com/twitter/util/Activity.scala:511-516 | examples/core/src/main/scala/com/twitter/util/Activity.scala:550-555 | examples/core/src/main/scala/com/twitter/util/Activity.scala:591-596 | examples/core/src/main/scala/com/twitter/util/Activity.scala:634-639 | examples/core/src/main/scala/com/twitter/util/Activity.scala:679-684 | examples/core/src/main/scala/com/twitter/util/Activity.scala:726-731 | examples/core/src/main/scala/com/twitter/util/Activity.scala:775-780 | examples/core/src/main/scala/com/twitter/util/Activity.scala:826-831 | examples/core/src/main/scala/com/twitter/util/Activity.scala:879-884 | examples/core/src/main/scala/com/twitter/util/Activity.scala:934-939 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:300-306 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:324-329 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:350-355 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:378-383 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:408-414 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:442-447 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:477-482 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:514-519 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:553-558 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:594-599 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:637-642 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:682-687 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:729-734 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:778-783 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:829-834 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:882-887 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:937-942 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/core/src/main/scala/com/twitter/util/Activity.scala:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/core/src/main/scala/com/twitter/util/Activity.scala:326` calls `ss` and `examples/core/src/main/scala/com/twitter/util/Activity.scala:303` 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 22) · ×1
  • Duplicated block (6–7 lines × 22) examples/core/src/main/scala/com/twitter/util/Activity.scala:480 — examples/core/src/main/scala/com/twitter/util/Activity.scala:480-486 | examples/core/src/main/scala/com/twitter/util/Activity.scala:517-522 | examples/core/src/main/scala/com/twitter/util/Activity.scala:556-561 | examples/core/src/main/scala/com/twitter/util/Activity.scala:597-602 | examples/core/src/main/scala/com/twitter/util/Activity.scala:640-645 | examples/core/src/main/scala/com/twitter/util/Activity.scala:685-690 | examples/core/src/main/scala/com/twitter/util/Activity.scala:732-737 | examples/core/src/main/scala/com/twitter/util/Activity.scala:781-786 | examples/core/src/main/scala/com/twitter/util/Activity.scala:832-837 | examples/core/src/main/scala/com/twitter/util/Activity.scala:885-890 | examples/core/src/main/scala/com/twitter/util/Activity.scala:940-945 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:483-489 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:520-525 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:559-564 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:600-605 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:643-648 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:688-693 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:735-740 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:784-789 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:835-840 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:888-893 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:943-948 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/core/src/main/scala/com/twitter/util/Activity.scala:522` calls `ss` and `examples/core/src/main/scala/com/twitter/util/Activity.scala:486` 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 10) · ×1
  • Duplicated block (6–7 lines × 10) examples/core/src/main/scala/com/twitter/util/Activity.scala:738 — examples/core/src/main/scala/com/twitter/util/Activity.scala:738-744 | examples/core/src/main/scala/com/twitter/util/Activity.scala:787-792 | examples/core/src/main/scala/com/twitter/util/Activity.scala:838-843 | examples/core/src/main/scala/com/twitter/util/Activity.scala:891-896 | examples/core/src/main/scala/com/twitter/util/Activity.scala:946-951 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:741-747 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:790-795 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:841-846 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:894-899 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:949-954 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Activity.scala` and `examples/original/core/src/main/scala/com/twitter/util/Activity.scala` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 280 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/core/src/main/scala/com/twitter/util/Activity.scala:792` calls `ss` and `examples/core/src/main/scala/com/twitter/util/Activity.scala:744` 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:449 — examples/core/src/main/scala/com/twitter/io/ByteReader.scala:449-453 | examples/core/src/main/scala/com/twitter/io/ByteReader.scala:480-484 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:452-456 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:483-487 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ByteReader.scala` and `examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (113 lines × 2) · ×1
  • Duplicated block (113 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/SpoolSource.scala:11 — examples/core/src/main/scala/com/twitter/concurrent/SpoolSource.scala:11-123 | examples/original/core/src/main/scala/com/twitter/concurrent/SpoolSource.scala:14-126 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/concurrent/SpoolSource.scala` and `examples/original/core/src/main/scala/com/twitter/concurrent/SpoolSource.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 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 `examples/core/src/main/scala/com/twitter/concurrent/SpoolSource.scala:11` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) examples/core/src/main/scala/com/twitter/io/ProxyByteWriter.scala:11 — examples/core/src/main/scala/com/twitter/io/ProxyByteWriter.scala:11-69 | examples/original/core/src/main/scala/com/twitter/io/ProxyByteWriter.scala:14-72 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/io/ProxyByteWriter.scala` and `examples/original/core/src/main/scala/com/twitter/io/ProxyByteWriter.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 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.
D4 · Code Duplication · Duplicated block (171 lines × 2) · ×1
  • Duplicated block (171 lines × 2) examples/core/src/main/scala/com/twitter/util/Awaitable.scala:51 — examples/core/src/main/scala/com/twitter/util/Awaitable.scala:51-221 | examples/original/core/src/main/scala/com/twitter/util/Awaitable.scala:54-224 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Awaitable.scala` and `examples/original/core/src/main/scala/com/twitter/util/Awaitable.scala` as WHOLE FILES: 99% 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 `examples/core/src/main/scala/com/twitter/util/Awaitable.scala:51` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) examples/core/src/main/scala/com/twitter/util/Codec.scala:12 — examples/core/src/main/scala/com/twitter/util/Codec.scala:12-69 | examples/original/core/src/main/scala/com/twitter/util/Codec.scala:15-72 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Codec.scala` and `examples/original/core/src/main/scala/com/twitter/util/Codec.scala` as WHOLE FILES: 95% 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 `examples/core/src/main/scala/com/twitter/util/Codec.scala:12` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (191 lines × 2) · ×1
  • Duplicated block (191 lines × 2) examples/core/src/main/scala/com/twitter/util/Function.scala:14 — examples/core/src/main/scala/com/twitter/util/Function.scala:14-204 | examples/original/core/src/main/scala/com/twitter/util/Function.scala:17-207 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Function.scala` and `examples/original/core/src/main/scala/com/twitter/util/Function.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 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 `examples/core/src/main/scala/com/twitter/util/Function.scala:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (259 lines × 2) · ×1
  • Duplicated block (259 lines × 2) examples/core/src/main/scala/com/twitter/util/Monitor.scala:13 — examples/core/src/main/scala/com/twitter/util/Monitor.scala:13-271 | examples/original/core/src/main/scala/com/twitter/util/Monitor.scala:16-274 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Monitor.scala` and `examples/original/core/src/main/scala/com/twitter/util/Monitor.scala` as WHOLE FILES: 99% 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 `examples/core/src/main/scala/com/twitter/util/Monitor.scala:13` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) examples/core/src/main/scala/com/twitter/util/Stopwatch.scala:100 — examples/core/src/main/scala/com/twitter/util/Stopwatch.scala:100-175 | examples/original/core/src/main/scala/com/twitter/util/Stopwatch.scala:103-178 — before extracting anything, compare `examples/core/src/main/scala/com/twitter/util/Stopwatch.scala` and `examples/original/core/src/main/scala/com/twitter/util/Stopwatch.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 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 `examples/core/src/main/scala/com/twitter/util/Stopwatch.scala:100` 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.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: scalasig — scalasig: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
S1 · Web-Security Posture · Weak hash algorithm · ×1
  • Weak hash algorithm check/src/main/scala/rsc/checkbase/Fingerprint.scala:41 — 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.
Minor — 104 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×80
  • Orphaned file rsc/src/main/scala/rsc/outline/Scheduler.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/outline/Synthesizer.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigCodec.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/outline/Outliner.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/syntax/Trees.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/syntax/Dupe.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/classpath/javacp/Javacp.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/scan/scala/Scanner.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/parse/scala/Terms.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file check/src/main/scala/rsc/checkoutline/Checker.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/outline/Scopes.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scalafix/rules/src/main/scala/rsc/rules/RscCompat.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/scan/java/Scanner.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/Tags.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/report/Messages.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scalafix/rules/src/main/scala/rsc/rules/pretty/SemanticdbPrinter.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/pretty/PrettyToken.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/semanticdb/Defns.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/classpath/scalacp/Symbols.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file check/src/main/scala/rsc/checkbase/ToolUtil.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/semanticdb/Writer.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file rsc/src/main/scala/rsc/classpath/javacp/JavaTypeSignature.scala:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scalasig/scalasig/src/main/scala/scala/meta/scalasig/Flags.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.
  • + 55 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×6
  • Duplicated predicate rsc/src/main/scala/rsc/scan/java/Scanner.scala:178 — `(ch1 == '+' || ch1 == '-') && isDecimalDigit(ch2)` appears character-identically in 2 files — rsc/src/main/scala/rsc/scan/java/Scanner.scala, rsc/src/main/scala/rsc/scan/scala/Scanner.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 rsc/src/main/scala/rsc/scan/java/Scanner.scala:123 — `ch != CR && ch != LF && ch != FF && ch != SU` appears character-identically in 2 files — rsc/src/main/scala/rsc/scan/java/Scanner.scala, rsc/src/main/scala/rsc/scan/scala/Scanner.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 rsc/src/main/scala/rsc/scan/java/Scanner.scala:414 — `ch != delim && ch != CR && ch != LF && ch != FF && ch != SU` appears character-identically in 2 files — rsc/src/main/scala/rsc/scan/java/Scanner.scala, rsc/src/main/scala/rsc/scan/scala/Scanner.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 rsc/src/main/scala/rsc/report/ConsoleReporter.scala:17 — `m.sev == FatalSeverity || m.sev == ErrorSeverity` appears character-identically in 2 files — rsc/src/main/scala/rsc/report/ConsoleReporter.scala, rsc/src/main/scala/rsc/report/StoreReporter.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 rsc/src/main/scala/rsc/parse/java/Scanners.scala:29 — `scanner.token == WHITESPACE || scanner.token == NEWLINE || scanner.token == COMMENT` appears character-identically in 2 files — rsc/src/main/scala/rsc/parse/java/Scanners.scala, rsc/src/main/scala/rsc/parse/scala/Scanners.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 rsc/src/main/scala/rsc/classpath/scalacp/Scalacp.scala:21 — `sym.isMethod && !sym.isNullaryOrCompatible` appears character-identically in 2 files — rsc/src/main/scala/rsc/classpath/scalacp/Scalacp.scala, rsc/src/main/scala/rsc/classpath/scalacp/Scopes.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.
AX6 · Interface segregation · Fat interface · ×4
  • Fat interface: ByteReader (30 abstract members) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:14 — `ByteReader` declares 30 abstract members: `remaining`, `remainingUntil`, `process`, `process`, `readByte`, `readUnsignedByte`, `readShortBE`, `readShortLE`, `readUnsignedShortBE`, `readUnsignedShortLE`, `readMediumBE`, `readMediumLE`, `readUnsignedMediumBE`, `readUnsignedMediumLE`, `readIntBE`, `readIntLE`, `readUnsignedIntBE`, `readUnsignedIntLE`, `readLongBE`, `readLongLE`, `readUnsignedLongBE`, `readUnsignedLongLE`, `readFloatBE`, `readFloatLE`, `readDoubleBE`, `readDoubleLE`, `readBytes`, `readString`, `skip`, `readAll`. 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 30 declarations carry 29 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 29 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ByteWriter (16 abstract members) examples/core/src/main/scala/com/twitter/io/ByteWriter.scala:25 — `ByteWriter` declares 16 abstract members under just 15 distinct name(s): `writeString`, `writeBytes`, `writeBytes`, `writeByte`, `writeShortBE`, `writeShortLE`, `writeMediumBE`, `writeMediumLE`, `writeIntBE`, `writeIntLE`, `writeLongBE`, `writeLongLE`, `writeFloatBE`, `writeFloatLE`, `writeDoubleBE`, `writeDoubleLE`. 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. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 15 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: ByteReader (30 abstract members) examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:17 — `ByteReader` declares 30 abstract members: `remaining`, `remainingUntil`, `process`, `process`, `readByte`, `readUnsignedByte`, `readShortBE`, `readShortLE`, `readUnsignedShortBE`, `readUnsignedShortLE`, `readMediumBE`, `readMediumLE`, `readUnsignedMediumBE`, `readUnsignedMediumLE`, `readIntBE`, `readIntLE`, `readUnsignedIntBE`, `readUnsignedIntLE`, `readLongBE`, `readLongLE`, `readUnsignedLongBE`, `readUnsignedLongLE`, `readFloatBE`, `readFloatLE`, `readDoubleBE`, `readDoubleLE`, `readBytes`, `readString`, `skip`, `readAll`. 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 30 declarations carry 29 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 29 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ByteWriter (16 abstract members) examples/original/core/src/main/scala/com/twitter/io/ByteWriter.scala:28 — `ByteWriter` declares 16 abstract members under just 15 distinct name(s): `writeString`, `writeBytes`, `writeBytes`, `writeByte`, `writeShortBE`, `writeShortLE`, `writeMediumBE`, `writeMediumLE`, `writeIntBE`, `writeIntLE`, `writeLongBE`, `writeLongLE`, `writeFloatBE`, `writeFloatLE`, `writeDoubleBE`, `writeDoubleLE`. 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. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 15 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.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file rsc/src/main/scala/rsc/scalasig/Pickle.scala:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ScalasigHighlevel.scala:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file rsc/src/main/scala/rsc/pretty/TreeStr.scala:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (71656 LoC, 2031 module-visible types across 69 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 83 of 83 significant files have no living knowledge — the codebase as a whole is dormant, not 83 separate risks. Counted over 83 of the 300 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P1 · CI/CD gates · CI test execution not evidenced · ×1
  • CI test execution not evidenced — A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.
P1 · CI/CD gates · CI build step not evidenced · ×1
  • CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations bench/src/main/scala/rsc/bench/RscIndex.scala — A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X5 · Nullable reference types · Scala's null is not held to the type system everywhere · ×1
  • Scala's null is not held to the type system everywhere — No build over this repository's 295 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.
Minor — 7 finding(s)
D12 · Dependency Hygiene · Outdated · ×7
  • Outdated: ch.qos.logback:logback-classic — `ch.qos.logback %% logback-classic` is declared at 1.2.3 in REDACTED, but 1.6.6 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.2.3 until the declaration is edited — there is no lockfile refresh that would move it.
  • Outdated: commons-cli:commons-cli — `commons-cli %% commons-cli` is declared at 1.4 in REDACTED, but 1.11.0 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.4 until the declaration is edited — there is no lockfile refresh that would move it.
  • Outdated: io.github.java-diff-utils:java-diff-utils — `io.github.java-diff-utils %% java-diff-utils` is declared at 4.0 in REDACTED, but 4.18 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 4.0 until the declaration is edited — there is no lockfile refresh that would move it.
  • Outdated: io.github.soc:directories — `io.github.soc %% directories` is declared at 10 in REDACTED, but 12 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 10 until the declaration is edited — there is no lockfile refresh that would move it.
  • Outdated: org.eclipse.jgit:org.eclipse.jgit — `org.eclipse.jgit %% org.eclipse.jgit` is declared at 4.6.0.201612231935-r in REDACTED, but 7.8.0.202609011348-r is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 4.6.0.201612231935-r until the declaration is edited — there is no lockfile refresh that would move it.
  • Outdated: org.slf4j:log4j-over-slf4j — `org.slf4j %% log4j-over-slf4j` is declared at 1.7.25 in REDACTED, but 2.0.20 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.7.25 until the declaration is edited — there is no lockfile refresh that would move it.
  • Outdated: org.slf4j:slf4j-api — `org.slf4j %% slf4j-api` is declared at 1.7.25 in REDACTED, but 2.0.20 is the current release on Maven Central. An sbt declaration names an exact version, so this repository builds against 1.7.25 until the declaration is edited — there is no lockfile refresh that would move it.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-db24f2106c834e9395610a067ac98aea/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-db24f2106c834e9395610a067ac98aea/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .0artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-048be12fb3874da48ec3d40aabc67a252artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-048be12fb3874da48ec3d40aabc67a250artifacts/raw/osv-scanner.json

Run 01a1770b-11e0-7384-86ec-8eb19fa5b47b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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