Public report of twitter/rsc, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 07:27 UTC · Survey ID cd_0c1a2c8eed8f4f408a9f672d4d5448e5
twitter/rsc
Measured 14 November 2026, 07:27 UTC, at code version 5d8bbf8
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
No change 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, 46
Findings by how serious they are
2 critical916 serious110 minor
11 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 07:27 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
48of 48 dimensions measured by tools.
1011of 1028 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
48dimensions across 6 lenses, read from 71,656 lines of product code in 8 projects.
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 46, 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 6 points. Raising Production Readiness to 62 would lift the score to about 59.
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 €72,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 46 to 62, the lowest score rated Strong, the score would rise from 54 to about 59.
Code composition: what the lines of code are
Product code 98%Tests 2%
New since the last survey: 75 findings
These 75 critical or serious findings weren't in the previous survey, on 26 October 2026.
Code Duplication · Edited copy of a member (65 corresponding lines) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileReader.scala
Code Duplication · Edited copy of a member (83 corresponding lines) rsc/src/main/scala/rsc/scan/java/Scanner.scala
Code Duplication · Edited copy of a member (44 corresponding lines) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala
Code Duplication · Edited copy of a member (61 corresponding lines) rsc/src/main/scala/rsc/scan/java/Scanner.scala
Code Duplication · Edited copy of a member (41 corresponding lines) rsc/src/main/scala/rsc/parse/java/Terms.scala
Code Duplication · Edited copy of a member (17 corresponding lines) rsc/src/main/scala/rsc/parse/scala/Pats.scala
Code Duplication · Edited copy of a member (15 corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala
Code Duplication · Edited copy of a member (13 corresponding lines) rsc/src/main/scala/rsc/scalasig/Pickle.scala
Code Duplication · Edited copy of a member (16 corresponding lines) rsc/src/main/scala/rsc/parse/Parser.scala
Code Duplication · Edited copy of a member (15 corresponding lines) scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala
Code Duplication · Edited copy of a member (8 corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala
Code Duplication · Edited copy of a member (14 corresponding lines) rsc/src/main/scala/rsc/Compiler.scala
Code Duplication · Edited copy of a member (13 corresponding lines) rsc/src/main/scala/rsc/scalasig/Entries.scala
Code Duplication · Edited copy of a member (7 corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala
Code Duplication · Edited copy of a member (10 corresponding lines) rsc/src/main/scala/rsc/pretty/Repl.scala
Code Duplication · Edited copy of a member (14 corresponding lines) rsc/src/main/scala/rsc/outline/Env.scala
Code Duplication · Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/outline/Scheduler.scala
Code Duplication · Edited copy of a member (7 corresponding lines) rsc/src/main/scala/rsc/parse/scala/Defns.scala
Code Duplication · Edited copy of a member (13 corresponding lines) scalafix/rules/src/main/scala/rsc/rules/semantics/Env.scala
Code Duplication · Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/util/TreeUtil.scala
Code Duplication · Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/parse/scala/Modifiers.scala
Code Duplication · Edited copy of a member (8 corresponding lines) rsc/src/main/scala/rsc/outline/Outliner.scala
Code Duplication · Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/parse/java/Helpers.scala
Code Duplication · Edited copy of a member (7 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copy of a member (56 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala
Code Duplication · Edited copy of a member (16 corresponding lines) examples/core/src/main/scala/com/twitter/util/Time.scala
Code Duplication · Edited copy of a member (6 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala
Code Duplication · Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala
Code Duplication · Edited copy of a member (16 corresponding lines) examples/core/src/main/scala/com/twitter/util/Time.scala
Code Duplication · Edited copy of a member (12 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala
Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala
Code Duplication · Edited copy of a member (18 corresponding lines) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala
Code Duplication · Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/util/Promise.scala
Code Duplication · Edited copy of a member (7 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala
Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala
Code Duplication · Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala
Code Duplication · Edited copy of a member (8 corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala
Code Duplication · Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala
Code Duplication · Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala
Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/io/TempFile.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/conversions/PercentOps.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/NetUtil.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/io/Reader.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala
Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (2 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Event.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/io/ByteReader.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Duration.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (2 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala
Code Duplication · Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala
Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Tx.scala
Code Duplication · Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 68 findings
These 68 critical or serious findings were in the previous survey, on 26 October 2026, and are gone from this one.
€24,000 to €120,000, for 396 to 1,257 hours of work, about 0.5 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 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.
Size
Medium: 71,656 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
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 6 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).
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 €72,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 46 (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 4.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 20% 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.2 to 1.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
124 modules, with 130 dependencies between them. 2 loops run through 13 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.
rsc.checkbytecode uses rsc.checkbase, so a change to rsc.checkbase can break rsc.checkbytecode, while a change to rsc.checkbytecode can't break rsc.checkbase.
Position
Below the diagonal: rsc.checkbytecode uses a module listed above it, which is the healthy direction.
rsc.checkbytecode uses rsc.checkbase.SettingsBase, so a change to rsc.checkbase.SettingsBase can break rsc.checkbytecode, while a change to rsc.checkbytecode can't break rsc.checkbase.SettingsBase.
Position
Below the diagonal: rsc.checkbytecode uses a module listed above it, which is the healthy direction.
rsc.checkoutline uses rsc.checkbase, so a change to rsc.checkbase can break rsc.checkoutline, while a change to rsc.checkoutline can't break rsc.checkbase.
Position
Below the diagonal: rsc.checkoutline uses a module listed above it, which is the healthy direction.
rsc.rules uses rsc.rules.semantics, so a change to rsc.rules.semantics can break rsc.rules, while a change to rsc.rules can't break rsc.rules.semantics.
Position
Below the diagonal: rsc.rules uses a module listed above it, which is the healthy direction.
scala.meta.scalasig.lowlevel uses scala.meta.scalasig, so a change to scala.meta.scalasig can break scala.meta.scalasig.lowlevel, while a change to scala.meta.scalasig.lowlevel can't break scala.meta.scalasig.
Position
Below the diagonal: scala.meta.scalasig.lowlevel uses a module listed above it, which is the healthy direction.
11→14 scala.meta.scalasig.lowlevel uses scala.meta.internal.scalasigpart of a loop✕
Connections
2 pairs of types, where a type in scala.meta.scalasig.lowlevel uses a type in scala.meta.internal.scalasig.
scala.meta.scalasig.lowlevel uses scala.meta.internal.scalasig, so a change to scala.meta.internal.scalasig can break scala.meta.scalasig.lowlevel, while a change to scala.meta.scalasig.lowlevel can't break scala.meta.internal.scalasig.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
rsc.classpath.scalacp.Symbols uses scala.meta.scalasig, so a change to scala.meta.scalasig can break rsc.classpath.scalacp.Symbols, while a change to rsc.classpath.scalacp.Symbols can't break scala.meta.scalasig.
Position
Below the diagonal: rsc.classpath.scalacp.Symbols uses a module listed above it, which is the healthy direction.
rsc.classpath.scalacp.Symbols uses scala.meta.scalasig.lowlevel, so a change to scala.meta.scalasig.lowlevel can break rsc.classpath.scalacp.Symbols, while a change to rsc.classpath.scalacp.Symbols can't break scala.meta.scalasig.lowlevel.
Position
Below the diagonal: rsc.classpath.scalacp.Symbols uses a module listed above it, which is the healthy direction.
scala.meta.internal.scalasig uses scala.meta.scalasig, so a change to scala.meta.scalasig can break scala.meta.internal.scalasig, while a change to scala.meta.internal.scalasig can't break scala.meta.scalasig.
Position
Below the diagonal: scala.meta.internal.scalasig uses a module listed above it, which is the healthy direction.
scala.meta.internal.scalasig uses scala.meta.scalasig.lowlevel, so a change to scala.meta.scalasig.lowlevel can break scala.meta.internal.scalasig, while a change to scala.meta.internal.scalasig can't break scala.meta.scalasig.lowlevel.
Position
Below the diagonal: scala.meta.internal.scalasig uses a module listed above it, which is the healthy direction.
rsc.scalasig uses scala.meta.scalasig.lowlevel, so a change to scala.meta.scalasig.lowlevel can break rsc.scalasig, while a change to rsc.scalasig can't break scala.meta.scalasig.lowlevel.
Position
Below the diagonal: rsc.scalasig uses a module listed above it, which is the healthy direction.
scala.meta.scalasig.highlevel uses scala.meta.scalasig, so a change to scala.meta.scalasig can break scala.meta.scalasig.highlevel, while a change to scala.meta.scalasig.highlevel can't break scala.meta.scalasig.
Position
Below the diagonal: scala.meta.scalasig.highlevel uses a module listed above it, which is the healthy direction.
scala.meta.scalasig.highlevel uses scala.meta.internal.scalasig, so a change to scala.meta.internal.scalasig can break scala.meta.scalasig.highlevel, while a change to scala.meta.scalasig.highlevel can't break scala.meta.internal.scalasig.
Position
Below the diagonal: scala.meta.scalasig.highlevel uses a module listed above it, which is the healthy direction.
rsc.checkscalasig uses rsc.checkbase, so a change to rsc.checkbase can break rsc.checkscalasig, while a change to rsc.checkscalasig can't break rsc.checkbase.
Position
Below the diagonal: rsc.checkscalasig uses a module listed above it, which is the healthy direction.
rsc.checkscalasig uses rsc.checkbase.SettingsBase, so a change to rsc.checkbase.SettingsBase can break rsc.checkscalasig, while a change to rsc.checkscalasig can't break rsc.checkbase.SettingsBase.
Position
Below the diagonal: rsc.checkscalasig uses a module listed above it, which is the healthy direction.
rsc.checkscalasig uses scala.meta.scalasig.highlevel, so a change to scala.meta.scalasig.highlevel can break rsc.checkscalasig, while a change to rsc.checkscalasig can't break scala.meta.scalasig.highlevel.
Position
Below the diagonal: rsc.checkscalasig uses a module listed above it, which is the healthy direction.
rsc.scalasig.Pickle uses scala.meta.scalasig.lowlevel, so a change to scala.meta.scalasig.lowlevel can break rsc.scalasig.Pickle, while a change to rsc.scalasig.Pickle can't break scala.meta.scalasig.lowlevel.
Position
Below the diagonal: rsc.scalasig.Pickle uses a module listed above it, which is the healthy direction.
rsc.scalasig.Pickle uses rsc.scalasig, so a change to rsc.scalasig can break rsc.scalasig.Pickle, while a change to rsc.scalasig.Pickle can't break rsc.scalasig.
Position
Below the diagonal: rsc.scalasig.Pickle uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in rsc.outline uses a type in rsc.syntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
The types involved
rsc.outline.ImporterScope → rsc.syntax.Importer
rsc.outline.Outliner → rsc.syntax.ModWithin
rsc.outline.Outliner → rsc.syntax.Path
rsc.outline.Outliner → rsc.syntax.Tpt
rsc.outline.Scheduler → rsc.syntax.DefnConstant
rsc.outline.Scheduler → rsc.syntax.DefnDef
rsc.outline.Scheduler → rsc.syntax.DefnField
rsc.outline.Scheduler → rsc.syntax.DefnPackage
rsc.outline.Scheduler → rsc.syntax.DefnPat
rsc.outline.Scheduler → rsc.syntax.DefnTemplate
rsc.outline.Scheduler → rsc.syntax.DefnType
rsc.outline.Scheduler → rsc.syntax.Mods
rsc.outline.Scheduler → rsc.syntax.Outline
rsc.outline.Scheduler → rsc.syntax.Param
rsc.outline.Scheduler → rsc.syntax.Parameterized
rsc.outline.Scheduler → rsc.syntax.Sketchy
rsc.outline.Scheduler → rsc.syntax.Source
rsc.outline.Scheduler → rsc.syntax.Stat
rsc.outline.Scheduler → rsc.syntax.Tpt
rsc.outline.Scheduler → rsc.syntax.Tree
rsc.outline.Scheduler → rsc.syntax.TypeParam
rsc.outline.SelfScope → rsc.syntax.DefnTemplate
rsc.outline.SelfScope → rsc.syntax.Self
rsc.outline.Sketch → rsc.syntax.Sketchy
rsc.outline.Synthesizer → rsc.syntax.DefnClass
Direction
rsc.outline uses rsc.syntax, so a change to rsc.syntax can break rsc.outline, while a change to rsc.outline can't break rsc.syntax.
Position
Below the diagonal: rsc.outline uses a module listed above it, which is the healthy direction.
33 pairs of types, where a type in rsc.report uses a type in rsc.input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
rsc.symtab.Scopes uses rsc.outline, so a change to rsc.outline can break rsc.symtab.Scopes, while a change to rsc.symtab.Scopes can't break rsc.outline.
Position
Below the diagonal: rsc.symtab.Scopes uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rsc.symtab.Sketches uses a type in rsc.syntax.
The types involved
rsc.symtab.Sketches.sketches → rsc.syntax.Sketchy
Direction
rsc.symtab.Sketches uses rsc.syntax, so a change to rsc.syntax can break rsc.symtab.Sketches, while a change to rsc.symtab.Sketches can't break rsc.syntax.
Position
Below the diagonal: rsc.symtab.Sketches uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rsc.symtab.Sketches uses a type in rsc.outline.
The types involved
rsc.symtab.Sketches.sketches → rsc.outline.Sketch
Direction
rsc.symtab.Sketches uses rsc.outline, so a change to rsc.outline can break rsc.symtab.Sketches, while a change to rsc.symtab.Sketches can't break rsc.outline.
Position
Below the diagonal: rsc.symtab.Sketches uses a module listed above it, which is the healthy direction.
48 pairs of types, where a type in rsc.parse.scala uses a type in rsc.syntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
1 pair of types, where a type in rsc.classpath.javacp uses a type in rsc.classpath.
The types involved
rsc.classpath.javacp.Javacp → rsc.classpath.Index
Direction
rsc.classpath.javacp uses rsc.classpath, so a change to rsc.classpath can break rsc.classpath.javacp, while a change to rsc.classpath.javacp can't break rsc.classpath.
Position
Below the diagonal: rsc.classpath.javacp uses a module listed above it, which is the healthy direction.
rsc.classpath.scalacp uses scala.meta.scalasig.lowlevel, so a change to scala.meta.scalasig.lowlevel can break rsc.classpath.scalacp, while a change to rsc.classpath.scalacp can't break scala.meta.scalasig.lowlevel.
Position
Below the diagonal: rsc.classpath.scalacp uses a module listed above it, which is the healthy direction.
rsc.classpath.scalacp uses rsc.classpath, so a change to rsc.classpath can break rsc.classpath.scalacp, while a change to rsc.classpath.scalacp can't break rsc.classpath.
Position
Below the diagonal: rsc.classpath.scalacp uses a module listed above it, which is the healthy direction.
rsc.classpath.javacp.BaseType uses rsc.classpath.javacp, so a change to rsc.classpath.javacp can break rsc.classpath.javacp.BaseType, while a change to rsc.classpath.javacp.BaseType can't break rsc.classpath.javacp.
Position
Below the diagonal: rsc.classpath.javacp.BaseType uses a module listed above it, which is the healthy direction.
rsc.classpath.scalacp.Types uses scala.meta.scalasig.lowlevel, so a change to scala.meta.scalasig.lowlevel can break rsc.classpath.scalacp.Types, while a change to rsc.classpath.scalacp.Types can't break scala.meta.scalasig.lowlevel.
Position
Below the diagonal: rsc.classpath.scalacp.Types uses a module listed above it, which is the healthy direction.
rsc.classpath.scalacp.Types uses rsc.classpath.scalacp, so a change to rsc.classpath.scalacp can break rsc.classpath.scalacp.Types, while a change to rsc.classpath.scalacp.Types can't break rsc.classpath.scalacp.
Position
Below the diagonal: rsc.classpath.scalacp.Types uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rsc.semanticdb.Defns uses a type in rsc.input.
The types involved
rsc.semanticdb.Defns.DefnOps → rsc.input.Language
Direction
rsc.semanticdb.Defns uses rsc.input, so a change to rsc.input can break rsc.semanticdb.Defns, while a change to rsc.semanticdb.Defns can't break rsc.input.
Position
Below the diagonal: rsc.semanticdb.Defns uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rsc.semanticdb.Defns uses a type in rsc.syntax.
The types involved
rsc.semanticdb.Defns.RetOps → rsc.syntax.Tpt
Direction
rsc.semanticdb.Defns uses rsc.syntax, so a change to rsc.syntax can break rsc.semanticdb.Defns, while a change to rsc.semanticdb.Defns can't break rsc.syntax.
Position
Below the diagonal: rsc.semanticdb.Defns uses a module listed above it, which is the healthy direction.
rsc.semanticdb.Defns uses rsc.semanticdb, so a change to rsc.semanticdb can break rsc.semanticdb.Defns, while a change to rsc.semanticdb.Defns can't break rsc.semanticdb.
Position
Below the diagonal: rsc.semanticdb.Defns uses a module listed above it, which is the healthy direction.
rsc.semanticdb.Scopes uses rsc.outline, so a change to rsc.outline can break rsc.semanticdb.Scopes, while a change to rsc.semanticdb.Scopes can't break rsc.outline.
Position
Below the diagonal: rsc.semanticdb.Scopes uses a module listed above it, which is the healthy direction.
rsc.semanticdb.Scopes uses rsc.semanticdb, so a change to rsc.semanticdb can break rsc.semanticdb.Scopes, while a change to rsc.semanticdb.Scopes can't break rsc.semanticdb.
Position
Below the diagonal: rsc.semanticdb.Scopes uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 54% · Adequate · gated by D2, D4, X5 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
4
High / Critical
Roadmap
Top priorities: 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; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED; Resolve the 80 Orphaned file finding(s) in Knowledge Freshness — start with Scopes.scala (3), Defns.scala (3), Tpts.scala (3).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
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.
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.
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.
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.
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 — 916
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 — 110
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
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 48 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 48 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1011 of 1028 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.scala) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.scala) 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.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (71656 LoC, 2031 module-visible types across 69 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 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 checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
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.
+ 47 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 72 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
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).
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).
Resolve the 1 ClassTooLong finding(s) in God Classes — start with TreeStr.scala. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
479 duplicated block group(s) detected. 35.0 % of the production lines (25,065 of 71,656) are in a reported copy. A further 92 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 501 of the 571 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.
+ 125 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 53 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with Activity.scala (14), Promise.scala (5), Buf.scala (3). — One of this dimension's main actionable groups (53 warning-level).
Resolve the 37 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with AsyncStream.scala (8), Buf.scala (4), ByteReader.scala (3). — One of this dimension's main actionable groups (37 warning-level).
Resolve the 33 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with ByteReader.scala (5), Event.scala (4), Reader.scala (3). — One of this dimension's main actionable groups (33 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
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
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with Synthesizer.scala, ScalasigHighlevel.scala. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
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.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 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.
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.
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.
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.
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).
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).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — 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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 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.
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.
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.
Most significant orphaned file · ×3rsc/src/main/scala/rsc/scalasig/Pickle.scala:1
Dormant codebase
What to do
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).
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).
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.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Change coupling finding(s) in Change Coupling — start with TreeStr.scala. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`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.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · 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.
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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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.
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.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · 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.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`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.
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.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process 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.
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.
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.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a 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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` comprehension or `foreach` leaves the mutable collection it is walking alone — an `ArrayBuffer` or `ListBuffer` counts its changes and its iterator checks the count, an `ArrayDeque` (and `mutable.Queue`/`mutable.Stack`) is walked by index up to its starting length, and a `java.util` collection walked through `asScala` is fail-fast, so a body that adds to or removes from the very collection the loop is walking makes a later step throw `ConcurrentModificationException` (`IndexOutOfBoundsException` for a deque) and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
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.
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.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 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 — 65 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not 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 — N/A — too few peers to establish a naming convention (12734 declarations, no unit with a dominant convention).
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, .scala, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.scala), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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.
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): 475 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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Scala and Java were read, and no request in it can be cancelled by a caller — a Scala request takes no token: a Future cannot be cancelled, and cats-effect, ZIO and Monix interrupt the fiber that made the request from outside the call, not through a parameter; a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — 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.
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/outline/Synthesizer.scala:359— rsc/src/main/scala/rsc/outline/Synthesizer.scala:359-366 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:467-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Promise.scala:76— examples/core/src/main/scala/com/twitter/util/Promise.scala:76-83 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:79-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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/BufByteWriterImpl.scala:159— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:159-166 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:162-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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/BufByteWriterImpl.scala:172— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:172-179 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:175-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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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.
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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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: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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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/concurrent/Spool.scala:375— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:375-380 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:378-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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 6 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/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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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:1162— examples/core/src/main/scala/com/twitter/util/Future.scala:1162-1167 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1165-1170 — 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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:1838— examples/core/src/main/scala/com/twitter/util/Future.scala:1838-1843 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1841-1846 — 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Local.scala:195— examples/core/src/main/scala/com/twitter/util/Local.scala:195-200 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:198-203 — 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Promise.scala:111— examples/core/src/main/scala/com/twitter/util/Promise.scala:111-116 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:114-119 — 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Promise.scala:373— examples/core/src/main/scala/com/twitter/util/Promise.scala:373-378 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:376-381 — 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Timer.scala:36— examples/core/src/main/scala/com/twitter/util/Timer.scala:36-41 | examples/original/core/src/main/scala/com/twitter/util/Timer.scala:39-44 — 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 (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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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: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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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/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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:279— examples/core/src/main/scala/com/twitter/util/Event.scala:279-287 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:282-290 — 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:470— examples/core/src/main/scala/com/twitter/util/Event.scala:470-478 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:473-481 — 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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/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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/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 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Spool.scala:92— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:92-96 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:95-99 — 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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Spool.scala:99— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:99-103 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:102-106 — 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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Buf.scala:375— examples/core/src/main/scala/com/twitter/io/Buf.scala:375-379 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:378-382 — 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Buf.scala:766— examples/core/src/main/scala/com/twitter/io/Buf.scala:766-770 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:769-773 — 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Buf.scala:880— examples/core/src/main/scala/com/twitter/io/Buf.scala:880-884 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:883-887 — 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Buf.scala:1133— examples/core/src/main/scala/com/twitter/io/Buf.scala:1133-1137 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1136-1140 — 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Activity.scala:972— examples/core/src/main/scala/com/twitter/util/Activity.scala:972-976 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:975-979 — 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 (5 lines × 2) examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:33— examples/core/src/main/scala/com/twitter/util/BoundedStack.scala:33-37 | examples/original/core/src/main/scala/com/twitter/util/BoundedStack.scala:36-40 — 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 (5 lines × 2) examples/core/src/main/scala/com/twitter/util/Closable.scala:148— examples/core/src/main/scala/com/twitter/util/Closable.scala:148-152 | examples/original/core/src/main/scala/com/twitter/util/Closable.scala:151-155 — 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 (5 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:153— examples/core/src/main/scala/com/twitter/util/Future.scala:153-157 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:156-160 — 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Local.scala:160— examples/core/src/main/scala/com/twitter/util/Local.scala:160-164 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:163-167 — 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Pool.scala:11— examples/core/src/main/scala/com/twitter/util/Pool.scala:11-15 | examples/original/core/src/main/scala/com/twitter/util/Pool.scala:14-18 — 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 (5 lines × 2) examples/core/src/main/scala/com/twitter/util/Promise.scala:871— examples/core/src/main/scala/com/twitter/util/Promise.scala:871-875 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:874-878 — 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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:238— examples/core/src/main/scala/com/twitter/util/Time.scala:238-242 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:241-245 — 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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) examples/core/src/main/scala/com/twitter/util/Var.scala:171— examples/core/src/main/scala/com/twitter/util/Var.scala:171-175 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:174-178 — 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 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 (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) rsc/src/main/scala/rsc/pretty/TreeStr.scala:144— rsc/src/main/scala/rsc/pretty/TreeStr.scala:144-150 | rsc/src/main/scala/rsc/pretty/TreeStr.scala:156-162 — both copies are in the same file, so extract the 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) 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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/io/Buf.scala:803— examples/core/src/main/scala/com/twitter/io/Buf.scala:803-809 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:806-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1148— examples/core/src/main/scala/com/twitter/io/Buf.scala:1148-1154 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1151-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1222— examples/core/src/main/scala/com/twitter/io/Buf.scala:1222-1228 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1225-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:134— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:134-140 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:137-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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:147— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:147-153 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:150-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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) 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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) 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/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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/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 6 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/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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/io/Files.scala:18— examples/core/src/main/scala/com/twitter/io/Files.scala:18-27 | examples/original/core/src/main/scala/com/twitter/io/Files.scala:21-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. 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/concurrent/AsyncStream.scala:543— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:543-552 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:546-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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 6 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/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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Promise.scala:254— examples/core/src/main/scala/com/twitter/util/Promise.scala:254-263 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:257-266 — 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/Promise.scala:819— examples/core/src/main/scala/com/twitter/util/Promise.scala:819-828 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:822-831 — 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
+ 4 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×19
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:142— examples/core/src/main/scala/com/twitter/util/Local.scala:142-145 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:145-148 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/io/TempFile.scala:70— examples/core/src/main/scala/com/twitter/io/TempFile.scala:70-73 | examples/original/core/src/main/scala/com/twitter/io/TempFile.scala:73-76 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:136— examples/core/src/main/scala/com/twitter/util/Local.scala:136-139 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:139-142 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/conversions/PercentOps.scala:27— examples/core/src/main/scala/com/twitter/conversions/PercentOps.scala:27-30 | examples/original/core/src/main/scala/com/twitter/conversions/PercentOps.scala:30-33 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/NetUtil.scala:121— examples/core/src/main/scala/com/twitter/util/NetUtil.scala:121-124 | examples/original/core/src/main/scala/com/twitter/util/NetUtil.scala:124-127 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/io/Reader.scala:383— examples/core/src/main/scala/com/twitter/io/Reader.scala:383-386 | examples/original/core/src/main/scala/com/twitter/io/Reader.scala:386-389 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala:963— examples/core/src/main/scala/com/twitter/util/Activity.scala:963-966 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:966-969 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:452— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:452-455 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:455-458 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:1797— examples/core/src/main/scala/com/twitter/util/Future.scala:1797-1800 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1800-1803 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Event.scala:333— examples/core/src/main/scala/com/twitter/util/Event.scala:333-336 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:336-339 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:1808— examples/core/src/main/scala/com/twitter/util/Future.scala:1808-1811 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1811-1814 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:136— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:136-139 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:139-142 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:326— examples/core/src/main/scala/com/twitter/io/ByteReader.scala:326-329 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:329-332 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:78— examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:78-81 | examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala:81-84 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Duration.scala:408— examples/core/src/main/scala/com/twitter/util/Duration.scala:408-411 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:411-414 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:812— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:812-815 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:815-818 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:4962— examples/core/src/main/scala/com/twitter/util/Local.scala:4962-4965 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4965-4968 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Tx.scala:55— examples/core/src/main/scala/com/twitter/concurrent/Tx.scala:55-58 | examples/original/core/src/main/scala/com/twitter/concurrent/Tx.scala:58-61 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:2007— examples/core/src/main/scala/com/twitter/util/Future.scala:2007-2010 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2010-2013 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/util/Future.scala:129— examples/core/src/main/scala/com/twitter/util/Future.scala:129-140 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:132-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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/BufByteWriterImpl.scala:185— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:185-196 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:188-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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/BufByteWriterImpl.scala:202— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:202-213 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:205-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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 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 (13 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:70— examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:70-82 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:73-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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) examples/core/src/main/scala/com/twitter/io/ByteReader.scala:434— examples/core/src/main/scala/com/twitter/io/ByteReader.scala:434-446 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:437-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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 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 (14 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:121— examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:121-134 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:124-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 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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/ByteReader.scala:464— examples/core/src/main/scala/com/twitter/io/ByteReader.scala:464-477 | examples/original/core/src/main/scala/com/twitter/io/ByteReader.scala:467-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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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/Duration.scala:375— examples/core/src/main/scala/com/twitter/util/Duration.scala:375-388 | examples/original/core/src/main/scala/com/twitter/util/Duration.scala:378-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 6 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 (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/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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/io/Buf.scala:1269— examples/core/src/main/scala/com/twitter/io/Buf.scala:1269-1284 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1272-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (16 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:1195— examples/core/src/main/scala/com/twitter/io/Buf.scala:1195-1210 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1198-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (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.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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.
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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/Future.scala:1677— examples/core/src/main/scala/com/twitter/util/Future.scala:1677-1694 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:1680-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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×9
Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/outline/Scheduler.scala:398— rsc/src/main/scala/rsc/outline/Scheduler.scala:398-406 | rsc/src/main/scala/rsc/outline/Scheduler.scala:718-727 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/util/TreeUtil.scala:34— rsc/src/main/scala/rsc/util/TreeUtil.scala:34-42 | rsc/src/main/scala/rsc/util/TreeUtil.scala:44-52 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/parse/scala/Modifiers.scala:68— rsc/src/main/scala/rsc/parse/scala/Modifiers.scala:68-79 | rsc/src/main/scala/rsc/parse/scala/Templates.scala:78-86 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) rsc/src/main/scala/rsc/parse/java/Helpers.scala:92— rsc/src/main/scala/rsc/parse/java/Helpers.scala:92-100 | rsc/src/main/scala/rsc/parse/scala/Helpers.scala:102-110 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala:34— examples/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala:34-42 | examples/original/core/src/main/scala/com/twitter/util/LastWriteWinsQueue.scala:37-45 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/util/Promise.scala:75— examples/core/src/main/scala/com/twitter/util/Promise.scala:75-83 | examples/original/core/src/main/scala/com/twitter/util/Promise.scala:78-86 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala:679— examples/core/src/main/scala/com/twitter/io/Buf.scala:679-687 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:682-690 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:189— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:189-197 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:192-200 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala:141— examples/core/src/main/scala/com/twitter/util/Activity.scala:141-149 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:144-152 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 6 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 (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/concurrent/AsyncStream.scala:703— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:703-721 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:706-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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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· Edited copy of a member (3 corresponding lines) · ×8
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala:259— examples/core/src/main/scala/com/twitter/util/Activity.scala:259-261 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:262-264 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:55— examples/core/src/main/scala/com/twitter/util/Local.scala:55-57 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:58-60 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala:245— examples/core/src/main/scala/com/twitter/util/Activity.scala:245-247 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:248-250 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Activity.scala:235— examples/core/src/main/scala/com/twitter/util/Activity.scala:235-237 | examples/original/core/src/main/scala/com/twitter/util/Activity.scala:238-240 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:387— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:387-389 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:390-392 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:4847— examples/core/src/main/scala/com/twitter/util/Local.scala:4847-4849 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4850-4852 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:2127— examples/core/src/main/scala/com/twitter/util/Future.scala:2127-2129 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2130-2132 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:191— examples/core/src/main/scala/com/twitter/concurrent/Offer.scala:191-193 | examples/original/core/src/main/scala/com/twitter/concurrent/Offer.scala:194-196 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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.
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.
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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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.
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 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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.
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.
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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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/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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 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 (25 lines × 2) examples/core/src/main/scala/com/twitter/util/Future.scala:2059— examples/core/src/main/scala/com/twitter/util/Future.scala:2059-2083 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:2062-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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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/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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/util/Var.scala:271— examples/core/src/main/scala/com/twitter/util/Var.scala:271-290 | examples/original/core/src/main/scala/com/twitter/util/Var.scala:274-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 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 (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· Edited copy of a member (7 corresponding lines) · ×4
Edited copy of a member (7 corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala:557— rsc/src/main/scala/rsc/outline/Synthesizer.scala:557-563 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:565-571 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) rsc/src/main/scala/rsc/parse/scala/Defns.scala:81— rsc/src/main/scala/rsc/parse/scala/Defns.scala:81-87 | rsc/src/main/scala/rsc/parse/scala/Defns.scala:89-95 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:253— examples/core/src/main/scala/com/twitter/util/Local.scala:253-259 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:256-262 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:374— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:374-380 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:377-383 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 6 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· Edited copies of one member (4 members, 3+ corresponding lines) · ×4
Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:346— examples/core/src/main/scala/com/twitter/util/Future.scala:346-348 | examples/core/src/main/scala/com/twitter/util/Futures.scala:80-82 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:349-351 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:83-85 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:331— examples/core/src/main/scala/com/twitter/util/Future.scala:331-333 | examples/core/src/main/scala/com/twitter/util/Futures.scala:65-67 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:334-336 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:68-70 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:317— examples/core/src/main/scala/com/twitter/util/Future.scala:317-319 | examples/core/src/main/scala/com/twitter/util/Futures.scala:51-53 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:320-322 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:54-56 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 3+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Future.scala:307— examples/core/src/main/scala/com/twitter/util/Future.scala:307-309 | examples/core/src/main/scala/com/twitter/util/Futures.scala:41-43 | examples/original/core/src/main/scala/com/twitter/util/Future.scala:310-312 | examples/original/core/src/main/scala/com/twitter/util/Futures.scala:44-46 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
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 14 separate duplicated blocks between them, totalling at least 154 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 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 (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.
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`.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) rsc/src/main/scala/rsc/scalasig/Pickle.scala:1026— rsc/src/main/scala/rsc/scalasig/Pickle.scala:1026-1038 | rsc/src/main/scala/rsc/scalasig/Pickle.scala:1039-1051 — 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) rsc/src/main/scala/rsc/scalasig/Entries.scala:14— rsc/src/main/scala/rsc/scalasig/Entries.scala:14-31 | rsc/src/main/scala/rsc/scalasig/Entries.scala:33-45 — 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) scalafix/rules/src/main/scala/rsc/rules/semantics/Env.scala:13— scalafix/rules/src/main/scala/rsc/rules/semantics/Env.scala:13-25 | scalafix/rules/src/main/scala/rsc/rules/semantics/Env.scala:27-40 — 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 (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) rsc/src/main/scala/rsc/parse/Parser.scala:16— rsc/src/main/scala/rsc/parse/Parser.scala:16-31 | rsc/src/main/scala/rsc/scan/Scanner.scala:20-35 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) examples/core/src/main/scala/com/twitter/util/Time.scala:598— examples/core/src/main/scala/com/twitter/util/Time.scala:598-613 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:601-616 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) examples/core/src/main/scala/com/twitter/util/Time.scala:177— examples/core/src/main/scala/com/twitter/util/Time.scala:177-192 | examples/original/core/src/main/scala/com/twitter/util/Time.scala:180-195 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala:329— rsc/src/main/scala/rsc/outline/Synthesizer.scala:329-336 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:680-687 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) rsc/src/main/scala/rsc/outline/Outliner.scala:506— rsc/src/main/scala/rsc/outline/Outliner.scala:506-513 | rsc/src/main/scala/rsc/semanticdb/Bounds.scala:23-30 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala:802— examples/core/src/main/scala/com/twitter/io/Buf.scala:802-809 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:805-812 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
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.
Edited copy of a member (12 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:273— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:273-284 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:276-287 — 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.
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 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 (41 lines × 2) 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 — 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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.
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.
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.
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.
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.
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.
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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala:611— rsc/src/main/scala/rsc/outline/Synthesizer.scala:611-625 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:627-641 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:29— scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:29-43 | scalasig/scalasig/src/main/scala/scala/meta/scalasig/highlevel/Scalasig.scala:45-59 — 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) · ×2
Edited copy of a member (14 corresponding lines) rsc/src/main/scala/rsc/Compiler.scala:142— rsc/src/main/scala/rsc/Compiler.scala:142-155 | rsc/src/main/scala/rsc/Compiler.scala:157-171 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) rsc/src/main/scala/rsc/outline/Env.scala:143— rsc/src/main/scala/rsc/outline/Env.scala:143-156 | scalafix/rules/src/main/scala/rsc/rules/semantics/Env.scala:42-55 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×2
Edited copies of one member (4 members, 8+ corresponding lines) examples/core/src/main/scala/com/twitter/io/Buf.scala:1147— examples/core/src/main/scala/com/twitter/io/Buf.scala:1147-1154 | examples/core/src/main/scala/com/twitter/io/Buf.scala:1221-1228 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1150-1157 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:1224-1231 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 8+ corresponding lines) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:133— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:133-140 | examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:146-153 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:136-143 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:149-156 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×2
Edited copy of a member (2 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:256— examples/core/src/main/scala/com/twitter/concurrent/Spool.scala:256-257 | examples/original/core/src/main/scala/com/twitter/concurrent/Spool.scala:259-260 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (2 corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:4852— examples/core/src/main/scala/com/twitter/util/Local.scala:4852-4853 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:4855-4856 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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.
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 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
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.
Duplicated block (50 lines × 2) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:731— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:731-780 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:734-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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (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 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (47 lines × 2) examples/core/src/main/scala/com/twitter/util/Config.scala:132— examples/core/src/main/scala/com/twitter/util/Config.scala:132-178 | examples/original/core/src/main/scala/com/twitter/util/Config.scala:135-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. 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 (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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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.
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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (38 lines × 2) examples/core/src/main/scala/com/twitter/util/Event.scala:146— examples/core/src/main/scala/com/twitter/util/Event.scala:146-183 | examples/original/core/src/main/scala/com/twitter/util/Event.scala:149-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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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.
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.
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.
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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 83% of the time (20 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 20 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.
D4 · Code Duplication· Edited copy of a member (65 corresponding lines) · ×1
Edited copy of a member (65 corresponding lines) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileReader.scala:44— scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileReader.scala:44-108 | scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/ClassfileWriter.scala:20-84 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (83 corresponding lines) · ×1
Edited copy of a member (83 corresponding lines) rsc/src/main/scala/rsc/scan/java/Scanner.scala:18— rsc/src/main/scala/rsc/scan/java/Scanner.scala:18-100 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:226-312 — These two members are one piece of code written twice and then edited apart: 83 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:52— scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:52-99 | scalasig/scalasig/src/main/scala/scala/meta/internal/scalasig/DataPrettifiers.scala:209-252 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) rsc/src/main/scala/rsc/scan/java/Scanner.scala:155— rsc/src/main/scala/rsc/scan/java/Scanner.scala:155-215 | rsc/src/main/scala/rsc/scan/scala/Scanner.scala:144-204 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) rsc/src/main/scala/rsc/parse/java/Terms.scala:32— rsc/src/main/scala/rsc/parse/java/Terms.scala:32-84 | rsc/src/main/scala/rsc/parse/scala/Lits.scala:20-60 — 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 (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) rsc/src/main/scala/rsc/parse/scala/Pats.scala:62— rsc/src/main/scala/rsc/parse/scala/Pats.scala:62-83 | rsc/src/main/scala/rsc/parse/scala/Tpts.scala:90-106 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) rsc/src/main/scala/rsc/outline/Synthesizer.scala:414— rsc/src/main/scala/rsc/outline/Synthesizer.scala:414-432 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:573-584 | rsc/src/main/scala/rsc/outline/Synthesizer.scala:643-655 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) rsc/src/main/scala/rsc/pretty/Repl.scala:129— rsc/src/main/scala/rsc/pretty/Repl.scala:129-138 | rsc/src/main/scala/rsc/pretty/Str.scala:104-113 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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· 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· Edited copies of one member (6 members, 8+ corresponding lines) · ×1
Edited copies of one member (6 members, 8+ corresponding lines) examples/core/src/main/scala/com/twitter/util/Local.scala:290— examples/core/src/main/scala/com/twitter/util/Local.scala:290-297 | examples/core/src/main/scala/com/twitter/util/Local.scala:300-307 | examples/core/src/main/scala/com/twitter/util/Local.scala:341-349 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:293-300 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:303-310 | examples/original/core/src/main/scala/com/twitter/util/Local.scala:344-352 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:305— examples/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:305-360 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncMeter.scala:308-363 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:391— examples/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:391-396 | examples/original/core/src/main/scala/com/twitter/concurrent/AsyncStream.scala:394-399 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:158— examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:158-166 | examples/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:171-179 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:161-169 | examples/original/core/src/main/scala/com/twitter/io/BufByteWriterImpl.scala:174-182 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:116— examples/core/src/main/scala/com/twitter/util/BatchExecutor.scala:116-133 | examples/original/core/src/main/scala/com/twitter/util/BatchExecutor.scala:119-136 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
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.
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.
Duplicated block (57 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:433— examples/core/src/main/scala/com/twitter/io/Buf.scala:433-489 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:436-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (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 45 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (48 lines × 2) 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 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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 258 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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.
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.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
Duplicated block (79 lines × 2) examples/core/src/main/scala/com/twitter/io/Buf.scala:92— examples/core/src/main/scala/com/twitter/io/Buf.scala:92-170 | examples/original/core/src/main/scala/com/twitter/io/Buf.scala:95-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 42 separate duplicated blocks between them, totalling at least 648 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (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 332 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 4353 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 4) 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 27 separate duplicated blocks between them, totalling at least 302 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
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.
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.
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.
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 14 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
No ADRs found REDACTED:140— 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/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 140).
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.
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.
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.)
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.
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.1.202611041320-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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d8f4-402f-7fa3-8ce7-b19be2e3d610 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 2 · Warnings: 916 · Recommendations: 103 · Info: 7 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 07:27 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.