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

vmarc/knooppuntnet

Measured 17 November 2026, 18:20 UTC, at code version 477e0ec

First survey, so nothing to compare with yet Code coverage: not measured

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

CAI score 37.9out of 100 At risk

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

A large codebase: 183,732 lines of product code in 9 projects, tests not counted · Estimated rebuild effort: about 1.9 person-years · Weakest lens: Production Readiness, 16.8

Findings by how serious they are

165 critical 2916 serious 90 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 18:20 UTC

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

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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

75of 75 dimensions measured by tools.
3161of 3171 findings point to an exact file and line, so you can open each one in the code. The other 10 concern the repository as a whole, such as missing documentation.
75dimensions across 7 lenses, read from 183,732 lines of product code in 9 projects.
Chapters

Executive summary

vmarc/knooppuntnet is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because we found no working pipeline that builds or tests changes to the code and no automated security scanning of the code, its secrets or its dependencies. It scores 37.9 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 16.8, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 4.1 points. Adding an automated build and test pipeline would lift Production Readiness itself, worth about 3.1 points. Raising Production Readiness to 70 would lift the score to about 55.0.

Ninety-three known security holes in the packages the code depends on can be used by attackers. Two weaknesses in the code could be used by an attacker, and nineteen controls can't be used without a mouse. Making the controls work with a keyboard, updating the vulnerable packages and fixing the weaknesses the scanner points to would close these risks. The password or key in the code's history needs replacing, with the old one switched off. The 28 labels or groups of fields with no name need connecting to their fields or naming.

The product code is 183,732 lines, about €270,000 to rebuild. The check for the health of its packages couldn't finish, so that result is missing, not a clean pass.

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

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

If Production Readiness rose from 16.8 to 70, the lowest score rated Strong, the score would rise from 37.9 to about 55.0.

Code composition: what the lines of code are
Product code 67%Tests 33%
Rebuild cost: about €270,000 · Estimate
Cost to rebuild€90,000 to €450,000, for 1,494 to 4,741 hours of work, about 1.9 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 38. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 183,732 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 4.1 points · Medium effort · Keyboard semantics
2
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 3.1 points · Medium effort · CI/CD gates
3
Run what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Raises the score by about 3.1 points · Medium effort · Security & performance tooling

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €270,000 to build again, about 1.9 person-years of work. Its weakest lens is Production Readiness, at 16.8 (Critical). 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
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 4.1 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 558,589 lines over the last 90 days, which is about 2,265,389 lines a year. At that pace, the extra work comes to an estimated 317.5 to 1904.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch analysis analysis api api base base api->base core core frontend frontend introduction introduction map map server server web web

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.

1619 modules, with 2186 dependencies between them. 8 loops run through 34 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 frontend.src.app.api.common.bounds2 frontend.src.app.api.common.changes.details.change-key3 frontend.src.app.api.common.common.ref4 frontend.src.app.api.common.country5 frontend.src.app.api.common.fact6 frontend.src.app.api.common.planner.leg-end7 frontend.src.app.api.common.planner.plan-node8 frontend.src.app.api.common.route-type9 frontend.src.app.api.custom.tag10 frontend.src.app.monitor.internal.monitor_service11 frontend.src.app.planner.domain.plan.plan-flag12 kpn.api.common.changes.filter13 kpn.api.id14 frontend.src.app.mapold.layers.old-old-map-layer15 frontend.src.app.planner.domain.plan.plan-leg16 frontend.src.app.shared.services.api_service17 kpn.api.common.location18 kpn.api.common.monitor19 frontend.src.app.planner.domain.plan.plan20 kpn.api.common.route21 frontend.src.app.planner.domain.context.planner-context22 kpn.api.common.diff23 frontend.src.app.planner.domain.commands.planner-command24 kpn.api.common.node25 kpn.api.common.changes26 kpn.api.custom27 kpn.api.common.data.raw28 kpn.api.common.data29 kpn.api.common.common30 kpn.api.common.changes.details31 kpn.api.common32 kpn.api.common.network33 kpn.server.analyzer.engine.changes34 kpn.server.analyzer.engine.tiles.domain35 kpn.server.monitor.domain36 kpn.core.doc37 kpn.server.analyzer.engine.analysis.route.domain38 kpn.database.base39 kpn.server.repository40 kpn.tools.code.codecs.generated
1 frontend.src.app.api.common.bounds
2 frontend.src.app.api.common.changes.details.change-key
3 frontend.src.app.api.common.common.ref
4 frontend.src.app.api.common.country
5 frontend.src.app.api.common.fact
6 frontend.src.app.api.common.planner.leg-end
7 frontend.src.app.api.common.planner.plan-node
8 frontend.src.app.api.common.route-type
9 frontend.src.app.api.custom.tag
10 frontend.src.app.monitor.internal.monitor_service
11 frontend.src.app.planner.domain.plan.plan-flag
12 kpn.api.common.changes.filter
13 kpn.api.id
14 frontend.src.app.mapold.layers.old-old-map-layer1
15 frontend.src.app.planner.domain.plan.plan-leg11
16 frontend.src.app.shared.services.api_service11
17 kpn.api.common.location35214
18 kpn.api.common.monitor139312
19 frontend.src.app.planner.domain.plan.plan111
20 kpn.api.common.route1111116132115
21 frontend.src.app.planner.domain.context.planner-context11121
22 kpn.api.common.diff142653
23 frontend.src.app.planner.domain.commands.planner-command1
24 kpn.api.common.node1131529
25 kpn.api.common.changes111421253
26 kpn.api.custom148
27 kpn.api.common.data.raw1841
28 kpn.api.common.data1042
29 kpn.api.common.common114
30 kpn.api.common.changes.details521143716
31 kpn.api.common13231231545
32 kpn.api.common.network11925125
33 kpn.server.analyzer.engine.changes23511814
34 kpn.server.analyzer.engine.tiles.domain1525
35 kpn.server.monitor.domain137425
36 kpn.core.doc111218587364
37 kpn.server.analyzer.engine.analysis.route.domain2812272
38 kpn.database.base7114311121
39 kpn.server.repository738121165513131141
40 kpn.tools.code.codecs.generated6244036181166651396419221530363
Uses a module listed above itPart of a loopThe module itself
1 frontend.src.app.api.common.bounds2 frontend.src.app.api.common.changes.details.change-key3 frontend.src.app.api.common.common.ref4 frontend.src.app.api.common.country5 frontend.src.app.api.common.fact6 frontend.src.app.api.common.planner.leg-end7 frontend.src.app.api.common.planner.plan-node8 frontend.src.app.api.common.route-type9 frontend.src.app.api.custom.tag10 frontend.src.app.monitor.internal.monitor_service11 frontend.src.app.planner.domain.plan.plan-flag12 kpn.api.common.changes.filter13 kpn.api.id14 frontend.src.app.mapold.layers.old-old-map-layer15 frontend.src.app.planner.domain.plan.plan-leg16 frontend.src.app.shared.services.api_service17 kpn.api.common.location18 kpn.api.common.monitor19 frontend.src.app.planner.domain.plan.plan20 kpn.api.common.route21 frontend.src.app.planner.domain.context.planner-context22 kpn.api.common.diff23 frontend.src.app.planner.domain.commands.planner-command24 kpn.api.common.node25 kpn.api.common.changes26 kpn.api.custom27 kpn.api.common.data.raw28 kpn.api.common.data29 kpn.api.common.common30 kpn.api.common.changes.details31 kpn.api.common32 kpn.api.common.network33 kpn.server.analyzer.engine.changes34 kpn.server.analyzer.engine.tiles.domain35 kpn.server.monitor.domain36 kpn.core.doc37 kpn.server.analyzer.engine.analysis.route.domain38 kpn.database.base39 kpn.server.repository40 kpn.tools.code.codecs.generatedfrontend.src.app.api.common.bounds1frontend.src.app.api.common.changes.details.change-key2frontend.src.app.api.common.common.ref3frontend.src.app.api.common.country4frontend.src.app.api.common.fact5frontend.src.app.api.common.planner.leg-end6frontend.src.app.api.common.planner.plan-node7frontend.src.app.api.common.route-type8frontend.src.app.api.custom.tag9frontend.src.app.monitor.internal.monitor_service10frontend.src.app.planner.domain.plan.plan-flag11kpn.api.common.changes.filter12kpn.api.id13frontend.src.app.mapold.layers.old-old-map-layer14frontend.src.app.planner.domain.plan.plan-leg15frontend.src.app.shared.services.api_service16kpn.api.common.location17kpn.api.common.monitor18frontend.src.app.planner.domain.plan.plan19kpn.api.common.route20frontend.src.app.planner.domain.context.planner-context21kpn.api.common.diff22frontend.src.app.planner.domain.commands.planner-command23kpn.api.common.node24kpn.api.common.changes25kpn.api.custom26kpn.api.common.data.raw27kpn.api.common.data28kpn.api.common.common29kpn.api.common.changes.details30kpn.api.common31kpn.api.common.network32kpn.server.analyzer.engine.changes33kpn.server.analyzer.engine.tiles.domain34kpn.server.monitor.domain35kpn.core.doc36kpn.server.analyzer.engine.analysis.route.domain37kpn.database.base38kpn.server.repository39kpn.tools.code.codecs.generated40111113521413931211111111161321151112114265311131529111421253148184110421145211437161323123154511925125235118141525137425111218587364281227271143111217381211655131311416244036181166651396419221530363+1579 more modules (most-connected shown)

At a glance — Code Health · 57.3 · Adequate · gated by D4, X5 ·

At a glance — Architecture · 71.0 · Adequate · gated by D26 ·

At a glance — Maturity · 78.0 · Strong ·

At a glance — Readiness · 16.8 · Critical · gated by R4, R8, P1, P3, P7 ·

At a glance — Security · 81.3 · Checked 4 of 9 ·

At a glance — Domain Modelling · 100.0 · Exemplary ·

At a glance — Accessibility · 42.0 · Weak · gated by AC4 ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures124High / Critical
A05:2025 — Injection7High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Add a CI workflow that builds and runs the test suite on every push/PR; Run what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.1 ptsMediumKeyboard semantics
Add a CI workflow that builds and runs the test suite on every push/PR.+3.1 ptsMediumCI/CD gates
Run what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+3.1 ptsMediumSecurity & performance tooling
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+3.1 ptsMediumDependency Hygiene
Add tests that import the unreached modules (directly or through their public entry).+2.4 ptsMediumTest Coverage
Resolve the 3 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json, REDACTED, build.sbt.+1.0 ptsLowProject Cohesion
On Scala 3, add `-Yexplicit-nulls` to `scalacOptions` so `String` and `String | Null` mean different things, and type each Java API's result as nullable where it can return null; on Scala 2 (or as a first step), enable WartRemover's `Null` wart (`wartremoverErrors += Wart.Null`) or Scalafix's `DisableSyntax.noNulls = true` so the code holds absence in `Option`. Then pay the assertions down rather than adding to them: each `.nn` is a null the compiler could not rule out — wrap the Java value in `Option(…)` at the boundary, pattern-match on `null` once there, or change the API so the null cannot arrive; an `unsafeNulls` import switches the checking off for everything after it.+1.9 ptsMediumNullable reference types
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+1.8 ptsMediumForms & labels

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
frontend/src/app/map/map.service.ts4.9MixedChange Coupling: Boundary-crossing change coupling: map.service.ts ↔ layers.ts
backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala5.5MixedCode Duplication: Edited copy of a member (12 corresponding lines)
backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala5.5MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
REDACTED5.9MixedDependency Vulnerabilities: Medium CVE: REDACTED
backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala6.0MixedExplicit Debt: TodoComment
server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala6.0MixedExplicit Debt: TodoComment
server/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala6.0MixedExplicit Debt: TodoComment
server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala6.0MixedExplicit Debt: TodoComment
server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala6.0MixedExplicit Debt: TodoComment
server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala6.0MixedExplicit Debt: TodoComment
backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala6.0MixedExplicit Debt: TodoComment

How the grades work

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

Critical — 165

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

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

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

Could not be resolved — 14

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 75 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 — 75 dimensions across the health lenses
D1D2D3D4D5D6D10D13D14D15D17D19D20D24D26D28D29D30D34D35D43D44AC1AC2AC3AC4AC5AC6AX10AX2AX3AX4AX6DM10DM12DM6DM9GD1IC1M1M2M3M4P1P2P3P5P6P7R1R10R11R2R3R4R5R6R7R8R9S1X12X13X16X18X19X21X23X24X25X27X3X30X4X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1eabd-3448-7a0d-9e38-1cf12d55ed9a.

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

Run transparency — what happened this run

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

  • D10 Test Quality — measured, with a gap in what it reached — 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. The 105 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 1,006 test source file(s) (.scala) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — 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 reliability not scored — the JavaScript/TypeScript suite (vitest via `npm ci --ignore-scripts` in frontend/; vitest via `npm ci --ignore-scripts` in map/ (0 tests)) ran but surfaced no test cases to the runner, so flakiness couldn't be exercised.
  • 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 reliability for the vitest suite in frontend/ was NOT MEASURED: the dependency install for frontend/ failed in the analyzer sandbox (npm error Cannot read properties of null (reading 'children')), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's dependency manifests WERE read and their pinning discipline assessed; what went unanswered is the currency half, because repo.osgeo.org — the registry that answers it — was asked and did not reply (the build stopped because repo.osgeo.org, a repository this project declares, refused it with HTTP 403 — what this scan's egress allowlist returns for a host that is not on it, so the dependency graph was not resolved). This is OUR side and it is an ENVIRONMENT fault, not a missing collector: the collector exists and ran. An HTTP 403 here is what this scan's egress allowlist returns for a host that is not on it, so the remedy is to add repo.osgeo.org to the allowlist and re-run — not to build anything.
  • D14 License Compliance — 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. This repository declares an sbt build (build.sbt), but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its sbt dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — 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. This repository declares package.json, but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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 (6 contributor(s) across 4212 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 5 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. 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: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — 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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • 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.
  • D28 Secrets (history) — 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. D28's config-credential rule (WD-SECRET-0002) parses each committed `.json` config as a document and reads credential-named values; `backend/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-days.json`, `backend/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-months.json`, `server/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-days.json`, `server/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-months.json` did not parse (JSON5, a template, several concatenated documents), so a credential bound there is UNMEASURED by that rule. gitleaks still scanned the same files as text.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `frontend/src/app/shared/components/format/show-if-truncated.directive.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC2 Forms & labels — 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. 34 further occurrence(s) are not listed individually; the score already reflects all 74.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Spring (Scala), whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. A program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. (rule: missing-tool). The renderer reported: the dev server (`npm run serve` in frontend/) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> frontend@5.0.6 serve / > ng serve --proxy-config src/proxy-dev.conf.mjs / sh: 1: ng: not found" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (serve). the dev server (`npm run serve` in frontend/) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> frontend@5.0.6 serve / > ng serve --proxy-config src/proxy-dev.conf.mjs / sh: 1: ng: not found" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — 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. 'com.mongodb' is imported (server/src/main/scala/kpn/server/sync/SyncTool.scala:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — 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. 'com.mongodb' is imported (server/src/main/scala/kpn/server/sync/SyncTool.scala:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — 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. 'com.mongodb' is imported (server/src/main/scala/kpn/server/sync/SyncTool.scala:3), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • DM8 Value-object opportunities — 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 finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • R10 Code Duplication — 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. 157 further occurrence(s) are not listed individually; the score already reflects all 197.
  • R4 Test Coverage — 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. 849 further occurrence(s) are not listed individually; the score already reflects all 889.
  • R7 Dead Code — 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. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 264 further occurrence(s) are not listed individually; the score already reflects all 304.
  • X27 Collection changed while being enumerated — 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. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.

Repo exclusion declarations: 122 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality 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.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • 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.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: 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.
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.9 / 10Adequate✓ Tool-verified

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

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

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

27 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MongoQueryLocationNodes.filterOptions at 42. A further 10 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 Facts.level at 48 — they are counted neither in the figure above nor in this dimension's score. 6 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: backend/src/main/scala/kpn/core/analysis/Facts.scala (Facts.level at 48), server/src/main/scala/kpn/core/analysis/Facts.scala (Facts.level at 48), backend/src/main/scala/kpn/core/tools/operation/OperationTool.scala (OperationTool.process at 26), server/src/main/scala/kpn/core/tools/operation/OperationTool.scala (OperationTool.process at 26), backend/src/main/scala/kpn/server/api/status/StatusFacade.scala (StatusFacade.replicationStatus at 16), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

MongoQueryLocationNodes.filterOptions (cyclomatic 42) · ×2backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56
BaseRouteSegmentAnalyzer.handleRoundabout (cyclomatic 38) · ×2backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:89
JavaLinkAnalyzer.determineDirectionBasedOnReference (cyclomatic 27) · ×2backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:411
OneWayAnalyzer.direction (cyclomatic 23) · ×2backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:29
MongoQueryLocationRoutes.filterOptions (cyclomatic 21) · ×2backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63

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

What to do

  1. Bring the 27 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with MongoQueryLocationNodes.filterOptions (cyclomatic 42), MongoQueryLocationNodes.filterOptions (cyclomatic 42), FactNameComponent.ngOnInit (cyclomatic 41). — 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 27 together lifts Cyclomatic Complexity from 6.9 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D2 · Cognitive Complexity6.5 / 10Adequate✓ Tool-verified

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

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

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

66 method(s) exceeded the cognitive complexity threshold of 15; the worst was BaseRouteSegmentAnalyzer.handleRoundabout at 65.

BaseRouteSegmentAnalyzer.handleRoundabout (cognitive 65) · ×2backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:89
MongoQueryLocationNodes.filterOptions (cognitive 58) · ×2backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56
JavaLinkAnalyzer.determineDirectionBasedOnReference (cognitive 46) · ×2backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:411
JavaLinkAnalyzer.processOnewayMember (cognitive 45) · ×2backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228
BaseRouteStructureAnalyzer.analyze (cognitive 39) · ×2backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:27

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

What to do

  1. Bring the 66 bodies over 15 down to 15 or less in Cognitive Complexity — start with BaseRouteSegmentAnalyzer.handleRoundabout (cognitive 65), BaseRouteSegmentAnalyzer.handleRoundabout (cognitive 65), PlannerEngineImpl.handleDragEvent (cognitive 61). — 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 66 together lifts Cognitive Complexity from 6.5 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D3 · God Classes9.7 / 10Stronggated by 13 serious findings✓ Tool-verified

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

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

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

13 god class(es) detected.

TooManyMethods: MonitorRouteRepository · ×8backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:59
MethodTooLong: OverviewConfigurationService.buildStatisticConfigurations · ×3frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:13
ClassTooLong: SymbolShape · ×2frontend/src/app/symbol/internal/symbol-shape.ts:1

What to do

  1. Resolve the 8 TooManyMethods finding(s) in God Classes — start with MonitorRouteRepository.scala (2), AnalysisController.scala (2), AnalysisFacade.scala (2). — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 3 MethodTooLong finding(s) in God Classes — start with JavaLinkAnalyzer.java (2), overview-configuration.service.ts. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 ClassTooLong finding(s) in God Classes — start with symbol-shape.ts, planner-engine-impl.ts. — One of this dimension's main actionable groups (2 warning-level).

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

D4 · Code Duplication0.0 / 10Critical✓ Tool-verified

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

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

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

1995 duplicated block group(s) detected. 40.0 % of the production lines (73,527 of 183,732) are in a reported copy. A further 221 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .ts (26% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (11 lines × 2) · ×133backend/api/src/main/scala/kpn/api/common/route/Link.scala:64
Duplicated block (7 lines × 2) · ×130backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:63
Duplicated block (9 lines × 2) · ×122backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala:8
Duplicated block (8 lines × 2) · ×118backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:21
Duplicated block (10 lines × 2) · ×110backend/src/main/scala/kpn/core/tools/country/CountryBoundaryLoader.scala:17

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

What to do

  1. Resolve the 133 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with MonitorRouteRepository.scala (4), RouteStructureRowsAnalyzer.scala (3), BaseRouteNodesAnalyzer.scala (3). — One of this dimension's main actionable groups (133 warning-level).
  2. Resolve the 130 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with RelationAnalyzer.scala (4), ChangeSetRepository.scala (3), CodecWriter.scala (3). — One of this dimension's main actionable groups (130 warning-level).
  3. Resolve the 122 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with TagExpressionFormatter.scala (3), MongoQueryLocationRoutes.scala (3), WatchedRoutes.scala (3). — One of this dimension's main actionable groups (122 warning-level).

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

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

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

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

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

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

9 production modules (Maven+npm+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 9 (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: base

What to do

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

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

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

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

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

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

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

12 of 412 classes have LCOM4 above 3.

Low cohesion: OperationActions (LCOM4 21) · ×12backend/src/main/scala/kpn/core/tools/operation/OperationActions.scala:10

What to do

  1. Resolve the 12 Low cohesion finding(s) in Cohesion (LCOM4) — start with OperationActions.scala (2), DatabaseCollection.scala (2), MetricsRepository.scala (2). — One of this dimension's main actionable groups (12 warning-level).

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

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

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

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

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

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

REDACTED scan ran and found no leaked secrets. 2 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 28 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 2 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 17 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 6 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares an sbt build (build.sbt) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt9.7 / 10Stronggated by 296 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×295server/src/test/scala/kpn/server/monitor/route/update/MonitorUpdaterTest10_multi_gpx_add.scala:231
TodoComment repeated across 12 filesserver/src/test/scala/kpn/server/api/planner/leg/GraphTestData.scala:66

What to do

  1. Resolve the 295 TodoComment finding(s) in Explicit Debt — start with StructureElementAnalyzer.scala (22), BaseRouteNodesAnalyzerTest.scala (12), MonitorRouteMembersPageBuilder.scala (12). — One of this dimension's main actionable groups (295 warning-level).
  2. Resolve the 1 TodoComment repeated across 12 files finding(s) in Explicit Debt — start with GraphTestData.scala. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

2 of 2 documentation facets pass in full. 15 document(s) read across 8 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

Method: 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.

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

No architecture decision records were found.

No ADRs foundREDACTED:427

What to do

  1. 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.

D24 · Comment Value10.0 7.8 / 10Strong○ Nothing flagged

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

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

0 of 94 judged comments only repeat the code they sit on (0.0 %). 70 comment(s) in another language or script were not judged.

Detailed fixes: d24_recommendation.md.

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

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

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

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

3 of 4 build units (Maven, npm, sbt) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×3frontend/package.json:1

What to do

  1. Resolve the 3 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json, REDACTED, build.sbt. — One of this dimension's main actionable groups (3 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)5.9 / 10Adequate✓ Tool-verified

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

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

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

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

7 finding(s): 0 critical, 2 high, 3 medium, 2 low. semgrep hit a parse error in 6 file(s) — `backend/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-days.json`, `backend/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-months.json`, `frontend/src/app/shared/components/format/show-if-truncated.directive.ts` (line 13), `server/servers/kpn-web/scripts/stop-database.sh` (line 1, line 2), `server/src/main/resources/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts-days.json`, … (+1 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

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

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

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

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

124 finding(s): 13 critical, 80 high, 27 medium, 4 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 80 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (80). — One of this dimension's main actionable groups (80 issue-level).
  2. Resolve the 26 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (24), REDACTED (2). — One of this dimension's main actionable groups (26 warning-level).
  3. Resolve the 13 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (13). — One of this dimension's main actionable groups (13 issue-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 812 of the 4137 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

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

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

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

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

Strongest change-coupling: location-nodes-page.component.ts↔location-routes-page.component.ts 91%; network-nodes-page.component.ts↔network-routes-page.component.ts 85%; network-facts-page.component.ts↔network-nodes-page.component.ts 81%

Boundary-crossing change coupling: overview-list-stat-table.component.ts ↔ subsets.ts · ×3frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts:1
Change coupling: location-nodes-page.component.ts ↔ location-routes-page.component.ts · ×17frontend/src/app/analysis/location/internal/nodes/location-nodes-page.component.ts:1
Change-coupling hub: network-changes-page.component.ts → network-details-page.component.ts, network-facts-page.component.ts, network-nodes-page.component.ts, network-routes-page.component.ts, route-changes-page.component.ts · ×5frontend/src/app/analysis/network/internal/changes/network-changes-page.component.ts
Change coupling clique: monitor-group-add-page.component.ts, monitor-group-delete-page.component.ts, monitor-group-update-page.component.ts · ×3frontend/src/app/monitor/internal/group/add/monitor-group-add-page.component.ts

What to do

  1. Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with overview-list-stat-table.component.ts, map.service.ts, layers.ts. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 17 Change coupling finding(s) in Change Coupling — start with network-facts-page.component.ts (2), location-map-page.component.ts (2), node-changes-page.component.ts (2). — One of this dimension's main actionable groups (17 warning-level).
  3. Resolve the 5 Change-coupling hub finding(s) in Change Coupling — start with network-changes-page.component.ts, network-details-page.component.ts, location-facts-page.component.ts. — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives5.0 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×2) — frontend/src/app/planner/pages/planner/sidebar/elevation-profile.component.ts:12, frontend/src/app/symbol/symbol.component.ts:19

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×28) — frontend/src/app/analysis/components/filter/filter-checkbox-group.component.ts:16, frontend/src/app/analysis/components/filter/filter-radio-group.component.ts:20, frontend/src/app/analysis/location/internal/components/filter/location-filter-fact.ts:22, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×6) — frontend/src/app/analysis/route/internal/components/route-page-header.component.ts:30, frontend/src/app/analysis/route/internal/components/route-page-header.component.ts:33, frontend/src/app/explore/condition/condition-group.component.ts:30, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — frontend/src/app/explore/condition/condition-location.component.ts:16, frontend/src/app/explore/condition/condition-name.component.ts:29, frontend/src/app/explore/condition/condition-tag.component.ts:21, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — frontend/src/app/explore/explore-page.component.ts:44

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.4 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×7) — frontend/src/app/analysis/changeset/internal/components/change-set-header.component.ts:15, frontend/src/app/analysis/node/internal/details/components/node-summary.component.ts:23, frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts:11, …
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — REDACTED:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <app-root>, so there is no content here to wrap — render the <main> from the component mounted into it. — map/src/index.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×20) — frontend/src/app/analysis/components/action/action-button.component.ts:12, frontend/src/app/analysis/components/changes/filter/change-filter-period.component.ts:28, frontend/src/app/analysis/components/changes/filter/change-filter-period.component.ts:30, …
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×19) — frontend/src/app/analysis/components/action/action-menu-item.component.ts:10, frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat.component.ts:15, frontend/src/app/explore/condition/condition-group.component.ts:36, …
  • An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. — frontend/src/app/planner/pages/planner/popup/planner-popup.component.ts:14

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety6.7 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.lds-ring div` moves (`animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — REDACTED:51

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition8.3 / 10Strong✓ Tool-verified

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

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

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

AX2 · Stateful singletons7.5 / 10Strong✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `AppMonitor` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (lastMail; e.g. `lastMail` in `throttledSend` at line 79). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt. (×2) — backend/src/main/scala/kpn/monitor/AppMonitor.scala:22, server/src/main/scala/kpn/monitor/AppMonitor.scala:22
  • `Analyzer` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (active; e.g. `active` in `process` at line 56). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt. (×2) — backend/src/main/scala/kpn/server/analyzer/Analyzer.scala:17, server/src/main/scala/kpn/server/analyzer/Analyzer.scala:17
  • `ElevationRepository` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (cache; e.g. `cache` in `elevationFor` at line 32). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt. (×2) — backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:17, server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:17
  • `KnownPoiCacheImpl` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (knownPois; e.g. `knownPois` in `add` at line 41). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt. (×2) — backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:10, server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:10
  • `BlacklistRepositoryImpl` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (cachedBlackList, cachedTimestamp; e.g. `cachedBlackList` in `get` at line 20). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt. (×2) — backend/src/main/scala/kpn/server/repository/BlacklistRepositoryImpl.scala:8, server/src/main/scala/kpn/server/repository/BlacklistRepositoryImpl.scala:8

What to do

  • Scala: keep controllers and singletons stateless — per-request data in locals, shared data in a store — or hold the state in a thread-safe type (TrieMap, AtomicInteger/AtomicReference, a cats-effect Ref) or update it under `synchronized { }`; a flag that is only ever overwritten can be a `@volatile var`.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

  • `RouteMember` declares 18 abstract members: `endNodes`, `memberType`, `link`, `linkName`, `nodes`, `id`, `role`, `element`, `linkDescription`, `length`, `nodeCount`, `name`, `description`, `from`, `to`, `fromNode`, `toNode`, `accessible`. 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. 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) — backend/src/main/scala/kpn/core/analysis/RouteMember.scala:8, server/src/main/scala/kpn/core/analysis/RouteMember.scala:8

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
DM10 · One transaction, one aggregate10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

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

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.

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

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

DM9 · Scattered domain decisions10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

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

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

  • `routeReferenceKey` 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) — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421, server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421
  • `changesFilterFrom` is a shipped member whose whole body is still a "not implemented" error, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface. — backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:144
  • `decode` 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) — backend/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17, server/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17

What to do

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

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

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

  • `routeReferenceKey` 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) — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421, server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421
  • `changesFilterFrom` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:144
  • `query` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:63, server/src/main/scala/kpn/server/repository/MetricsRepository.scala:63
  • `lastKnownValue` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. (×2) — backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:69, server/src/main/scala/kpn/server/repository/MetricsRepository.scala:69
  • `decode` 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) — backend/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17, server/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×30) — backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:10, backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:14, backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:18, …

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

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

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

M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

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

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

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

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.

P1 · CI/CD gates0.0 / 10Critical✓ 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.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P2 · Observability10.0 / 10Exemplary○ Nothing flagged

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

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

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add scalafix or scapegoat (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `frontend/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — frontend/package.json:29

What to do

  • Run what this repository's stack ships: scalafix or scapegoat — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `WebClient.builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — backend/src/main/java/kpn/DownloadTool.java:23, server/src/main/java/kpn/DownloadTool.java:23
  • `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×6) — backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala:22, backend/src/main/scala/kpn/server/config/UserService.scala:52, backend/src/main/scala/kpn/server/search/Geocoder.scala:25, …

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
R1 · Type Safety9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication4.5 / 10Weak✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 62 duplicated blocks under frontend/src/app/ have copies in at least two of the sibling directories analysis, explore, map, mapold, monitor, ol (+9 more sibling(s) not listed) — 32 of them are reported below, and 30 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 62 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 62 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 62 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/app/mapold/poi/poi.service.ts:14
  • 38 duplicated blocks under frontend/src/app/analysis/ have copies in at least two of the sibling directories changes, changeset, components, location, network, node (+3 more sibling(s) not listed) — 19 of them are reported below, and 19 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 38 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 38 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 38 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:17
  • 13 duplicated blocks under frontend/src/app/monitor/internal/route/ have copies in at least two of the sibling directories add, change, changes, components, delete, details (+5 more sibling(s) not listed) — 9 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/app/monitor/internal/route/delete/monitor-route-delete-page.service.ts:17
  • 12 duplicated blocks under frontend/src/app/monitor/internal/ have copies in at least two of the sibling directories changes, group, groups, route — 8 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/app/monitor/internal/group/components/monitor-group-description.component.ts:31
  • 6 duplicated blocks under frontend/src/app/analysis/location/internal/ have copies in at least two of the sibling directories changes, components, details, edit, facts, map (+3 more sibling(s) not listed) — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/app/analysis/location/internal/nodes/location-nodes-page.service.ts:17
  • 5 duplicated blocks under the repository root have copies in at least two of the sibling directories frontend, map — 1 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/proxy-vmarc.conf.mjs:1
  • frontend/src/app/mapold/poi/poi.service.ts:14 · frontend/src/app/shared/services/old-old-poi.service.ts:13 — the two spans are one implementation copied and then locally edited — 914 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/mapold/poi/poi.service.ts:14
  • frontend/src/app/monitor/internal/route/monitor-route-gap-builder.ts:1 · frontend/src/app/route/internal/components/structure/route-gap-builder.ts:1 — these 2 files are line-for-line copies of one another — 92 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — frontend/src/app/monitor/internal/route/monitor-route-gap-builder.ts:1
  • frontend/src/app/shared/kpn/filter/survey-date-filter.ts:10 · frontend/src/app/shared/kpn/filter/timestamp-filter.ts:9 — the two spans are one implementation copied and then locally edited — 553 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/shared/kpn/filter/survey-date-filter.ts:10
  • frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:17 · frontend/src/app/analysis/subset/internal/changes/subset-changes-page.service.ts:17 — the two spans are one implementation copied and then locally edited — 592 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:17
  • frontend/src/app/symbol/internal/symbol-parser.ts:128 · frontend/src/app/symbol/internal/symbol-parser.ts:205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/app/symbol/internal/symbol-parser.ts:128
  • frontend/src/app/mapold/layers/opendata-tile-layer.ts:24 · frontend/src/app/ol/layers/old-old-opendata-vector-tile-layer.ts:21 — the two spans are one implementation copied and then locally edited — 367 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/mapold/layers/opendata-tile-layer.ts:24
  • frontend/src/app/mapold/style/explore-style-survey.ts:78 · frontend/src/app/ol/style/survey-date-style.ts:12 — the two spans are one implementation copied and then locally edited — 309 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/mapold/style/explore-style-survey.ts:78
  • frontend/src/app/analysis/location/internal/nodes/location-nodes-page.service.ts:17 · frontend/src/app/analysis/location/internal/routes/location-routes-page.service.ts:17 — the two spans are one implementation copied and then locally edited — 562 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/analysis/location/internal/nodes/location-nodes-page.service.ts:17
  • frontend/src/app/analysis/node/internal/changes/node-changes-page.service.ts:1 · frontend/src/app/analysis/route/internal/changes/route-changes-page.service.ts:1 — these 2 files are line-for-line copies of one another — 73 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — frontend/src/app/analysis/node/internal/changes/node-changes-page.service.ts:1
  • frontend/src/app/planner/pdf/plan/pdf-strip-document.ts:10 · frontend/src/app/planner/pdf/plan/pdf-text-document.ts:11 — the two spans are one implementation copied and then locally edited — 544 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/planner/pdf/plan/pdf-strip-document.ts:10
  • frontend/src/app/status/internal/log-page.service.ts:1 · frontend/src/app/status/internal/replication-status-page.service.ts:1 · frontend/src/app/status/internal/system-status-page.service.ts:1 — these 3 files are line-for-line copies of one another — 68 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — frontend/src/app/status/internal/log-page.service.ts:1
  • frontend/src/app/analysis/changes/internal/changes-page.service.ts:17 · frontend/src/app/analysis/location/internal/changes/location-changes-page.service.ts:17 — the two spans are one implementation copied and then locally edited — 408 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/analysis/changes/internal/changes-page.service.ts:17
  • frontend/src/app/planner/pdf/plan/pdf-strip-document-model.ts:9 · frontend/src/app/planner/pdf/plan/pdf-text-document-model.ts:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — frontend/src/app/planner/pdf/plan/pdf-strip-document-model.ts:9
  • frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:25 · frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:156 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:25
  • frontend/src/app/analysis/location/internal/changes/location-changes-page.service.ts:46 · frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:45 · frontend/src/app/analysis/subset/internal/changes/subset-changes-page.service.ts:45 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/analysis/location/internal/changes/location-changes-page.service.ts:46
  • frontend/src/app/analysis/subset/internal/orphan-nodes/subset-orphan-nodes-page.service.ts:13 · frontend/src/app/analysis/subset/internal/orphan-routes/subset-orphan-routes-page.service.ts:13 — the two spans are one implementation copied and then locally edited — 353 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/analysis/subset/internal/orphan-nodes/subset-orphan-nodes-page.service.ts:13
  • frontend/src/app/analysis/network/internal/nodes/components/network-node-filter.ts:88 · frontend/src/app/analysis/network/internal/routes/components/network-route-filter.ts:60 — the two spans are one implementation copied and then locally edited — 433 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/app/analysis/network/internal/nodes/components/network-node-filter.ts:88
  • frontend/src/app/monitor/internal/group/components/monitor-group-description.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — frontend/src/app/monitor/internal/group/components/monitor-group-description.component.ts:31
  • frontend/src/app/analysis/location/internal/facts/components/location-facts.component.ts:71 · frontend/src/app/analysis/network/internal/facts/components/network-facts.component.ts:110 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/analysis/location/internal/facts/components/location-facts.component.ts:71
  • frontend/src/app/shared/services/old-old-poi-preferences.ts:35 · frontend/src/app/state/poi/poi-preferences.ts:4 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — frontend/src/app/shared/services/old-old-poi-preferences.ts:35
  • frontend/src/app/analysis/components/edit/edit-step-builder.ts:36 · frontend/src/app/analysis/components/edit/edit-step-builder.ts:72 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/analysis/components/edit/edit-step-builder.ts:36
  • frontend/src/app/analysis/subset/internal/orphan-nodes/components/subset-orphan-node-list.component.ts:43 · frontend/src/app/analysis/subset/internal/orphan-routes/components/subset-orphan-route-list.component.ts:44 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/analysis/subset/internal/orphan-nodes/components/subset-orphan-node-list.component.ts:43
  • frontend/src/app/monitor/internal/route/monitor-route-gap.component.ts:27 · frontend/src/app/route/internal/components/structure/route-gap.component.ts:27 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — frontend/src/app/monitor/internal/route/monitor-route-gap.component.ts:27
  • frontend/src/app/status/internal/replication-status-page.component.ts:65 · frontend/src/app/status/internal/system-status-page.component.ts:80 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/status/internal/replication-status-page.component.ts:65
  • frontend/src/app/analysis/location/internal/nodes/components/location-node-list.component.ts:48 · frontend/src/app/analysis/location/internal/routes/components/location-route-list.component.ts:42 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/analysis/location/internal/nodes/components/location-node-list.component.ts:48
  • frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-name.component.ts:31 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31
  • frontend/src/app/planner/domain/commands/planner-command-move-via-route.ts:38 · frontend/src/app/planner/domain/commands/planner-command-split-leg.ts:38 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — frontend/src/app/planner/domain/commands/planner-command-move-via-route.ts:38
  • frontend/src/app/map/sources/route-source.ts:91 · frontend/src/app/map/sources/route-source.ts:118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/app/map/sources/route-source.ts:91
  • frontend/src/app/ol/layers/route-change-layers.ts:62 · frontend/src/app/ol/layers/route-change-layers.ts:108 · frontend/src/app/ol/layers/route-change-layers.ts:155 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/ol/layers/route-change-layers.ts:62
  • frontend/src/app/planner/domain/context/planner-test-setup.ts:63 · frontend/src/app/planner/domain/context/planner-test-setup.ts:96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/app/planner/domain/context/planner-test-setup.ts:63
  • frontend/src/app/symbol/internal/symbol-parser.ts:68 · frontend/src/app/symbol/internal/symbol-parser.ts:133 · frontend/src/app/symbol/internal/symbol-parser.ts:210 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/symbol/internal/symbol-parser.ts:68
  • frontend/src/app/analysis/components/action/action-button-network.component.ts:37 · frontend/src/app/analysis/components/action/action-button-node.component.ts:32 · frontend/src/app/analysis/components/action/action-button-relation.component.ts:35 · frontend/src/app/analysis/components/action/action-button-way.component.ts:32 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/app/analysis/components/action/action-button-network.component.ts:37
  • frontend/src/app/map/sources/route-source.ts:216 · frontend/src/app/map/sources/route-source.ts:242 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/map/sources/route-source.ts:216
  • frontend/src/app/monitor/internal/group/components/monitor-group-name.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-name.component.ts:31 — the 3 copies are spread across 3 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/monitor/internal/group/components/monitor-group-name.component.ts:31

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.9 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • frontend/src/theme.less:5 reaches into another package with a relative path (../node_modules/ng-zorro-antd/ng-zorro-antd.less) — import the package by name instead. — frontend/src/theme.less:5

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity9.8 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • ngOnInit has cyclomatic complexity 41 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/analysis/fact/components/fact-name.component.ts:17
  • handleDragEvent has cyclomatic complexity 28 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:147
  • handleUpEvent has cyclomatic complexity 20 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:278
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/map/sources/route-sources.ts:29
  • drawWay has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/shared/components/structure/draw-link.ts:52
  • handleMoveEvent has cyclomatic complexity 15 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:85
  • standardLayerVisible has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/map/sources/route-sources.ts:85
  • (anonymous) has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/explore/explore-page.component.ts:164
  • parseForeground has cyclomatic complexity 13 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/symbol/internal/symbol-parser.ts:128
  • parseForeground2 has cyclomatic complexity 13 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/symbol/internal/symbol-parser.ts:205
  • parseBackground has cyclomatic complexity 13 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/symbol/internal/symbol-parser.ts:48
  • nodeStyle has cyclomatic complexity 13 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/ol/style/network-map-style.ts:35
  • style has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/mapold/style/explore-style-standard.ts:70
  • drawGrid has cyclomatic complexity 12 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/planner/pdf/plan/pdf-document.ts:39
  • largeNodeStyle has cyclomatic complexity 12 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — frontend/src/app/mapold/style/explore-style-survey.ts:95, frontend/src/app/ol/style/survey-date-style.ts:29
  • (anonymous) has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/monitor/internal/monitor-websocket.service.ts:62
  • handleSingleClickEvent has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:370
  • segmentsModeStyle has cyclomatic complexity 11 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/mapold/style/monitor-layer-style.ts:80
  • constructor has cyclomatic complexity 11 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/shared/core/preferences/preferences.service.ts:13
  • equalPopupState has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/app/mapold/popup/map-route-popup-handler.ts:95
R3 · Large Files9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • frontend/src/app/planner/domain/interaction/planner-engine-impl.ts has 628 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:1
  • frontend/src/app/symbol/internal/symbol-shape.ts has 511 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/symbol/internal/symbol-shape.ts:1
  • frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage1.0 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:1, frontend/src/app/shared/services/api.service.ts:1, frontend/src/app/map/sources/route-source.ts:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness6.7 / 10Adequate✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

  • 33 outdated package(s); JS/npm CVEs scored in D30
R6 · Tooling6.7 / 10Adequate✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add `tsc --noEmit` as package.json scripts and run them in CI.
R7 · Dead Code8.1 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 6 application, 19 tooling and 35 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/monitor/internal/route/details/monitor-route-structure.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/monitor/internal/route/details/monitor-route-structure-row.component.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×29) — frontend/src/app/ol/layers/route-layers.ts, frontend/src/app/analysis/changeset/internal/components/change-set-location-tree-node.component.ts, frontend/src/app/mapold/old-map.component.ts, …
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/ol/layers/network-nodes-vector-tile-layer.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/ol/style/network-map-style.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/planner/pages/planner/popup/planner-popup-contents.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×3) — frontend/src/app/planner/pages/planner/popup/planner-popup-node.component.ts, frontend/src/app/planner/pages/planner/popup/planner-popup-poi.component.ts, frontend/src/app/planner/pages/planner/popup/planner-popup-route.component.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/shared/base/pages/home/home-page.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/shared/components/icon/icon-button.component.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/mapold/old-map.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/mapold/popup/map-route-popup.component.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (frontend/src/app/analysis/node/internal/changes/components/node-changes-sidebar.component.ts, frontend/src/app/analysis/subset/internal/orphan-routes/components/subset-orphan-routes-sidebar.component.ts, frontend/src/app/shared/base/base-sidebar.component.ts and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/shared/components/sidebar/sidebar.component.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/route/internal/components/route-paths.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/route/internal/components/route-path.component.ts
  • no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/planner/pages/planner/popup/planner-popup.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — frontend/src/app/planner/pages/planner/popup/planner-popup-contents.component.ts

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×4) — frontend/eslint.config.js:2, frontend/src/app/map/map.service.ts:17, frontend/src/app/analysis/components/edit/edit-step-builder.ts:4, …
  • Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×8) — frontend/package.json:65, frontend/package.json:66, frontend/package.json:70, …

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports4.3 / 10Weak✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • frontend/src/app/mapold/layers/layers.ts → frontend/src/app/mapold/layers/monitor-layer.ts → frontend/src/app/mapold/layers/layers.ts (one verified cycle inside a mutually-dependent group of 5 files) — frontend/src/app/mapold/layers/layers.ts:4
  • frontend/src/app/ol/style/node-style-builder.ts → frontend/src/app/ol/style/style-color.ts → frontend/src/app/ol/style/survey-date-style.ts → frontend/src/app/ol/style/node-style.ts → frontend/src/app/ol/style/node-style-builder.ts — frontend/src/app/ol/style/node-style-builder.ts:8
  • frontend/src/app/shared/core/shared/shared-state.service.ts → frontend/src/app/shared/services/api.service.ts → frontend/src/app/shared/spinner/spinner-interceptor.ts → frontend/src/app/shared/core/shared/shared-state.service.ts — frontend/src/app/shared/core/shared/shared-state.service.ts:4

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Read from this repository's Scala source and the Java beside it: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository builds on an HTTP-server library (backend/src/main/scala/kpn/server/api/authentication/AuthenticationController.scala:3 — `jakarta.servlet`) but serves no HTTP of its own: its production source starts no server (no `newServerAt`/`bindAndHandle`, server builder, `Server.serve`, `Http.serve`, tapir server interpreter or Netty HTTP pipeline), declares no application one runs (no Play application, servlet, cask `MainRoutes`, `HttpApp` or twitter-server), so it is a library whose server controls belong to the application that serves it — HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library.

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. (×4) — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteGeometryDigestAnalyzer.scala:16, backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:85, server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteGeometryDigestAnalyzer.scala:16, …

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 4 sites, not one: `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteGeometryDigestAnalyzer.scala:16` (DigestUtils.sha1Hex), `backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:85` (DigestUtils.md5Hex), `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteGeometryDigestAnalyzer.scala:16` (DigestUtils.sha1Hex), `server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:85` (DigestUtils.md5Hex). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X18 · Disposal-pattern correctness6.7 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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

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

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

X24 · Document value interpolated into markup unescaped7.6 / 10Strong✓ Tool-verified

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

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

  • `network.id` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:22
  • `network.name` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:54
  • `network.km` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:56

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • No build over this repository's 3117 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.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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

LensScoreRatingImpact
Code Health57.3Adequate — gated by D4, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture71.0Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity78.0StrongSolid.
Readiness16.8Critical — gated by R4, R8, P1, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security81.3Checked 4 of 9Solid.
Domain Modelling100.0ExemplaryStrongest area.
Accessibility42.0Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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.

  • C3 Audit Trail — Not assessed: this repository stores data through 'com.mongodb' (server/src/main/scala/kpn/server/sync/SyncTool.scala:3) but declares no persisted model this check reads (Slick table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'com.mongodb' (server/src/main/scala/kpn/server/sync/SyncTool.scala:3) but declares no persisted model this check reads (Slick table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'com.mongodb' (server/src/main/scala/kpn/server/sync/SyncTool.scala:3) but declares no persisted model this check reads (Slick table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
Not included — 58 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.

  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run serve` in frontend/) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> frontend@5.0.6 serve / > ng serve --proxy-config src/proxy-dev.conf.mjs / sh: 1: ng: not found" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — No tests discovered
  • D12 Dependency Hygiene — Dependency currency not established — repo.osgeo.org did not answer
  • 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.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 9 candidate(s) found and not reported.
  • 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"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.scala), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • 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.
  • 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 MEASURED: the JavaScript/TypeScript half could not be measured — frontend/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
  • DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
  • DM11 Constructible invalid state — no entities detected — construction-time invariants not assessable
  • DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
  • DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show 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 — no CI workflow found
  • 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
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a REDACTED, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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
  • 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
  • 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
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 165 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×80
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 55 more in this group — see findings.md.
AC2 · Forms & labels · <label> that labels no control · ×28
  • <label> that labels no control frontend/src/app/analysis/components/filter/filter-checkbox-group.component.ts:16 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/components/filter/filter-radio-group.component.ts:20 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/components/filter/location-filter-fact.ts:22 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/components/filter/location-filter-group.ts:20 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/edit/components/location-edit.component.ts:18 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/edit/components/location-edit.component.ts:28 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/edit/components/location-edit.component.ts:38 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/routes/components/location-routes-filter.component.ts:26 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/routes/components/location-routes-filter.component.ts:43 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/routes/components/location-routes-filter.component.ts:60 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/routes/components/location-routes-filter.component.ts:77 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/selection/components/location-mode.component.ts:18 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/selection/components/location-mode.component.ts:23 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/selection/components/location-tree.component.ts:45 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/location/internal/selection/components/location-tree.component.ts:46 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/overview/internal/overview/components/overview-options.component.ts:19 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/overview/internal/overview/components/overview-options.component.ts:31 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/overview/internal/overview/components/overview-options.component.ts:43 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/strategy/analysis-strategy.component.ts:18 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/analysis/strategy/analysis-strategy.component.ts:21 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/explore/condition/condition-group.component.ts:26 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/explore/condition/condition-group.component.ts:27 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-3-relation.component.ts:30 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-3-relation.component.ts:33 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-4-reference-type.component.ts:18 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • + 3 more in this group — see findings.md.
AC4 · Keyboard semantics · Click handler on a non-interactive <li> · ×17
  • Click handler on a non-interactive <li> frontend/src/app/analysis/components/action/action-menu-item.component.ts:10 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/explore/condition/condition-group.component.ts:36 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/explore/condition/condition-group.component.ts:40 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/monitor/internal/route/deviations/monitor-route-deviation-popup.component.ts:16 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/monitor/internal/route/deviations/monitor-route-deviation-popup.component.ts:23 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/ol/components/map-link-menu.component.ts:25 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/ol/components/map-link-menu.component.ts:26 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/ol/components/map-link-menu.component.ts:27 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/ol/components/map-link-menu.component.ts:28 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/ol/components/map-link-menu.component.ts:29 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/root/internal/toolbar/toolbar-route-type-menu-item.component.ts:14 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/shared/components/route/segments/route-segment-list-popup.component.ts:23 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/shared/components/route/segments/route-segment-popup.component.ts:16 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/shared/components/route/segments/route-segment-popup.component.ts:23 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/shared/components/route/segments/route-segment-relation-popup.component.ts:17 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/shared/components/route/segments/route-segment-relation-popup.component.ts:25 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <li> frontend/src/app/shared/components/route/segments/route-segment-relation-popup.component.ts:32 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D30 · Dependency Vulnerabilities · Critical CVE · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×6
  • <button> with no accessible text frontend/src/app/analysis/route/internal/components/route-page-header.component.ts:30 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/analysis/route/internal/components/route-page-header.component.ts:33 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/explore/condition/condition-group.component.ts:30 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/explore/condition/condition-group.component.ts:47 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/explore/condition/condition.component.ts:51 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/monitor/internal/route/deviations/monitor-route-deviation-list-item.component.ts:27 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels · <input> without a programmatic label · ×6
  • <input> without a programmatic label frontend/src/app/explore/condition/condition-location.component.ts:16 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label frontend/src/app/explore/condition/condition-name.component.ts:29 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label frontend/src/app/explore/condition/condition-tag.component.ts:21 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label frontend/src/app/explore/condition/condition-tag.component.ts:39 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label frontend/src/app/explore/explore-page.component.ts:44 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-5-reference-details.component.ts:85 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: overview-list-stat-table.component.ts ↔ subsets.ts frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts:1 — `frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts` (context analysis) and `frontend/src/app/shared/kpn/common/subsets.ts` (context shared) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3783a448` add Poland; `a486b860` improve tile layer logic (at that commit the file was still `frontend/src/app/analysis/overview/overview/components/overview-list-stat-table.component.ts`); `182d5980` #323 node networks in Denmark (at that commit the files were still `client/libs/analysis/src/lib/overview/overview/overview-list-stat-table.component.ts` and `client/libs/shared/src/lib/kpn/common/subsets.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: map.service.ts ↔ layers.ts frontend/src/app/map/map.service.ts:1 — `frontend/src/app/map/map.service.ts` (context map) and `frontend/src/app/mapold/layers/layers.ts` (context mapold) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `052ef29f` improve map - remove obsolete background layers; `ff0043ac` improve tile layer logic (at that commit the file was still `frontend/src/app/map/layers/layers.ts`); `ee11d91e` improve route layer styling (at that commit the file was still `frontend/src/app/map/layers/layers.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: layers.ts ↔ map-state.ts frontend/src/app/mapold/layers/layers.ts:1 — `frontend/src/app/mapold/layers/layers.ts` (context mapold) and `frontend/src/app/state/map-state.ts` (context state) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `df076324` refactor monitor - improve monitor state tiles (at that commit the file was still `frontend/src/app/map/layers/layers.ts`); `fe7fc16d` refactor monitor - show route in monitor map (at that commit the file was still `frontend/src/app/map/layers/layers.ts`); `c64703c3` improve tile layer logic (at that commit the file was still `frontend/src/app/map/layers/layers.ts`) — run `git show` on any of them.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×2
  • Click handler on a non-interactive <div> frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat.component.ts:15 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> frontend/src/app/shared/components/switch/switch.component.ts:12 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@maplibre/maplibre-gl-style-spec' · ×2
  • Unlisted import '@maplibre/maplibre-gl-style-spec' frontend/src/app/map/map.service.ts:17 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
  • Unlisted import '@maplibre/maplibre-gl-style-spec' map/src/app/maps/new-map.service.ts:4 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@eslint/js' · ×1
  • Unlisted import '@eslint/js' frontend/eslint.config.js:2 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'immutable' · ×1
  • Unlisted import 'immutable' frontend/src/app/analysis/components/edit/edit-step-builder.ts:4 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) frontend/src/app/mapold/layers/layers.ts:4 — frontend/src/app/mapold/layers/layers.ts → frontend/src/app/mapold/layers/monitor-layer.ts → frontend/src/app/mapold/layers/layers.ts (one verified cycle inside a mutually-dependent group of 5 files)
R9 · Circular Imports · Import cycle (4 files) · ×1
  • Import cycle (4 files) frontend/src/app/ol/style/node-style-builder.ts:8 — frontend/src/app/ol/style/node-style-builder.ts → frontend/src/app/ol/style/style-color.ts → frontend/src/app/ol/style/survey-date-style.ts → frontend/src/app/ol/style/node-style.ts → frontend/src/app/ol/style/node-style-builder.ts
R9 · Circular Imports · Import cycle (3 files) · ×1
  • Import cycle (3 files) frontend/src/app/shared/core/shared/shared-state.service.ts:4 — frontend/src/app/shared/core/shared/shared-state.service.ts → frontend/src/app/shared/services/api.service.ts → frontend/src/app/shared/spinner/spinner-interceptor.ts → frontend/src/app/shared/core/shared/shared-state.service.ts
Serious — 2916 finding(s)
D17 · Explicit Debt · TodoComment · ×295
  • TodoComment server/src/test/scala/kpn/server/monitor/route/update/MonitorUpdaterTest10_multi_gpx_add.scala:231 — // TODO redesign - this cannot be correct if distance is 181 — 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 backend/src/test/scala/kpn/server/monitor/route/update/MonitorUpdaterTest10_multi_gpx_add.scala:231 — // TODO redesign - this cannot be correct if distance is 181 — 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 server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:8 — // TODO these tests are ignored for now because they have a UTC versus local time problem — 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 backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:8 — // TODO these tests are ignored for now because they have a UTC versus local time problem — 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 server/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationFacadeTest.scala:64 — // TODO redesign - println("forwardPatch distance=" + forwardPath.segments.flatMap(_.fragments.map(_.meters)).sum) — 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 backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationFacadeTest.scala:64 — // TODO redesign - println("forwardPatch distance=" + forwardPath.segments.flatMap(_.fragments.map(_.meters)).sum) — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessorTest.scala:162 — // TODO redesign - review LostRouteTags handling — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessorTest.scala:162 — // TODO redesign - review LostRouteTags handling — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessorTest.scala:160 — // pendingRedesign() // TODO redesign - review LostRouteTags handling — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessorTest.scala:160 — // pendingRedesign() // TODO redesign - review LostRouteTags handling — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/integration/NetworkUpdateRouteTest04.scala:6 — // TODO CHANGE assert does not become an orphan or ignored route — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/integration/NetworkUpdateRouteTest04.scala:6 — // TODO CHANGE assert does not become an orphan or ignored route — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/integration/NetworkUpdateRouteTest04.scala:7 — // TODO CHANGE assert gets delete from the database ?? or better: do we keep for future reference as link from changeset histories ??? — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/integration/NetworkUpdateRouteTest04.scala:7 — // TODO CHANGE assert gets delete from the database ?? or better: do we keep for future reference as link from changeset histories ??? — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:85 — // TODO redesign - assertBaseNode1001() — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:85 — // TODO redesign - assertBaseNode1001() — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:86 — // TODO redesign - assertBaseNode1002() — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:86 — // TODO redesign - assertBaseNode1002() — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:104 — // TODO redesign - add detailed doc comparison? — 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 server/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:110 — // TODO redesign - add detailed doc comparison? — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:104 — // TODO redesign - add detailed doc comparison? — 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 backend/src/test/scala/kpn/server/analyzer/engine/changes/integration/RouteCreateTest01.scala:110 — // TODO redesign - add detailed doc comparison? — 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 server/src/test/scala/kpn/server/analyzer/engine/analysis/route/structure/test/Structure_05_SingleWayRoundaboutNotALoopTest.scala:39 — // TODO redesign - NOK — 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 backend/src/test/scala/kpn/server/analyzer/engine/analysis/route/structure/test/Structure_05_SingleWayRoundaboutNotALoopTest.scala:39 — // TODO redesign - NOK — 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 server/src/test/scala/kpn/server/analyzer/engine/analysis/route/structure/test/Structure_56_DoubleRoundaboutGapTest.scala:54 — // TODO should not be other? — 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.
  • + 270 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×133
  • Duplicated block (11 lines × 2) backend/api/src/main/scala/kpn/api/common/route/Link.scala:64 — backend/api/src/main/scala/kpn/api/common/route/Link.scala:64-74 | server/src/main/scala/kpn/api/common/route/Link.scala:64-74 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/route/Link.scala` and `server/src/main/scala/kpn/api/common/route/Link.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:24 — backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:24-34 | server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:24-34 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala` and `server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala:16 — backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala:16-26 | server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala:16-26 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala` and `server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.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 (11 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:27 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:27-37 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:27-37 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:18 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:18-28 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:18-28 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:94 — backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:94-104 | server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:94-104 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.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 (11 lines × 2) backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:20 — backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:20-30 | server/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:20-30 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.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 (11 lines × 2) backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:21 — backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:21-31 | server/src/main/scala/kpn/core/tools/support/RawDataTool.scala:21-31 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala` and `server/src/main/scala/kpn/core/tools/support/RawDataTool.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:26 — backend/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:26-36 | server/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:26-36 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/tile/TileViewTool.scala` and `server/src/main/scala/kpn/core/tools/tile/TileViewTool.scala` as WHOLE FILES: this scan already matched 3 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) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala:39 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala:39-49 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala:39-49 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:27 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:27-37 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:27-37 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:93 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:93-103 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:93-103 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:31 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:31-41 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:31-41 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:33 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:33-43 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:33-43 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala` as WHOLE FILES: this scan already matched 6 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 (11 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:384 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:384-394 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:384-394 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/base/MongoQuery.scala:13 — backend/src/main/scala/kpn/database/base/MongoQuery.scala:13-23 | server/src/main/scala/kpn/database/base/MongoQuery.scala:13-23 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/MongoQuery.scala` and `server/src/main/scala/kpn/database/base/MongoQuery.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/AnalyzerEngine.scala:47 — backend/src/main/scala/kpn/server/analyzer/engine/AnalyzerEngine.scala:47-57 | server/src/main/scala/kpn/server/analyzer/engine/AnalyzerEngine.scala:47-57 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/AnalyzerEngine.scala` and `server/src/main/scala/kpn/server/analyzer/engine/AnalyzerEngine.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreData.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreData.scala:19-29 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreData.scala:19-29 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreData.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreData.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/BulkNodeAnalyzer.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/BulkNodeAnalyzer.scala:33-43 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/BulkNodeAnalyzer.scala:33-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/BulkNodeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/BulkNodeAnalyzer.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala:12-22 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala:12-22 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala:21 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala:21-31 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala:21-31 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:87 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:87-97 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:87-97 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteMemberPoiAnalyzer.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteMemberPoiAnalyzer.scala:9-19 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteMemberPoiAnalyzer.scala:9-19 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteMemberPoiAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteMemberPoiAnalyzer.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:59 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:59-69 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:59-69 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.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 (11 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:21 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:21-31 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:21-31 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • + 108 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×130
  • Duplicated block (7 lines × 2) backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:63 — backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:63-69 | server/src/main/scala/kpn/core/replicate/UpdaterTool.scala:63-69 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala` and `server/src/main/scala/kpn/core/replicate/UpdaterTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:48 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:48-54 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:48-54 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:48` 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) backend/src/main/scala/kpn/core/tools/support/DownloadRelationTool.scala:28 — backend/src/main/scala/kpn/core/tools/support/DownloadRelationTool.scala:28-34 | server/src/main/scala/kpn/core/tools/support/DownloadRelationTool.scala:28-34 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/DownloadRelationTool.scala` and `server/src/main/scala/kpn/core/tools/support/DownloadRelationTool.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 (7 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala:25 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala:25-31 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala:25-31 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.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 (7 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:46 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:46-52 | server/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:46-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:46` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) backend/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala:31 — backend/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala:31-37 | server/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala:31-37 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala` and `server/src/main/scala/kpn/server/api/qr/QrCodeFacade.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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala:11 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala:11-17 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala:11-17 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.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 (7 lines × 2) backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:70 — backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:70-76 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:69-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala` and `server/src/main/scala/kpn/server/repository/ChangeSetRepository.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (7 lines × 2) backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:83 — backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:83-89 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:82-88 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala` and `server/src/main/scala/kpn/server/repository/ChangeSetRepository.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (7 lines × 2) backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:115 — backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:115-121 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:114-120 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala` and `server/src/main/scala/kpn/server/repository/ChangeSetRepository.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (7 lines × 2) backend/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala:33 — backend/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala:33-39 | server/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala:33-39 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala` and `server/src/main/scala/kpn/server/repository/NetworkInfoRepository.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. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (7 lines × 2) backend/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala:10 — backend/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala:10-16 | server/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala:10-16 — before extracting anything, compare `backend/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala` and `server/src/main/scala/kpn/core/history/NodeMovedAnalyzer.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 (7 lines × 2) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:21 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:21-27 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:21-27 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.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 (7 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:24 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:24-30 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:24-30 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.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 (7 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:270 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:270-276 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:270-276 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:21 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:21-27 | server/src/main/scala/kpn/api/custom/Timestamp.scala:16-22 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala` and `server/src/main/scala/kpn/api/custom/Timestamp.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:21` 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:157 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:157-163 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:157-163 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala` as WHOLE FILES: this scan already matched 10 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 (7 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:114 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:114-120 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:114-120 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 3 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 (7 lines × 2) backend/api/src/main/scala/kpn/api/common/changes/ChangeSet.scala:22 — backend/api/src/main/scala/kpn/api/common/changes/ChangeSet.scala:22-28 | server/src/main/scala/kpn/api/common/changes/ChangeSet.scala:22-28 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/changes/ChangeSet.scala` and `server/src/main/scala/kpn/api/common/changes/ChangeSet.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) backend/api/src/main/scala/kpn/api/common/data/raw/RawRelation.scala:16 — backend/api/src/main/scala/kpn/api/common/data/raw/RawRelation.scala:16-22 | server/src/main/scala/kpn/api/common/data/raw/RawRelation.scala:16-22 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/data/raw/RawRelation.scala` and `server/src/main/scala/kpn/api/common/data/raw/RawRelation.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) backend/api/src/main/scala/kpn/api/common/diff/NodeDataUpdate.scala:14 — backend/api/src/main/scala/kpn/api/common/diff/NodeDataUpdate.scala:14-20 | server/src/main/scala/kpn/api/common/diff/NodeDataUpdate.scala:14-20 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/diff/NodeDataUpdate.scala` and `server/src/main/scala/kpn/api/common/diff/NodeDataUpdate.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) backend/api/src/main/scala/kpn/api/common/diff/route/RouteNodeDiff.scala:12 — backend/api/src/main/scala/kpn/api/common/diff/route/RouteNodeDiff.scala:12-18 | server/src/main/scala/kpn/api/common/diff/route/RouteNodeDiff.scala:12-18 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/diff/route/RouteNodeDiff.scala` and `server/src/main/scala/kpn/api/common/diff/route/RouteNodeDiff.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) backend/api/src/main/scala/kpn/api/common/planner/LegBuildParams.scala:12 — backend/api/src/main/scala/kpn/api/common/planner/LegBuildParams.scala:12-18 | server/src/main/scala/kpn/api/common/planner/LegBuildParams.scala:12-18 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/planner/LegBuildParams.scala` and `server/src/main/scala/kpn/api/common/planner/LegBuildParams.scala` as WHOLE FILES: 83% 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) backend/api/src/main/scala/kpn/api/common/route/RouteNodes.scala:10 — backend/api/src/main/scala/kpn/api/common/route/RouteNodes.scala:10-16 | server/src/main/scala/kpn/api/common/route/RouteNodes.scala:10-16 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/route/RouteNodes.scala` and `server/src/main/scala/kpn/api/common/route/RouteNodes.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) backend/src/main/scala/kpn/core/poi/tags/TagContains.scala:7 — backend/src/main/scala/kpn/core/poi/tags/TagContains.scala:7-13 | server/src/main/scala/kpn/core/poi/tags/TagContains.scala:7-13 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/tags/TagContains.scala` and `server/src/main/scala/kpn/core/poi/tags/TagContains.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.
  • + 105 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×122
  • Duplicated block (9 lines × 2) backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala:8 — backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala:8-16 | server/src/main/scala/kpn/api/common/data/raw/RawData.scala:8-16 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala` and `server/src/main/scala/kpn/api/common/data/raw/RawData.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 `backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala:8` 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) backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala:57 — backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala:57-65 | server/src/main/scala/kpn/core/common/TimestampUtil.scala:60-68 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala` and `server/src/main/scala/kpn/core/common/TimestampUtil.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/poi/PoiLocation.scala:55 — backend/src/main/scala/kpn/core/poi/PoiLocation.scala:55-63 | server/src/main/scala/kpn/core/poi/PoiLocation.scala:55-63 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiLocation.scala` and `server/src/main/scala/kpn/core/poi/PoiLocation.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 (9 lines × 2) backend/src/main/scala/kpn/core/poi/PoiLocationGeoJson.scala:23 — backend/src/main/scala/kpn/core/poi/PoiLocationGeoJson.scala:23-31 | server/src/main/scala/kpn/core/poi/PoiLocationGeoJson.scala:23-31 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiLocationGeoJson.scala` and `server/src/main/scala/kpn/core/poi/PoiLocationGeoJson.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) backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:10 — backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:10-18 | server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:10-18 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` and `server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:14 — backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:14-22 | server/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:14-22 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala` and `server/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:36 — backend/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:36-44 | server/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:36-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala` and `server/src/main/scala/kpn/core/replicate/UpdaterToolOptions.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 `backend/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:36` 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) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:230 — backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:230-238 | server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:230-238 — before extracting anything, compare `backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala` and `server/src/main/scala/kpn/core/report/LinkImageBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:119 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:119-127 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:119-127 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala:26 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala:26-34 | server/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala:26-34 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderTool.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 (9 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala:43 — backend/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala:43-51 | server/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala:43-51 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:24 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:24-32 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:24-32 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/operation/Processes.scala:6 — backend/src/main/scala/kpn/core/tools/operation/Processes.scala:6-14 | server/src/main/scala/kpn/core/tools/operation/Processes.scala:6-14 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/Processes.scala` and `server/src/main/scala/kpn/core/tools/operation/Processes.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/tile/TileReportTool.scala:41 — backend/src/main/scala/kpn/core/tools/tile/TileReportTool.scala:41-49 | server/src/main/scala/kpn/core/tools/tile/TileReportTool.scala:41-49 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/tile/TileReportTool.scala` and `server/src/main/scala/kpn/core/tools/tile/TileReportTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala:12 — backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala:12-20 | server/src/main/scala/kpn/core/util/GeoJsonUtil.scala:12-20 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala` and `server/src/main/scala/kpn/core/util/GeoJsonUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala:9 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala:9-17 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala:9-17 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetCountsDemo.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala:32 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala:32-40 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala:32-40 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:443 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:443-451 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:443-451 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:85 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:85-93 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:85-93 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/DatabaseCollection.scala` and `server/src/main/scala/kpn/database/base/DatabaseCollection.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/index/Indexer.scala:18 — backend/src/main/scala/kpn/database/index/Indexer.scala:18-26 | server/src/main/scala/kpn/database/index/Indexer.scala:18-26 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/Indexer.scala` and `server/src/main/scala/kpn/database/index/Indexer.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeNameAnalyzer.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeNameAnalyzer.scala:9-17 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeNameAnalyzer.scala:9-17 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeNameAnalyzer.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 (9 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/WayTriplet.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/WayTriplet.scala:9-17 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/WayTriplet.scala:9-17 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/WayTriplet.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/WayTriplet.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 (9 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:37 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:37-45 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:37-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:64 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:64-72 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:64-72 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:67 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:67-75 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:67-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.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.
  • + 97 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×118
  • Duplicated block (8 lines × 2) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:21 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:21-28 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:21-28 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala` and `server/src/main/scala/kpn/core/analysis/TagInterpreter.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:81 — backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:81-88 | server/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:81-88 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala` and `server/src/main/scala/kpn/core/tools/location/GeometryImageWriter.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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:166 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:166-173 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:166-173 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 149 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala:12 — backend/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala:12-19 | server/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala:12-19 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.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 (8 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:116 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:116-123 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:116-123 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala:28 — backend/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala:28-35 | server/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala:28-35 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala` and `server/src/main/scala/kpn/core/tools/support/DownloadNodeTool.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 (8 lines × 2) backend/src/main/scala/kpn/core/util/End.scala:5 — backend/src/main/scala/kpn/core/util/End.scala:5-12 | server/src/main/scala/kpn/core/util/End.scala:5-12 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/End.scala` and `server/src/main/scala/kpn/core/util/End.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 (8 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:343 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:343-350 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:343-350 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:343` 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala:58-65 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala:58-65 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.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 (8 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.scala:51 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.scala:51-58 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.scala:51-58 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.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 (8 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:40-47 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:40-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala:17 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala:17-24 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala:17-24 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.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 (8 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaDirectionConverter.scala:7 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaDirectionConverter.scala:7-14 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaDirectionConverter.scala:7-14 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaDirectionConverter.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaDirectionConverter.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 (8 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala:27 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala:27-34 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala:27-34 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:169 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:169-176 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:169-176 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:45 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:45-52 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:45-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:41 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:41-48 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:40-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:41` 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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala:62 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala:62-69 | server/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala:62-69 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala:55 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala:55-62 | server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala:55-62 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:47 — backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:47-54 | server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:47-54 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala:11-18 | server/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala:11-18 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.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 (8 lines × 2) backend/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala:40 — backend/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala:40-47 | server/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala:40-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala` and `server/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.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 (8 lines × 2) backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:35 — backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:35-42 | server/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:35-42 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala` and `server/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:285 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:285-292 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:285-292 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:67 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:67-74 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:67-74 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
  • + 93 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×110
  • Duplicated block (10 lines × 2) backend/src/main/scala/kpn/core/tools/country/CountryBoundaryLoader.scala:17 — backend/src/main/scala/kpn/core/tools/country/CountryBoundaryLoader.scala:17-26 | server/src/main/scala/kpn/core/tools/country/CountryBoundaryLoader.scala:17-26 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/CountryBoundaryLoader.scala` and `server/src/main/scala/kpn/core/tools/country/CountryBoundaryLoader.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) backend/src/main/scala/kpn/core/tools/next/support/NextCollectRouteRelationIdsTool.scala:32 — backend/src/main/scala/kpn/core/tools/next/support/NextCollectRouteRelationIdsTool.scala:32-41 | server/src/main/scala/kpn/core/tools/next/support/NextCollectRouteRelationIdsTool.scala:32-41 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCollectRouteRelationIdsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCollectRouteRelationIdsTool.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) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:39 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:39-48 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:39-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:83 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:83-92 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:83-92 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:71 — backend/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:71-80 | server/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:71-80 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteDataTool.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 (10 lines × 2) backend/src/main/scala/kpn/core/tools/operation/Processes.scala:17 — backend/src/main/scala/kpn/core/tools/operation/Processes.scala:17-26 | server/src/main/scala/kpn/core/tools/operation/Processes.scala:17-26 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/Processes.scala` and `server/src/main/scala/kpn/core/tools/operation/Processes.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:24 — backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:24-33 | server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:24-33 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.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. 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) backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:43 — backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:43-52 | server/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:43-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala` and `server/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.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 (10 lines × 2) backend/src/main/scala/kpn/core/tools/support/FixChangesTool.scala:18 — backend/src/main/scala/kpn/core/tools/support/FixChangesTool.scala:18-27 | server/src/main/scala/kpn/core/tools/support/FixChangesTool.scala:18-27 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FixChangesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FixChangesTool.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) backend/src/main/scala/kpn/core/util/GeometryUtil.scala:23 — backend/src/main/scala/kpn/core/util/GeometryUtil.scala:23-32 | server/src/main/scala/kpn/core/util/GeometryUtil.scala:23-32 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/GeometryUtil.scala` and `server/src/main/scala/kpn/core/util/GeometryUtil.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 (10 lines × 2) backend/src/main/scala/kpn/core/util/Haversine.scala:38 — backend/src/main/scala/kpn/core/util/Haversine.scala:38-47 | server/src/main/scala/kpn/core/util/Haversine.scala:38-47 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/Haversine.scala` and `server/src/main/scala/kpn/core/util/Haversine.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/util/Haversine.scala:54 — backend/src/main/scala/kpn/core/util/Haversine.scala:54-63 | server/src/main/scala/kpn/core/util/Haversine.scala:54-63 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/Haversine.scala` and `server/src/main/scala/kpn/core/util/Haversine.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:36 — backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:36-45 | server/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:36-45 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala` and `server/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:38 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:38-47 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:38-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeChanges.scala:33 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeChanges.scala:33-42 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeChanges.scala:33-42 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeChanges.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeChanges.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala:30 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala:30-39 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala:30-39 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala:79 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala:79-88 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala:79-88 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala:58-67 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala:58-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkLastUpdatedAnalyzer.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkLastUpdatedAnalyzer.scala:12-21 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkLastUpdatedAnalyzer.scala:12-21 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkLastUpdatedAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkLastUpdatedAnalyzer.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 (10 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeTileAnalyzer.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeTileAnalyzer.scala:12-21 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeTileAnalyzer.scala:12-21 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeTileAnalyzer.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 (10 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:212 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:212-221 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:212-221 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala:13 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala:13-22 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala:13-22 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.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 (10 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:530 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:530-539 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:530-539 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileUpdater.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileUpdater.scala:16-25 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileUpdater.scala:16-25 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileUpdater.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 (10 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:32 — backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:32-41 | server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:32-41 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
  • + 85 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×95
  • Duplicated block (12 lines × 2) backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:12 — backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:12-23 | server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:12-23 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala` and `server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.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 (12 lines × 2) backend/src/main/scala/kpn/core/tools/location/FindParcDuVercorsPartialCommunes.scala:12 — backend/src/main/scala/kpn/core/tools/location/FindParcDuVercorsPartialCommunes.scala:12-23 | server/src/main/scala/kpn/core/tools/location/FindParcDuVercorsPartialCommunes.scala:12-23 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FindParcDuVercorsPartialCommunes.scala` and `server/src/main/scala/kpn/core/tools/location/FindParcDuVercorsPartialCommunes.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 (12 lines × 2) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:69 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:69-80 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:69-80 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala:37 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala:37-48 | server/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala:37-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderTool.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderTool.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 (12 lines × 2) backend/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala:26 — backend/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala:26-37 | server/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala:26-37 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala` and `server/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/monitor/MonitorRouteGpxReader.scala:24 — backend/src/main/scala/kpn/core/tools/monitor/MonitorRouteGpxReader.scala:24-35 | server/src/main/scala/kpn/core/tools/monitor/MonitorRouteGpxReader.scala:24-35 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/MonitorRouteGpxReader.scala` and `server/src/main/scala/kpn/core/tools/monitor/MonitorRouteGpxReader.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 (12 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:21 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:21-32 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:21-32 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:35 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:35-46 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:35-46 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:60 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:60-71 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:60-71 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala:35 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala:35-46 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala:35-46 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala:42 — backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala:42-53 | server/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala:42-53 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.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 (12 lines × 2) backend/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala:64 — backend/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala:64-75 | server/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala:64-75 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala` and `server/src/main/scala/kpn/core/tools/support/ImageGenerationTool.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 (12 lines × 2) backend/src/main/scala/kpn/core/tools/support/Stop.scala:43 — backend/src/main/scala/kpn/core/tools/support/Stop.scala:43-54 | server/src/main/scala/kpn/core/tools/support/Stop.scala:43-54 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/Stop.scala` and `server/src/main/scala/kpn/core/tools/support/Stop.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/support/Stop.scala:57 — backend/src/main/scala/kpn/core/tools/support/Stop.scala:57-68 | server/src/main/scala/kpn/core/tools/support/Stop.scala:57-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/Stop.scala` and `server/src/main/scala/kpn/core/tools/support/Stop.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/tile/TileTool.scala:72 — backend/src/main/scala/kpn/core/tools/tile/TileTool.scala:72-83 | server/src/main/scala/kpn/core/tools/tile/TileTool.scala:72-83 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/tile/TileTool.scala` and `server/src/main/scala/kpn/core/tools/tile/TileTool.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:97 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:97-108 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:97-108 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:107 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:107-118 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:107-118 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:356 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:356-367 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:356-367 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:370 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:370-381 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:370-381 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala:29 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala:29-40 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala:29-40 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.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 (12 lines × 2) backend/src/main/scala/kpn/database/actions/routes/SearchQueryPostProcessor.scala:37 — backend/src/main/scala/kpn/database/actions/routes/SearchQueryPostProcessor.scala:37-48 | server/src/main/scala/kpn/database/actions/routes/SearchQueryPostProcessor.scala:37-48 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/SearchQueryPostProcessor.scala` and `server/src/main/scala/kpn/database/actions/routes/SearchQueryPostProcessor.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 (12 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:77 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:77-88 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:77-88 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:6 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:6-17 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:6-17 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:14-25 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:14-25 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:45 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:45-56 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:45-56 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • + 70 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×85
  • Duplicated block (6 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:270 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:270-275 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:270-275 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala:30 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala:30-35 | server/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala:30-35 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.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 (6 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:25-30 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:25-30 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:102 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:102-107 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:102-107 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/builders/WayLineUtil.scala:13 — backend/src/main/scala/kpn/core/builders/WayLineUtil.scala:13-18 | server/src/main/scala/kpn/api/common/route/WayLine.scala:12-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:16 — backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:16-21 | server/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:16-21 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala` and `server/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:64 — backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:64-69 | server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:64-69 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.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. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala:47 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala:47-52 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala:47-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.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 (6 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:41 — backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:41-46 | server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:41-46 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:49 — backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:49-54 | server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:49-54 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:131 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:131-136 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:131-136 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/api/src/main/scala/kpn/api/common/common/TrackPath.scala:12 — backend/api/src/main/scala/kpn/api/common/common/TrackPath.scala:12-17 | server/src/main/scala/kpn/api/common/common/TrackPath.scala:12-17 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/common/TrackPath.scala` and `server/src/main/scala/kpn/api/common/common/TrackPath.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 (6 lines × 2) backend/api/src/main/scala/kpn/api/common/data/Member.scala:36 — backend/api/src/main/scala/kpn/api/common/data/Member.scala:36-41 | server/src/main/scala/kpn/api/common/data/Member.scala:36-41 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/data/Member.scala` and `server/src/main/scala/kpn/api/common/data/Member.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:70 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:70-75 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:70-75 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala` and `server/src/main/scala/kpn/core/analysis/TagInterpreter.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:148 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:148-153 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:148-153 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala` and `server/src/main/scala/kpn/core/analysis/TagInterpreter.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) backend/src/main/scala/kpn/core/builders/WayLineUtil.scala:20 — backend/src/main/scala/kpn/core/builders/WayLineUtil.scala:20-25 | server/src/main/scala/kpn/api/common/route/WayLine.scala:19-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) backend/src/main/scala/kpn/core/common/TimestampLocal.scala:57 — backend/src/main/scala/kpn/core/common/TimestampLocal.scala:57-62 | server/src/main/scala/kpn/core/common/TimestampLocal.scala:57-62 — before extracting anything, compare `backend/src/main/scala/kpn/core/common/TimestampLocal.scala` and `server/src/main/scala/kpn/core/common/TimestampLocal.scala` as WHOLE FILES: this scan already matched 6 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 (6 lines × 2) backend/src/main/scala/kpn/core/common/TimestampLocal.scala:109 — backend/src/main/scala/kpn/core/common/TimestampLocal.scala:109-114 | server/src/main/scala/kpn/core/common/TimestampLocal.scala:109-114 — before extracting anything, compare `backend/src/main/scala/kpn/core/common/TimestampLocal.scala` and `server/src/main/scala/kpn/core/common/TimestampLocal.scala` as WHOLE FILES: this scan already matched 6 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 (6 lines × 2) backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:77 — backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:77-82 | server/src/main/scala/kpn/core/files/FtpFileSystem.scala:77-82 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/FtpFileSystem.scala` and `server/src/main/scala/kpn/core/files/FtpFileSystem.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:84 — backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:84-89 | server/src/main/scala/kpn/core/files/FtpFileSystem.scala:84-89 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/FtpFileSystem.scala` and `server/src/main/scala/kpn/core/files/FtpFileSystem.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:121 — backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:121-126 | server/src/main/scala/kpn/core/files/FtpFileSystem.scala:121-126 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/FtpFileSystem.scala` and `server/src/main/scala/kpn/core/files/FtpFileSystem.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/gpx/GpxRoute.scala:48 — backend/src/main/scala/kpn/core/gpx/GpxRoute.scala:48-53 | server/src/main/scala/kpn/core/gpx/GpxRoute.scala:48-53 — before extracting anything, compare `backend/src/main/scala/kpn/core/gpx/GpxRoute.scala` and `server/src/main/scala/kpn/core/gpx/GpxRoute.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 (6 lines × 2) backend/src/main/scala/kpn/core/loadOld/Parser.scala:31 — backend/src/main/scala/kpn/core/loadOld/Parser.scala:31-36 | server/src/main/scala/kpn/core/loadOld/Parser.scala:31-36 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/Parser.scala` and `server/src/main/scala/kpn/core/loadOld/Parser.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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) backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:27 — backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:27-32 | server/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:27-32 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala` and `server/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:5 — backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:5-10 | server/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:5-10 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala` and `server/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 60 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×84
  • Duplicated block (13 lines × 2) backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala:70 — backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala:70-82 | server/src/main/scala/kpn/api/common/planner/LegEnd.scala:70-82 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala` and `server/src/main/scala/kpn/api/common/planner/LegEnd.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/common/TimestampLocal.scala:17 — backend/src/main/scala/kpn/core/common/TimestampLocal.scala:17-29 | server/src/main/scala/kpn/core/common/TimestampLocal.scala:17-29 — before extracting anything, compare `backend/src/main/scala/kpn/core/common/TimestampLocal.scala` and `server/src/main/scala/kpn/core/common/TimestampLocal.scala` as WHOLE FILES: this scan already matched 6 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 (13 lines × 2) backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:92 — backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:92-104 | server/src/main/scala/kpn/core/files/FtpFileSystem.scala:92-104 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/FtpFileSystem.scala` and `server/src/main/scala/kpn/core/files/FtpFileSystem.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:107 — backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:107-119 | server/src/main/scala/kpn/core/files/FtpFileSystem.scala:107-119 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/FtpFileSystem.scala` and `server/src/main/scala/kpn/core/files/FtpFileSystem.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:111 — backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:111-123 | server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:111-123 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` and `server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala:18 — backend/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala:18-30 | server/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala:18-30 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala` and `server/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.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) backend/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala:33 — backend/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala:33-45 | server/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala:33-45 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.scala` and `server/src/main/scala/kpn/core/tools/location/LocationGeometryExplorationTool.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.
  • Duplicated block (13 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateSymbolsTool.scala:48 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateSymbolsTool.scala:48-60 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateSymbolsTool.scala:48-60 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateSymbolsTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateSymbolsTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/status/StatusRepository.scala:32 — backend/src/main/scala/kpn/core/tools/status/StatusRepository.scala:32-44 | server/src/main/scala/kpn/core/tools/status/StatusRepository.scala:32-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/status/StatusRepository.scala` and `server/src/main/scala/kpn/core/tools/status/StatusRepository.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 (13 lines × 2) backend/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:39 — backend/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:39-51 | server/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:39-51 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/tile/TileViewTool.scala` and `server/src/main/scala/kpn/core/tools/tile/TileViewTool.scala` as WHOLE FILES: this scan already matched 3 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 (13 lines × 2) backend/src/main/scala/kpn/core/util/NaturalSorting.scala:30 — backend/src/main/scala/kpn/core/util/NaturalSorting.scala:30-42 | server/src/main/scala/kpn/core/util/NaturalSorting.scala:30-42 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/NaturalSorting.scala` and `server/src/main/scala/kpn/core/util/NaturalSorting.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 (13 lines × 2) backend/src/main/scala/kpn/core/util/Unique.scala:33 — backend/src/main/scala/kpn/core/util/Unique.scala:33-45 | server/src/main/scala/kpn/core/util/Unique.scala:33-45 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/Unique.scala` and `server/src/main/scala/kpn/core/util/Unique.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 (13 lines × 2) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:28 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:28-40 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:28-40 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:85 — backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:85-97 | server/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:85-97 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala` and `server/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/networks/MongoQueryBaseNetworkIds.scala:20 — backend/src/main/scala/kpn/database/actions/networks/MongoQueryBaseNetworkIds.scala:20-32 | server/src/main/scala/kpn/database/actions/networks/MongoQueryBaseNetworkIds.scala:20-32 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQueryBaseNetworkIds.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQueryBaseNetworkIds.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 (13 lines × 2) backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkIds.scala:20 — backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkIds.scala:20-32 | server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkIds.scala:20-32 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkIds.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkIds.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 (13 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryBaseNodeIds.scala:20 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryBaseNodeIds.scala:20-32 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryBaseNodeIds.scala:20-32 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryBaseNodeIds.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryBaseNodeIds.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 (13 lines × 2) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:183 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:183-195 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:183-195 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/DatabaseCollection.scala` and `server/src/main/scala/kpn/database/base/DatabaseCollection.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `WithId` names `kpn.api.id.WithId` in one and `kpn.core.doc.WithId` 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 (13 lines × 2) backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:60 — backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:60-72 | server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:60-72 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` and `server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/monitor/AppMonitor.scala:75 — backend/src/main/scala/kpn/monitor/AppMonitor.scala:75-87 | server/src/main/scala/kpn/monitor/AppMonitor.scala:75-87 — before extracting anything, compare `backend/src/main/scala/kpn/monitor/AppMonitor.scala` and `server/src/main/scala/kpn/monitor/AppMonitor.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (13 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala:25-37 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala:25-37 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.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 (13 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:50 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:50-62 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:50-62 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:33-45 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:33-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala:22 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala:22-34 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala:22-34 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.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 (13 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:259 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:259-271 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:259-271 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
  • + 59 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×75
  • Duplicated block (14 lines × 2) backend/api/src/main/scala/kpn/api/common/status/BarChart2D.scala:13 — backend/api/src/main/scala/kpn/api/common/status/BarChart2D.scala:13-26 | server/src/main/scala/kpn/api/common/status/BarChart2D.scala:13-26 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/status/BarChart2D.scala` and `server/src/main/scala/kpn/api/common/status/BarChart2D.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/api/src/main/scala/kpn/api/common/status/BarChart2D.scala:13` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) backend/base/src/main/scala/kpn/core/util/Util.scala:33 — backend/base/src/main/scala/kpn/core/util/Util.scala:33-46 | server/src/main/scala/kpn/core/util/Util.scala:35-48 — before extracting anything, compare `backend/base/src/main/scala/kpn/core/util/Util.scala` and `server/src/main/scala/kpn/core/util/Util.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:49 — backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:49-62 | server/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:49-62 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala` and `server/src/main/scala/kpn/core/loadOld/OsmXmlWriter.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 (14 lines × 2) backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:65 — backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:65-78 | server/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:65-78 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala` and `server/src/main/scala/kpn/core/loadOld/OsmXmlWriter.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 (14 lines × 2) backend/src/main/scala/kpn/core/replicate/VerifyZipFiles.scala:11 — backend/src/main/scala/kpn/core/replicate/VerifyZipFiles.scala:11-24 | server/src/main/scala/kpn/core/replicate/VerifyZipFiles.scala:11-24 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/VerifyZipFiles.scala` and `server/src/main/scala/kpn/core/replicate/VerifyZipFiles.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 (14 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala:63 — backend/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala:63-76 | server/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala:63-76 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/MonitorUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:35 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:35-48 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:35-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/operation/SystemStatus.scala:25 — backend/src/main/scala/kpn/core/tools/operation/SystemStatus.scala:25-38 | server/src/main/scala/kpn/core/tools/operation/SystemStatus.scala:25-38 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/SystemStatus.scala` and `server/src/main/scala/kpn/core/tools/operation/SystemStatus.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 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. Note first that the copies are not typed on the same thing: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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 (14 lines × 2) backend/src/main/scala/kpn/core/tools/support/LogoTool.scala:55 — backend/src/main/scala/kpn/core/tools/support/LogoTool.scala:55-68 | server/src/main/scala/kpn/core/tools/support/LogoTool.scala:55-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/LogoTool.scala` and `server/src/main/scala/kpn/core/tools/support/LogoTool.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 (14 lines × 2) backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala:60 — backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala:60-73 | server/src/main/scala/kpn/core/util/GeoJsonUtil.scala:60-73 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala` and `server/src/main/scala/kpn/core/util/GeoJsonUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:143 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:143-156 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:143-156 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:147 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:147-160 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:147-160 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.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 (14 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala:23 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala:23-36 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala:23-36 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.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 (14 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:159 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:159-172 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:159-172 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteRelationAnalyzer.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteRelationAnalyzer.scala:8-21 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteRelationAnalyzer.scala:8-21 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteRelationAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteRelationAnalyzer.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 (14 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:140 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:140-153 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:140-153 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:57 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:57-70 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:57-70 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:33-46 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:33-46 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateTileProcessor.scala:29 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateTileProcessor.scala:29-42 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateTileProcessor.scala:29-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateTileProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateTileProcessor.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 (14 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:17 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:17-30 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:17-30 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/context/WatchedRoutes.scala:121 — backend/src/main/scala/kpn/server/analyzer/engine/context/WatchedRoutes.scala:121-134 | server/src/main/scala/kpn/server/analyzer/engine/context/WatchedRoutes.scala:121-134 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/context/WatchedRoutes.scala` and `server/src/main/scala/kpn/server/analyzer/engine/context/WatchedRoutes.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorRouteLoader.scala:54 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorRouteLoader.scala:54-67 | server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorRouteLoader.scala:54-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorRouteLoader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorRouteLoader.scala` as WHOLE FILES: this scan already matched 3 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 (14 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:77 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:77-90 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:77-90 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:61 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:61-74 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:61-74 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:82 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:82-95 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:82-95 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
  • + 50 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×68
  • Duplicated block (19 lines × 2) backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:31 — backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:31-49 | server/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:31-49 — before extracting anything, compare `backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala` and `server/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:21 — backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:21-39 | server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:21-39 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` and `server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/country/RingWriter.scala:15 — backend/src/main/scala/kpn/core/tools/country/RingWriter.scala:15-33 | server/src/main/scala/kpn/core/tools/country/RingWriter.scala:15-33 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/RingWriter.scala` and `server/src/main/scala/kpn/core/tools/country/RingWriter.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 (19 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala:26 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala:26-44 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala:26-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.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 (19 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:160 — backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:160-178 | server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:160-178 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/RouteTagValuesTool.scala:19 — backend/src/main/scala/kpn/core/tools/next/support/RouteTagValuesTool.scala:19-37 | server/src/main/scala/kpn/core/tools/next/support/RouteTagValuesTool.scala:19-37 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteTagValuesTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteTagValuesTool.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 (19 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:57 — backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:57-75 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:57-75 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:57` 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 (19 lines × 2) backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:107 — backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:107-125 | server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:107-125 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.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 (19 lines × 2) backend/src/main/scala/kpn/core/tools/support/FactCheckTool.scala:45 — backend/src/main/scala/kpn/core/tools/support/FactCheckTool.scala:45-63 | server/src/main/scala/kpn/core/tools/support/FactCheckTool.scala:45-63 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FactCheckTool.scala` and `server/src/main/scala/kpn/core/tools/support/FactCheckTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:43 — backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:43-61 | server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:43-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.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. 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) backend/src/main/scala/kpn/core/tools/support/FindSpecialNodesTool.scala:44 — backend/src/main/scala/kpn/core/tools/support/FindSpecialNodesTool.scala:44-62 | server/src/main/scala/kpn/core/tools/support/FindSpecialNodesTool.scala:44-62 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindSpecialNodesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindSpecialNodesTool.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 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 (19 lines × 2) backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:52 — backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:52-70 | server/src/main/scala/kpn/core/tools/support/RawDataTool.scala:52-70 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala` and `server/src/main/scala/kpn/core/tools/support/RawDataTool.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:73 — backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:73-91 | server/src/main/scala/kpn/core/tools/support/RawDataTool.scala:73-91 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala` and `server/src/main/scala/kpn/core/tools/support/RawDataTool.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementRefs.scala:37 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementRefs.scala:37-55 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementRefs.scala:37-55 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementRefs.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementRefs.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 (19 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:30 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:30-48 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:30-48 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.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 (19 lines × 2) backend/src/main/scala/kpn/database/actions/pois/MongoQueryTilePois.scala:22 — backend/src/main/scala/kpn/database/actions/pois/MongoQueryTilePois.scala:22-40 | server/src/main/scala/kpn/database/actions/pois/MongoQueryTilePois.scala:22-40 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/pois/MongoQueryTilePois.scala` and `server/src/main/scala/kpn/database/actions/pois/MongoQueryTilePois.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 (19 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteInfo.scala:32 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteInfo.scala:32-50 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteInfo.scala:32-50 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteInfo.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteInfo.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 (19 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/FullAnalysisTrigger.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/FullAnalysisTrigger.scala:31-49 | server/src/main/scala/kpn/server/analyzer/engine/FullAnalysisTrigger.scala:31-49 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/FullAnalysisTrigger.scala` and `server/src/main/scala/kpn/server/analyzer/engine/FullAnalysisTrigger.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. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (19 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/ChangeSetInfoUpdater.scala:20 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/ChangeSetInfoUpdater.scala:20-38 | server/src/main/scala/kpn/server/analyzer/engine/analysis/ChangeSetInfoUpdater.scala:20-38 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/ChangeSetInfoUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/ChangeSetInfoUpdater.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 (19 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:126 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:126-144 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:126-144 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeNameAnalyzer.scala:48 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeNameAnalyzer.scala:48-66 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeNameAnalyzer.scala:48-66 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeNameAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala:37 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala:37-55 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala:37-55 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLocationAnalyzerImpl.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 (19 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:248 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:248-266 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:248-266 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:204 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:204-222 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:204-222 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NoteTagAnalyzer.scala:5 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NoteTagAnalyzer.scala:5-23 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NoteTagAnalyzer.scala:5-23 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NoteTagAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NoteTagAnalyzer.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.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×63
  • Duplicated block (17 lines × 2) backend/src/main/scala/kpn/core/data/DataBuilder.scala:45 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:45-61 | server/src/main/scala/kpn/core/data/DataBuilder.scala:45-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `server/src/main/scala/kpn/core/data/DataBuilder.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) backend/src/main/scala/kpn/core/loadOld/Parser.scala:39 — backend/src/main/scala/kpn/core/loadOld/Parser.scala:39-55 | server/src/main/scala/kpn/core/loadOld/Parser.scala:39-55 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/Parser.scala` and `server/src/main/scala/kpn/core/loadOld/Parser.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:41 — backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:41-57 | server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:41-57 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` and `server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:151 — backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:151-167 | server/src/main/scala/kpn/core/replicate/UpdaterTool.scala:151-167 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala` and `server/src/main/scala/kpn/core/replicate/UpdaterTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:169 — backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:169-185 | server/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:169-185 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala` and `server/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:41 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:41-57 | server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:41-57 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:42 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:42-58 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:42-58 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 149 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateTool.scala:28 — backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateTool.scala:28-44 | server/src/main/scala/kpn/core/tools/poi/PoiTileUpdateTool.scala:28-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiTileUpdateTool.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 (17 lines × 2) backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:48 — backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:48-64 | server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:48-64 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala` and `server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:34 — backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:34-50 | server/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:34-50 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:34` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_IntegrityCheckFailed.scala:32 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_IntegrityCheckFailed.scala:32-48 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_IntegrityCheckFailed.scala:32-48 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_IntegrityCheckFailed.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_IntegrityCheckFailed.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 (17 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:122 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:122-138 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:122-138 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:221 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:221-237 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:221-237 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/routes/SearchQueryBuilder.scala:31 — backend/src/main/scala/kpn/database/actions/routes/SearchQueryBuilder.scala:31-47 | server/src/main/scala/kpn/database/actions/routes/SearchQueryBuilder.scala:31-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/SearchQueryBuilder.scala` and `server/src/main/scala/kpn/database/actions/routes/SearchQueryBuilder.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala:11-27 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala:11-27 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerAbstract.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 (17 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala:97 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala:97-113 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala:97-113 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationServiceImpl.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:26 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:26-42 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:26-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkTypeAnalyzer.scala:17 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkTypeAnalyzer.scala:17-33 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkTypeAnalyzer.scala:17-33 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkTypeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkTypeAnalyzer.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 (17 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeIntegrityAnalyzer.scala:13 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeIntegrityAnalyzer.scala:13-29 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeIntegrityAnalyzer.scala:13-29 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeIntegrityAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeIntegrityAnalyzer.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 (17 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala:30 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala:30-46 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala:30-46 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:68 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:68-84 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:68-84 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:99 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:99-115 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:99-115 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:164 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:164-180 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:164-180 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:251 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:251-267 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:251-267 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:33-49 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:33-49 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala` as WHOLE FILES: this scan already matched 10 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.
  • + 38 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×62
  • Duplicated block (15 lines × 2) backend/api/src/main/scala/kpn/api/common/Bounds.scala:18 — backend/api/src/main/scala/kpn/api/common/Bounds.scala:18-32 | server/src/main/scala/kpn/api/common/Bounds.scala:18-32 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/Bounds.scala` and `server/src/main/scala/kpn/api/common/Bounds.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 (15 lines × 2) backend/api/src/main/scala/kpn/api/common/NetworkFacts.scala:20 — backend/api/src/main/scala/kpn/api/common/NetworkFacts.scala:20-34 | server/src/main/scala/kpn/api/common/NetworkFacts.scala:20-34 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/NetworkFacts.scala` and `server/src/main/scala/kpn/api/common/NetworkFacts.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 (15 lines × 2) backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:49 — backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:49-63 | server/src/main/scala/kpn/api/common/monitor/MonitorRouteRelation.scala:50-64 — before extracting anything, compare `backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala` and `server/src/main/scala/kpn/api/common/monitor/MonitorRouteRelation.scala` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:49` 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) backend/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.scala:48 — backend/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.scala:48-62 | server/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.scala:48-62 — before extracting anything, compare `backend/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.scala` and `server/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.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 (15 lines × 2) backend/src/main/scala/kpn/core/loadOld/Parser.scala:58 — backend/src/main/scala/kpn/core/loadOld/Parser.scala:58-72 | server/src/main/scala/kpn/core/loadOld/Parser.scala:58-72 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/Parser.scala` and `server/src/main/scala/kpn/core/loadOld/Parser.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/poi/PoiLoader.scala:21 — backend/src/main/scala/kpn/core/poi/PoiLoader.scala:21-35 | server/src/main/scala/kpn/core/poi/PoiLoader.scala:21-35 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiLoader.scala` and `server/src/main/scala/kpn/core/poi/PoiLoader.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 (15 lines × 2) backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:33 — backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:33-47 | server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:33-47 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` and `server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:25 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:25-39 | server/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:25-39 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.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 (15 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:57 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:57-71 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:57-71 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/support/FixChangesTool.scala:30 — backend/src/main/scala/kpn/core/tools/support/FixChangesTool.scala:30-44 | server/src/main/scala/kpn/core/tools/support/FixChangesTool.scala:30-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FixChangesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FixChangesTool.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 (15 lines × 2) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:35 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:35-49 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:35-49 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:35` 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryKnownNodeIds.scala:19 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryKnownNodeIds.scala:19-33 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryKnownNodeIds.scala:19-33 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryKnownNodeIds.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryKnownNodeIds.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 (15 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeIds.scala:20 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeIds.scala:20-34 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeIds.scala:20-34 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeIds.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeIds.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 (15 lines × 2) backend/src/main/scala/kpn/database/actions/pois/MongoQueryPoiElementIds.scala:20 — backend/src/main/scala/kpn/database/actions/pois/MongoQueryPoiElementIds.scala:20-34 | server/src/main/scala/kpn/database/actions/pois/MongoQueryPoiElementIds.scala:20-34 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/pois/MongoQueryPoiElementIds.scala` and `server/src/main/scala/kpn/database/actions/pois/MongoQueryPoiElementIds.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 (15 lines × 2) backend/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala:55 — backend/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala:55-69 | server/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala:55-69 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala` and `server/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.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 (15 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala:56 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala:56-70 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala:56-70 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala:51 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala:51-65 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala:51-65 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:268 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:268-282 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:268-282 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:82 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:82-96 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:82-96 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:51 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:51-65 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:51-65 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:51` 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 (15 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:86 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:86-100 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:86-100 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:74 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:74-88 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:73-87 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala:14-28 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala:14-28 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.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 (15 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala:28 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala:28-42 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala:28-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiKeyExportTool.scala:28 — backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiKeyExportTool.scala:28-42 | server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiKeyExportTool.scala:28-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiKeyExportTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiKeyExportTool.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.
  • + 37 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×61
  • Duplicated block (16 lines × 2) backend/api/src/main/scala/kpn/api/common/Bounds.scala:35 — backend/api/src/main/scala/kpn/api/common/Bounds.scala:35-50 | server/src/main/scala/kpn/core/util/Util.scala:79-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) backend/src/main/scala/kpn/core/files/FsUtils.scala:11 — backend/src/main/scala/kpn/core/files/FsUtils.scala:11-26 | server/src/main/scala/kpn/core/files/FsUtils.scala:11-26 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/FsUtils.scala` and `server/src/main/scala/kpn/core/files/FsUtils.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) backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:145 — backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:145-160 | server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:145-160 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala` and `server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:12 — backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:12-27 | server/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:12-27 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala` and `server/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.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) backend/src/main/scala/kpn/core/tools/backup/BackupToolOptions.scala:12 — backend/src/main/scala/kpn/core/tools/backup/BackupToolOptions.scala:12-27 | server/src/main/scala/kpn/core/tools/backup/BackupToolOptions.scala:12-27 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/backup/BackupToolOptions.scala` and `server/src/main/scala/kpn/core/tools/backup/BackupToolOptions.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) backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:107 — backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:107-122 | server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:107-122 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` and `server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:46 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:46-61 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:46-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorPerformanceAnalysisTool.scala:40 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorPerformanceAnalysisTool.scala:40-55 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorPerformanceAnalysisTool.scala:40-55 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorPerformanceAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorPerformanceAnalysisTool.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) backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:107 — backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:107-122 | server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:107-122 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:78 — backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:78-93 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:78-93 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/poi/PoiTileCleanTool.scala:32 — backend/src/main/scala/kpn/core/tools/poi/PoiTileCleanTool.scala:32-47 | server/src/main/scala/kpn/core/tools/poi/PoiTileCleanTool.scala:32-47 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiTileCleanTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiTileCleanTool.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) backend/src/main/scala/kpn/core/tools/support/FindNetworksThatBecameRoutesTool.scala:30 — backend/src/main/scala/kpn/core/tools/support/FindNetworksThatBecameRoutesTool.scala:30-45 | server/src/main/scala/kpn/core/tools/support/FindNetworksThatBecameRoutesTool.scala:30-45 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindNetworksThatBecameRoutesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindNetworksThatBecameRoutesTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala:70 — backend/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala:70-85 | server/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala:70-85 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.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 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) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala:26 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala:26-41 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala:26-41 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:203 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:203-218 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:203-218 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:9-24 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:9-24 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:35 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:35-50 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:35-50 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:88 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:88-103 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:88-103 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala:70 — backend/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala:70-85 | server/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala:70-85 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:56 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:56-71 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:56-71 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala` as WHOLE FILES: this scan already matched 10 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 (16 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:49 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:49-64 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:49-64 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:217 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:217-232 | server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:217-232 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala:43 — backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala:43-58 | server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala:43-58 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/tiles/raster/TileColorSurvey.scala:22 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/raster/TileColorSurvey.scala:22-37 | server/src/main/scala/kpn/server/analyzer/engine/tiles/raster/TileColorSurvey.scala:22-37 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/raster/TileColorSurvey.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/raster/TileColorSurvey.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) backend/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala:302 — backend/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala:302-317 | server/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala:302-317 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala` and `server/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
  • + 36 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×55
  • Duplicated block (20 lines × 2) backend/src/main/scala/kpn/core/loadOld/XmlFile.scala:12 — backend/src/main/scala/kpn/core/loadOld/XmlFile.scala:12-31 | server/src/main/scala/kpn/core/loadOld/XmlFile.scala:12-31 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/XmlFile.scala` and `server/src/main/scala/kpn/core/loadOld/XmlFile.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 (20 lines × 2) backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:42 — backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:42-61 | server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:42-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` and `server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:64 — backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:64-83 | server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:64-83 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` and `server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/replicate/ReplicationRequestExecutor.scala:48 — backend/src/main/scala/kpn/core/replicate/ReplicationRequestExecutor.scala:48-67 | server/src/main/scala/kpn/core/replicate/ReplicationRequestExecutor.scala:48-67 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/ReplicationRequestExecutor.scala` and `server/src/main/scala/kpn/core/replicate/ReplicationRequestExecutor.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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:44 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:44-63 | server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:44-63 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala:49 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala:49-68 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala:49-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteReportRoleUsageTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) backend/src/main/scala/kpn/core/tools/support/RouteColoursTool.scala:39 — backend/src/main/scala/kpn/core/tools/support/RouteColoursTool.scala:39-58 | server/src/main/scala/kpn/core/tools/support/RouteColoursTool.scala:39-58 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/RouteColoursTool.scala` and `server/src/main/scala/kpn/core/tools/support/RouteColoursTool.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 (20 lines × 2) backend/src/main/scala/kpn/core/util/ThreadExecutor.scala:21 — backend/src/main/scala/kpn/core/util/ThreadExecutor.scala:21-40 | server/src/main/scala/kpn/core/util/ThreadExecutor.scala:21-40 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/ThreadExecutor.scala` and `server/src/main/scala/kpn/core/util/ThreadExecutor.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) backend/src/main/scala/kpn/core/util/ThreadExecutor.scala:53 — backend/src/main/scala/kpn/core/util/ThreadExecutor.scala:53-72 | server/src/main/scala/kpn/core/util/ThreadExecutor.scala:53-72 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/ThreadExecutor.scala` and `server/src/main/scala/kpn/core/util/ThreadExecutor.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) backend/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkNodes.scala:33 — backend/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkNodes.scala:33-52 | server/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkNodes.scala:33-52 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkNodes.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkNodes.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) backend/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkRoutes.scala:34 — backend/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkRoutes.scala:34-53 | server/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkRoutes.scala:34-53 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkRoutes.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQueryNetworkRoutes.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) backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkDetailsPageData.scala:30 — backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkDetailsPageData.scala:30-49 | server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkDetailsPageData.scala:30-49 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkDetailsPageData.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkDetailsPageData.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) backend/src/main/scala/kpn/database/tools/DropCollections.scala:8 — backend/src/main/scala/kpn/database/tools/DropCollections.scala:8-27 | server/src/main/scala/kpn/database/tools/DropCollections.scala:8-27 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/DropCollections.scala` and `server/src/main/scala/kpn/database/tools/DropCollections.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 (20 lines × 2) backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:75 — backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:75-94 | server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:75-94 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` and `server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala:78 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala:78-97 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala:78-97 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationAnalyzerImpl.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeAnalyzer.scala:27 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeAnalyzer.scala:27-46 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeAnalyzer.scala:27-46 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeAnalyzer.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/NodeMainAnalyzer.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/NodeMainAnalyzer.scala:40-59 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/NodeMainAnalyzer.scala:40-59 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/NodeMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/NodeMainAnalyzer.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:84 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:84-103 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:84-103 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:466 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:466-485 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:466-485 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:36 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:36-55 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:36-55 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:144 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:144-163 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:144-163 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:217 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:217-236 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:217-236 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:19-38 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:19-38 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:110 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:110-129 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:110-129 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNameAnalysisReport.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNameAnalysisReport.scala:8-27 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNameAnalysisReport.scala:8-27 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNameAnalysisReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNameAnalysisReport.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.
  • + 30 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×50
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:83 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:83-87 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:83-87 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (5 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:47 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:47-51 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:47-51 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (5 lines × 2) backend/api/src/main/scala/kpn/api/common/diff/route/RouteRoleDiff.scala:5 — backend/api/src/main/scala/kpn/api/common/diff/route/RouteRoleDiff.scala:5-9 | server/src/main/scala/kpn/api/common/diff/route/RouteRoleDiff.scala:5-9 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/diff/route/RouteRoleDiff.scala` and `server/src/main/scala/kpn/api/common/diff/route/RouteRoleDiff.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 (5 lines × 2) backend/src/main/scala/kpn/core/tools/operation/ProcessLine.scala:5 — backend/src/main/scala/kpn/core/tools/operation/ProcessLine.scala:5-9 | server/src/main/scala/kpn/core/tools/operation/ProcessLine.scala:5-9 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/ProcessLine.scala` and `server/src/main/scala/kpn/core/tools/operation/ProcessLine.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 (5 lines × 2) backend/api/src/main/scala/kpn/api/common/common/ReferencedElements.scala:4 — backend/api/src/main/scala/kpn/api/common/common/ReferencedElements.scala:4-8 | server/src/main/scala/kpn/api/common/common/ReferencedElements.scala:4-8 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/common/ReferencedElements.scala` and `server/src/main/scala/kpn/api/common/common/ReferencedElements.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 (5 lines × 2) backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala:75 — backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala:75-79 | server/src/main/scala/kpn/core/common/TimestampUtil.scala:78-82 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala` and `server/src/main/scala/kpn/core/common/TimestampUtil.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:117 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:117-121 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:117-121 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala` and `server/src/main/scala/kpn/core/analysis/TagInterpreter.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:128 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:128-132 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:128-132 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala` and `server/src/main/scala/kpn/core/analysis/TagInterpreter.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/common/RelationUtil.scala:6 — backend/src/main/scala/kpn/core/common/RelationUtil.scala:6-10 | server/src/main/scala/kpn/core/common/RelationUtil.scala:6-10 — before extracting anything, compare `backend/src/main/scala/kpn/core/common/RelationUtil.scala` and `server/src/main/scala/kpn/core/common/RelationUtil.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 (5 lines × 2) backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:44 — backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:44-48 | server/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:44-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala` and `server/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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 (5 lines × 2) backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:190 — backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:190-194 | server/src/main/scala/kpn/core/replicate/UpdaterTool.scala:190-194 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala` and `server/src/main/scala/kpn/core/replicate/UpdaterTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala:35 — backend/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala:35-39 | server/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala:35-39 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala` and `server/src/main/scala/kpn/core/tools/country/PolygonBuilder.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:174 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:174-178 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:174-178 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:39 — backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:39-43 | server/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:39-43 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala` and `server/src/main/scala/kpn/core/tools/location/GeometryImageWriter.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 4 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:32 — backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:32-36 | server/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:32-36 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala` and `server/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala:7 — backend/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala:7-11 | server/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala:7-11 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.scala` and `server/src/main/scala/kpn/core/tools/location/NewLocationTreeBuilder.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala:52 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala:52-56 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala:52-56 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileTool.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:50 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:50-54 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:50-54 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/tools/operation/Processes.scala:33 — backend/src/main/scala/kpn/core/tools/operation/Processes.scala:33-37 | server/src/main/scala/kpn/core/tools/operation/Processes.scala:33-37 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/Processes.scala` and `server/src/main/scala/kpn/core/tools/operation/Processes.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/core/tools/support/CoordinateCodecTool.scala:6 — backend/src/main/scala/kpn/core/tools/support/CoordinateCodecTool.scala:6-10 | server/src/main/scala/kpn/core/tools/support/CoordinateCodecTool.scala:6-10 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/CoordinateCodecTool.scala` and `server/src/main/scala/kpn/core/tools/support/CoordinateCodecTool.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 (5 lines × 2) backend/src/main/scala/kpn/core/tools/support/FactCheckTool.scala:33 — backend/src/main/scala/kpn/core/tools/support/FactCheckTool.scala:33-37 | server/src/main/scala/kpn/core/tools/support/FactCheckTool.scala:33-37 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FactCheckTool.scala` and `server/src/main/scala/kpn/core/tools/support/FactCheckTool.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:64 — backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:64-68 | server/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:64-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala` and `server/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.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) backend/src/main/scala/kpn/database/base/MongoQuery.scala:54 — backend/src/main/scala/kpn/database/base/MongoQuery.scala:54-58 | server/src/main/scala/kpn/database/base/MongoQuery.scala:54-58 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/MongoQuery.scala` and `server/src/main/scala/kpn/database/base/MongoQuery.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:111 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:111-115 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:111-115 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala:40-44 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala:40-44 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameFromNodesAnalyzer.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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 25 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×48
  • Duplicated block (21 lines × 2) backend/src/main/scala/kpn/core/app/RouteRenderer.scala:36 — backend/src/main/scala/kpn/core/app/RouteRenderer.scala:36-56 | server/src/main/scala/kpn/core/app/RouteRenderer.scala:36-56 — before extracting anything, compare `backend/src/main/scala/kpn/core/app/RouteRenderer.scala` and `server/src/main/scala/kpn/core/app/RouteRenderer.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) backend/src/main/scala/kpn/core/loadOld/Parser.scala:75 — backend/src/main/scala/kpn/core/loadOld/Parser.scala:75-95 | server/src/main/scala/kpn/core/loadOld/Parser.scala:75-95 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/Parser.scala` and `server/src/main/scala/kpn/core/loadOld/Parser.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:96 — backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:96-116 | server/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:96-116 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala` and `server/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:152 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:152-172 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:152-172 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:61 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:61-81 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:61-81 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 149 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:55 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:55-75 | server/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:55-75 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala` as WHOLE FILES: this scan already matched 3 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 (21 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala:12 — backend/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala:12-32 | server/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala:12-32 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala` and `server/src/main/scala/kpn/core/tools/location/LocationImageWriter.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) backend/src/main/scala/kpn/core/tools/location/RelationPolygonBuilder.scala:16 — backend/src/main/scala/kpn/core/tools/location/RelationPolygonBuilder.scala:16-36 | server/src/main/scala/kpn/core/tools/location/RelationPolygonBuilder.scala:16-36 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/RelationPolygonBuilder.scala` and `server/src/main/scala/kpn/core/tools/location/RelationPolygonBuilder.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 (21 lines × 2) backend/src/main/scala/kpn/core/tools/support/ScriptTool.scala:28 — backend/src/main/scala/kpn/core/tools/support/ScriptTool.scala:28-48 | server/src/main/scala/kpn/core/tools/support/ScriptTool.scala:28-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/ScriptTool.scala` and `server/src/main/scala/kpn/core/tools/support/ScriptTool.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. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (21 lines × 2) backend/src/main/scala/kpn/database/actions/facts/MongoQueryNodesWithIntegrityCheckFailed.scala:34 — backend/src/main/scala/kpn/database/actions/facts/MongoQueryNodesWithIntegrityCheckFailed.scala:34-54 | server/src/main/scala/kpn/database/actions/facts/MongoQueryNodesWithIntegrityCheckFailed.scala:34-54 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQueryNodesWithIntegrityCheckFailed.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQueryNodesWithIntegrityCheckFailed.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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:180 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:180-200 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:180-200 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:30 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:30-50 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:30-50 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.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) backend/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPoiLayerCounts.scala:35 — backend/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPoiLayerCounts.scala:35-55 | server/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPoiLayerCounts.scala:35-55 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPoiLayerCounts.scala` and `server/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPoiLayerCounts.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) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:33 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:33-53 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:33-53 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:488 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:488-508 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:488-508 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:572 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:572-592 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:572-592 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:632 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:632-652 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:632-652 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala:51 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala:51-71 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala:51-71 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/BreakPointAnalysis.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:93 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:93-113 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:93-113 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:81 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:81-101 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:81-101 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:55 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:55-75 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:55-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:45 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:45-65 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:45-65 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:126 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:126-146 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:125-145 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala:58-78 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala:58-78 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/LineSimplifier.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/LineSimplifier.scala:33-53 | server/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/LineSimplifier.scala:33-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/LineSimplifier.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/LineSimplifier.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.
  • + 23 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×40
  • Duplicated block (22 lines × 2) backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala:21 — backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala:21-42 | server/src/main/scala/kpn/core/common/TimestampUtil.scala:24-45 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/time/TimestampUtil.scala` and `server/src/main/scala/kpn/core/common/TimestampUtil.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:31 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:31-52 | server/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:31-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala` as WHOLE FILES: this scan already matched 3 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 (22 lines × 2) backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:116 — backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:116-137 | server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:116-137 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala` and `server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/support/IsNoteTagStillUsedForRouteNameTool.scala:18 — backend/src/main/scala/kpn/core/tools/support/IsNoteTagStillUsedForRouteNameTool.scala:18-39 | server/src/main/scala/kpn/core/tools/support/IsNoteTagStillUsedForRouteNameTool.scala:18-39 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/IsNoteTagStillUsedForRouteNameTool.scala` and `server/src/main/scala/kpn/core/tools/support/IsNoteTagStillUsedForRouteNameTool.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 (22 lines × 2) backend/src/main/scala/kpn/core/util/ZipFile.scala:18 — backend/src/main/scala/kpn/core/util/ZipFile.scala:18-39 | server/src/main/scala/kpn/core/util/ZipFile.scala:18-39 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/ZipFile.scala` and `server/src/main/scala/kpn/core/util/ZipFile.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 (22 lines × 2) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala:45 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala:45-66 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala:45-66 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSet.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:61 — backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:61-82 | server/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala:61-82 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala` and `server/src/main/scala/kpn/database/actions/graph/MongoQueryGraphEdges.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:97 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:97-118 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:97-118 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseRouteReferences.scala:35 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseRouteReferences.scala:35-56 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseRouteReferences.scala:35-56 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseRouteReferences.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseRouteReferences.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 (22 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala:74 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala:74-95 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala:74-95 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:97 — backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:97-118 | server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:97-118 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` and `server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:106 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:106-127 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:106-127 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:154 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:154-175 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:154-175 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSummaryReport.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSummaryReport.scala:8-29 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSummaryReport.scala:8-29 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSummaryReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSummaryReport.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 (22 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:185 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:185-206 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:185-206 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:55 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:55-76 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:55-76 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:127 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:127-148 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:127-148 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:226 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:226-247 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:226-247 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:251 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:251-272 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:251-272 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:97 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:97-118 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:97-118 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDeviationsPageBuilder.scala:52 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDeviationsPageBuilder.scala:52-73 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteDeviationsPageBuilder.scala:52-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDeviationsPageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteDeviationsPageBuilder.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 (22 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:67 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:67-88 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:68-89 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteReader.scala:22 — backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteReader.scala:22-43 | server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteReader.scala:22-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteReader.scala` and `server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteReader.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 (22 lines × 2) backend/src/main/scala/kpn/tools/code/CodecProviderWriter.scala:51 — backend/src/main/scala/kpn/tools/code/CodecProviderWriter.scala:51-72 | server/src/main/scala/kpn/tools/code/CodecProviderWriter.scala:51-72 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/CodecProviderWriter.scala` and `server/src/main/scala/kpn/tools/code/CodecProviderWriter.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/tools/code/codecs/TagCodec.scala:16 — backend/src/main/scala/kpn/tools/code/codecs/TagCodec.scala:16-37 | server/src/main/scala/kpn/tools/code/codecs/TagCodec.scala:16-37 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/codecs/TagCodec.scala` and `server/src/main/scala/kpn/tools/code/codecs/TagCodec.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.
  • + 15 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/shared/services/api.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/map/sources/route-source.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/monitor/internal/route/components/monitor-route-form.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/shared/components/structure/draw-link.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/monitor/internal/route/change/monitor-route-change-page.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/monitor/internal/route/details/monitor-route-structure-row.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/shared/components/poi/poi-analysis.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/monitor/internal/monitor.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/mapold/old-map.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/map/map.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/state/map-state.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/ol/layers/route-layers.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/mapold/poi/poi.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/symbol/internal/symbols.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/explore/explore-page.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/planner/pages/planner/sidebar/plan-output-dialog.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-5-reference-details.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/shared/services/old-old-poi.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/analysis/location/location-selector.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/explore/condition/condition.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/analysis/network/internal/changes/components/network-change.component.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/ol/services/openlayers-map-service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/ol/layers/route-change-layers.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/app/planner/pages/planner/planner-state.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×39
  • Duplicated block (23 lines × 2) backend/api/src/main/scala/kpn/api/common/common/MapBounds.scala:11 — backend/api/src/main/scala/kpn/api/common/common/MapBounds.scala:11-33 | server/src/main/scala/kpn/api/common/common/MapBounds.scala:11-33 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/common/MapBounds.scala` and `server/src/main/scala/kpn/api/common/common/MapBounds.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 (23 lines × 2) backend/src/main/scala/kpn/core/common/Timer.scala:22 — backend/src/main/scala/kpn/core/common/Timer.scala:22-44 | server/src/main/scala/kpn/core/common/Timer.scala:22-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/common/Timer.scala` and `server/src/main/scala/kpn/core/common/Timer.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 (23 lines × 2) backend/src/main/scala/kpn/core/history/WayDiffAnalyzer.scala:10 — backend/src/main/scala/kpn/core/history/WayDiffAnalyzer.scala:10-32 | server/src/main/scala/kpn/core/history/WayDiffAnalyzer.scala:10-32 — before extracting anything, compare `backend/src/main/scala/kpn/core/history/WayDiffAnalyzer.scala` and `server/src/main/scala/kpn/core/history/WayDiffAnalyzer.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 (23 lines × 2) backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:24 — backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:24-46 | server/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala:24-46 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/OsmXmlWriter.scala` and `server/src/main/scala/kpn/core/loadOld/OsmXmlWriter.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 (23 lines × 2) backend/src/main/scala/kpn/core/taginfo/TagInfoReport.scala:142 — backend/src/main/scala/kpn/core/taginfo/TagInfoReport.scala:142-164 | server/src/main/scala/kpn/core/taginfo/TagInfoReport.scala:142-164 — before extracting anything, compare `backend/src/main/scala/kpn/core/taginfo/TagInfoReport.scala` and `server/src/main/scala/kpn/core/taginfo/TagInfoReport.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (23 lines × 2) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:83 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:83-105 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:83-105 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (23 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:75 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:75-97 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:75-97 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (23 lines × 2) backend/src/main/scala/kpn/core/tools/support/FindCircularRoutesTool.scala:27 — backend/src/main/scala/kpn/core/tools/support/FindCircularRoutesTool.scala:27-49 | server/src/main/scala/kpn/core/tools/support/FindCircularRoutesTool.scala:27-49 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindCircularRoutesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindCircularRoutesTool.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 (23 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala:54 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala:54-76 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala:54-76 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodeCounts.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryNetworkRouteDetails.scala:42 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryNetworkRouteDetails.scala:42-64 | server/src/main/scala/kpn/database/actions/routes/MongoQueryNetworkRouteDetails.scala:42-64 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryNetworkRouteDetails.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryNetworkRouteDetails.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 (23 lines × 2) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:247 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:247-269 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:247-269 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/DatabaseCollection.scala` and `server/src/main/scala/kpn/database/base/DatabaseCollection.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `WithId` names `kpn.api.id.WithId` in one and `kpn.core.doc.WithId` 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:76 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:76-98 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:76-98 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeMemberMissingAnalyzer.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeMemberMissingAnalyzer.scala:9-31 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeMemberMissingAnalyzer.scala:9-31 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeMemberMissingAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNodeMemberMissingAnalyzer.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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/BaseNodeBulkAnalyzer.scala:21 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/BaseNodeBulkAnalyzer.scala:21-43 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/BaseNodeBulkAnalyzer.scala:21-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/BaseNodeBulkAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/BaseNodeBulkAnalyzer.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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:441 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:441-463 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:441-463 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:441` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:114 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:114-136 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:114-136 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:111 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:111-133 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:111-133 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala:149 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala:149-171 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala:149-171 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:50 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:50-72 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:50-72 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NetworkChangeInfoBuilder.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NetworkChangeInfoBuilder.scala:11-33 | server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NetworkChangeInfoBuilder.scala:11-33 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NetworkChangeInfoBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NetworkChangeInfoBuilder.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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:93 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:93-115 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:93-115 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala:61 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala:61-83 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala:61-83 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (23 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala:55 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala:55-77 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala:55-77 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.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 (23 lines × 2) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:302 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:302-324 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:302-324 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (23 lines × 2) backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:47 — backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:47-69 | server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:47-69 — before extracting anything, compare `backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala` and `server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala` as WHOLE FILES: this scan already matched 8 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.
  • + 14 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×37
  • Duplicated block (18 lines × 2) backend/api/src/main/scala/kpn/api/common/route/Link.scala:22 — backend/api/src/main/scala/kpn/api/common/route/Link.scala:22-39 | server/src/main/scala/kpn/api/common/route/Link.scala:22-39 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/route/Link.scala` and `server/src/main/scala/kpn/api/common/route/Link.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:55 — backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:55-72 | server/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala:55-72 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala` and `server/src/main/scala/kpn/core/overpass/CachingOverpassQueryExecutor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:57 — backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:57-74 | server/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:57-74 — before extracting anything, compare `backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala` and `server/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:209 — backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:209-226 | server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:209-226 — before extracting anything, compare `backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala` and `server/src/main/scala/kpn/core/report/LinkImageBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:13 — backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:13-30 | server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:13-30 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` and `server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:38 — backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:38-55 | server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:38-55 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.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 (18 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeNetworkReferences.scala:30 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeNetworkReferences.scala:30-47 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeNetworkReferences.scala:30-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeNetworkReferences.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeNetworkReferences.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 (18 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala:43 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala:43-60 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala:43-60 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileIds.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 (18 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala:30 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala:30-47 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala:30-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.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 (18 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQuerySubRouteData.scala:31 — backend/src/main/scala/kpn/database/actions/routes/MongoQuerySubRouteData.scala:31-48 | server/src/main/scala/kpn/database/actions/routes/MongoQuerySubRouteData.scala:31-48 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQuerySubRouteData.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQuerySubRouteData.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 (18 lines × 2) backend/src/main/scala/kpn/database/tools/FindNodeWithLongName.scala:30 — backend/src/main/scala/kpn/database/tools/FindNodeWithLongName.scala:30-47 | server/src/main/scala/kpn/database/tools/FindNodeWithLongName.scala:30-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/FindNodeWithLongName.scala` and `server/src/main/scala/kpn/database/tools/FindNodeWithLongName.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 (18 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:166 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:166-183 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:166-183 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/SurfaceFragmentSplitter.scala:26 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/SurfaceFragmentSplitter.scala:26-43 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/SurfaceFragmentSplitter.scala:26-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/SurfaceFragmentSplitter.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/SurfaceFragmentSplitter.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 (18 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:9-26 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:9-26 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.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 (18 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:41 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:41-58 | server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:41-58 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileBuilder.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileBuilder.scala:25-42 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileBuilder.scala:25-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiTileBuilder.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 (18 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:58-75 | server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:58-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala:65 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala:65-82 | server/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala:65-82 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.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 (18 lines × 2) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:188 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:188-205 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:188-205 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:481 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:481-498 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:481-498 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala:69 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala:69-86 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala:69-86 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala:51 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala:51-68 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala:50-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:38 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:38-55 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:38-55 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:58 — backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:58-75 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:58-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:21 — backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:21-38 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:21-38 — before extracting anything, compare `backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala` and `server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×34
  • Members sharing a duplicated core (4 members, 50+ identical tokens) backend/api/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala:29 — backend/api/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala:29-41 | backend/src/main/scala/kpn/core/doc/NetworkInfoNodeDetail.scala:30-42 | server/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala:29-41 | server/src/main/scala/kpn/core/doc/NetworkInfoNodeDetail.scala:29-41 — 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) backend/api/src/main/scala/kpn/api/common/status/BarChart.scala:4 — backend/api/src/main/scala/kpn/api/common/status/BarChart.scala:4-14 | backend/api/src/main/scala/kpn/api/common/status/BarChart2D.scala:10-26 | server/src/main/scala/kpn/api/common/status/BarChart.scala:4-14 | server/src/main/scala/kpn/api/common/status/BarChart2D.scala:10-26 — 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) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:18 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:18-27 | backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:29-37 | server/src/main/scala/kpn/api/custom/Timestamp.scala:13-22 | server/src/main/scala/kpn/api/custom/Timestamp.scala:24-32 — 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) backend/src/main/scala/kpn/core/data/DataBuilder.scala:63 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:63-93 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:40-66 | server/src/main/scala/kpn/core/data/DataBuilder.scala:63-93 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:40-66 — 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) backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:11 — backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:11-23 | backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:11-27 | server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:11-23 | server/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:11-27 — 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) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:82 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:82-105 | backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:151-172 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:82-105 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:151-172 — 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) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:13 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:13-44 | backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:46-54 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:13-44 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:46-54 — 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:40 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:40-60 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:45-69 | server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:40-60 | server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:45-69 — 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:63 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:63-83 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:41-61 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:63-83 | server/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:41-61 — 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:85 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:85-117 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:65-97 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:85-117 | server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:65-97 — 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) backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:19 — backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:19-52 | backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:54-75 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:19-52 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:54-75 — 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) backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:175 — backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:175-190 | backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:23-80 | server/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:175-190 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:23-80 — 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) backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:32 — backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:32-50 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:33-49 | server/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:32-50 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:33-49 — 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) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:164 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:164-203 | backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:205-256 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:164-203 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:205-256 — 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:83 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:83-112 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:158-183 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:83-112 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:158-183 — 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:383 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:383-394 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:442-451 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:383-394 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:442-451 — 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:396 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:396-407 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:409-420 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:396-407 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:409-420 — 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:37 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:37-67 | backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:39-74 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:37-67 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:39-74 — 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) backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:36 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:36-65 | backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:37-68 | server/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:36-65 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:37-68 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:129 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:129-151 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:435-463 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:129-151 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:435-463 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:654 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:654-688 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:690-719 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:654-688 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:690-719 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:87 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:87-95 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:117-125 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:87-95 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:117-125 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:9-41 | backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:29-86 | server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:9-41 | server/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:29-86 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:8-26 | backend/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:127-143 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:8-26 | server/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:127-143 — 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) backend/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala:66 — backend/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala:66-81 | backend/src/main/scala/kpn/server/api/analysis/pages/PoiLocationsPageBuilder.scala:44-59 | server/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala:66-81 | server/src/main/scala/kpn/server/api/analysis/pages/PoiLocationsPageBuilder.scala:44-59 — 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.
  • + 9 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×29
  • Duplicated block (25 lines × 2) backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:195 — backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:195-219 | server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:195-219 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` and `server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:42 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:42-66 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:42-66 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderPoland.scala:28 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderPoland.scala:28-52 | server/src/main/scala/kpn/core/tools/location/LocationBuilderPoland.scala:28-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderPoland.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderPoland.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 (25 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/compare/CompareEdges.scala:19 — backend/src/main/scala/kpn/core/tools/next/support/compare/CompareEdges.scala:19-43 | server/src/main/scala/kpn/core/tools/next/support/compare/CompareEdges.scala:19-43 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/compare/CompareEdges.scala` and `server/src/main/scala/kpn/core/tools/next/support/compare/CompareEdges.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 (25 lines × 2) backend/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala:43 — backend/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala:43-67 | server/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala:43-67 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindNodesWithImagesTool.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 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 (25 lines × 2) backend/src/main/scala/kpn/core/util/Elapsed.scala:12 — backend/src/main/scala/kpn/core/util/Elapsed.scala:12-36 | server/src/main/scala/kpn/core/util/Elapsed.scala:12-36 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/Elapsed.scala` and `server/src/main/scala/kpn/core/util/Elapsed.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 (25 lines × 2) backend/src/main/scala/kpn/core/util/GZipFile.scala:16 — backend/src/main/scala/kpn/core/util/GZipFile.scala:16-40 | server/src/main/scala/kpn/core/util/GZipFile.scala:16-40 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/GZipFile.scala` and `server/src/main/scala/kpn/core/util/GZipFile.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 (25 lines × 2) backend/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPois.scala:48 — backend/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPois.scala:48-72 | server/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPois.scala:48-72 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPois.scala` and `server/src/main/scala/kpn/database/actions/pois/MongoQueryLocationPois.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala:41 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala:41-65 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala:41-65 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/BulkNetworkAnalyzer.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 (25 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:222 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:222-246 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:222-246 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:21 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:21-45 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:21-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.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 (25 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:40-64 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:40-64 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.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 (25 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala:57 — backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala:57-81 | server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala:57-81 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala` and `server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.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 (25 lines × 2) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala:90 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala:90-114 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala:90-114 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangesPageBuilder.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:33 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:33-57 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:33-57 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:114 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:114-138 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:114-138 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala:38 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala:38-62 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala:38-62 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala:38` 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 (25 lines × 2) backend/src/main/scala/kpn/server/sync/SyncTool.scala:46 — backend/src/main/scala/kpn/server/sync/SyncTool.scala:46-70 | server/src/main/scala/kpn/server/sync/SyncTool.scala:46-70 — before extracting anything, compare `backend/src/main/scala/kpn/server/sync/SyncTool.scala` and `server/src/main/scala/kpn/server/sync/SyncTool.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/tools/code/CodecProviderWriter.scala:12 — backend/src/main/scala/kpn/tools/code/CodecProviderWriter.scala:12-36 | server/src/main/scala/kpn/tools/code/CodecProviderWriter.scala:12-36 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/CodecProviderWriter.scala` and `server/src/main/scala/kpn/tools/code/CodecProviderWriter.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:58-82 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:58-82 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:45 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:45-69 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:45-69 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (25 lines × 2) backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala:65 — backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala:65-89 | server/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala:65-89 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala` and `server/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorRouteRelationInfos.scala:17 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorRouteRelationInfos.scala:17-41 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorRouteRelationInfos.scala:17-41 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorRouteRelationInfos.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorRouteRelationInfos.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 (25 lines × 2) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTiles.scala:16 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTiles.scala:16-40 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTiles.scala:16-40 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTiles.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTiles.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 (25 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryParentRoutes.scala:22 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryParentRoutes.scala:22-46 | server/src/main/scala/kpn/database/actions/routes/MongoQueryParentRoutes.scala:22-46 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryParentRoutes.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryParentRoutes.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.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×28
  • Duplicated block (24 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:46 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:46-69 | server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:46-69 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateReferencesTool.scala:43 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateReferencesTool.scala:43-66 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateReferencesTool.scala:43-66 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateReferencesTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorMigrateReferencesTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:80 — backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:80-103 | server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:80-103 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/monitor/support/RouteStructureReportTool.scala:21 — backend/src/main/scala/kpn/core/tools/monitor/support/RouteStructureReportTool.scala:21-44 | server/src/main/scala/kpn/core/tools/monitor/support/RouteStructureReportTool.scala:21-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/RouteStructureReportTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/RouteStructureReportTool.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 (24 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:90 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:90-113 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:90-113 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:38 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:38-61 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:38-61 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.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 (24 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCoordinates.scala:36 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCoordinates.scala:36-59 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCoordinates.scala:36-59 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCoordinates.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCoordinates.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 (24 lines × 2) backend/src/main/scala/kpn/database/tools/FindUnsupportedColours.scala:18 — backend/src/main/scala/kpn/database/tools/FindUnsupportedColours.scala:18-41 | server/src/main/scala/kpn/database/tools/FindUnsupportedColours.scala:18-41 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/FindUnsupportedColours.scala` and `server/src/main/scala/kpn/database/tools/FindUnsupportedColours.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. 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) backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:121 — backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:121-144 | server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:121-144 — before extracting anything, compare `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` and `server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:44 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:44-67 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:44-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:144 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:144-167 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala:144-167 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NonNodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.scala:16-39 | server/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.scala:16-39 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.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. Note first that the copies are not typed on the same thing: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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 (24 lines × 2) backend/src/main/scala/kpn/server/config/FilterChainConfiguration.scala:24 — backend/src/main/scala/kpn/server/config/FilterChainConfiguration.scala:24-47 | server/src/main/scala/kpn/server/config/FilterChainConfiguration.scala:24-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/config/FilterChainConfiguration.scala` and `server/src/main/scala/kpn/server/config/FilterChainConfiguration.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 (24 lines × 2) backend/src/main/scala/kpn/server/config/ServerWebSocketHandler.scala:26 — backend/src/main/scala/kpn/server/config/ServerWebSocketHandler.scala:26-49 | server/src/main/scala/kpn/server/config/ServerWebSocketHandler.scala:26-49 — before extracting anything, compare `backend/src/main/scala/kpn/server/config/ServerWebSocketHandler.scala` and `server/src/main/scala/kpn/server/config/ServerWebSocketHandler.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/monitor/repository/MonitorRelationRepository.scala:50 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRelationRepository.scala:50-73 | server/src/main/scala/kpn/server/monitor/repository/MonitorRelationRepository.scala:50-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRelationRepository.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRelationRepository.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 (24 lines × 2) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:327 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:327-350 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:327-350 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:82 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:82-105 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:81-104 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (24 lines × 2) backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:90 — backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:90-113 | server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:90-113 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala` and `server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:130 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:130-153 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:130-153 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.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 (24 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:157 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:157-180 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:157-180 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.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 (24 lines × 2) backend/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala:120 — backend/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala:120-143 | server/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala:120-143 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala` and `server/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/api/src/main/scala/kpn/api/common/diff/NodeDiffs.scala:7 — backend/api/src/main/scala/kpn/api/common/diff/NodeDiffs.scala:7-30 | server/src/main/scala/kpn/api/common/diff/NodeDiffs.scala:7-30 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/diff/NodeDiffs.scala` and `server/src/main/scala/kpn/api/common/diff/NodeDiffs.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 `backend/api/src/main/scala/kpn/api/common/diff/NodeDiffs.scala:7` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (24 lines × 2) backend/src/main/scala/kpn/core/replicate/Oper.scala:21 — backend/src/main/scala/kpn/core/replicate/Oper.scala:21-44 | server/src/main/scala/kpn/core/replicate/Oper.scala:21-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/Oper.scala` and `server/src/main/scala/kpn/core/replicate/Oper.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 (24 lines × 2) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorMemberCount.scala:16 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorMemberCount.scala:16-39 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorMemberCount.scala:16-39 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorMemberCount.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorMemberCount.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 (24 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCount.scala:25 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCount.scala:25-48 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCount.scala:25-48 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCount.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegmentCount.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.
  • + 3 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×26
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×25
  • Duplicated block (26 lines × 2) backend/api/src/main/scala/kpn/api/common/common/TrackPath.scala:21 — backend/api/src/main/scala/kpn/api/common/common/TrackPath.scala:21-46 | server/src/main/scala/kpn/api/common/common/TrackPath.scala:21-46 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/common/TrackPath.scala` and `server/src/main/scala/kpn/api/common/common/TrackPath.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 (26 lines × 2) backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:73 — backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:73-98 | server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala:73-98 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` and `server/src/main/scala/kpn/core/tools/country/CountryBoundaryTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:94 — backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala:94-119 | server/src/main/scala/kpn/core/tools/support/RawDataTool.scala:94-119 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/RawDataTool.scala` and `server/src/main/scala/kpn/core/tools/support/RawDataTool.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/support/RouteStateTool.scala:23 — backend/src/main/scala/kpn/core/tools/support/RouteStateTool.scala:23-48 | server/src/main/scala/kpn/core/tools/support/RouteStateTool.scala:23-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/RouteStateTool.scala` and `server/src/main/scala/kpn/core/tools/support/RouteStateTool.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 (26 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:69 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:69-94 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:69-94 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala:39 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala:39-64 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala:39-64 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeBaseNetworkReferences.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 (26 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala:46 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala:46-71 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala:46-71 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeTileInfos.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.scala:33 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.scala:33-58 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.scala:33-58 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.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. 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) backend/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala:24 — backend/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala:24-49 | server/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala:24-49 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.scala` and `server/src/main/scala/kpn/database/actions/statistics/MongoQueryStatistics.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 (26 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala:19-44 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala:19-44 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.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 (26 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkIntegrityAnalyzer.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkIntegrityAnalyzer.scala:16-41 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkIntegrityAnalyzer.scala:16-41 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkIntegrityAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkIntegrityAnalyzer.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 (26 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteScopeAnalyzer.scala:28 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteScopeAnalyzer.scala:28-53 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteScopeAnalyzer.scala:28-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteScopeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteScopeAnalyzer.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 (26 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:78 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:78-103 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:78-103 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:50 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:50-75 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:50-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeAnalyzer.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeAnalyzer.scala:25-50 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeAnalyzer.scala:25-50 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala:23 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala:23-48 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala:23-48 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.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 (26 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageExample.scala:46 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageExample.scala:46-71 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageExample.scala:46-71 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageExample.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 (26 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWebsiteAnalyzer.scala:16 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWebsiteAnalyzer.scala:16-41 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWebsiteAnalyzer.scala:16-41 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWebsiteAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWebsiteAnalyzer.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 (26 lines × 2) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:505 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:505-530 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:505-530 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` and `server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala` as WHOLE FILES: this scan already matched 29 separate duplicated blocks between them, totalling at least 401 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:44 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:44-69 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:44-69 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.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 (26 lines × 2) backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:41 — backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:41-66 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:41-66 — before extracting anything, compare `backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala` and `server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:11-36 | server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:11-36 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:11` 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 (26 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetContext.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetContext.scala:31-56 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetContext.scala:31-56 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetContext.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetContext.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 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) backend/src/main/scala/kpn/server/api/overpass/OverpassController.scala:18 — backend/src/main/scala/kpn/server/api/overpass/OverpassController.scala:18-43 | server/src/main/scala/kpn/server/api/overpass/OverpassController.scala:18-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/overpass/OverpassController.scala` and `server/src/main/scala/kpn/server/api/overpass/OverpassController.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) backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:125 — backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:125-150 | server/src/main/scala/kpn/database/index/IndexConfiguration.scala:125-150 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/IndexConfiguration.scala` and `server/src/main/scala/kpn/database/index/IndexConfiguration.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 366 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) · ×23
  • Edited copy of a member (9 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer2.scala:76 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer2.scala:76-84 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer2.scala:77-85 — 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) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:66 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:66-74 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:66-74 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:14-22 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:14-22 — 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) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:39 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:39-47 | server/src/main/scala/kpn/api/custom/Timestamp.scala:34-42 — 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) backend/src/main/scala/kpn/server/analyzer/engine/tile/RouteTileEncoder.scala:73 — backend/src/main/scala/kpn/server/analyzer/engine/tile/RouteTileEncoder.scala:73-81 | server/src/main/scala/kpn/server/analyzer/engine/tile/RouteTileEncoder.scala:73-81 — 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) backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:46 — backend/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:46-54 | server/src/main/scala/kpn/server/analyzer/engine/tile/LineSegmentTileCalculator.scala:46-54 — 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) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:27 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:27-35 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:27-35 — 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) backend/src/main/scala/kpn/core/util/End.scala:4 — backend/src/main/scala/kpn/core/util/End.scala:4-12 | server/src/main/scala/kpn/core/util/End.scala:4-12 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:168 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:168-176 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:168-176 — 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:284 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:284-292 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:284-292 — 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) backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:80 — backend/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:80-88 | server/src/main/scala/kpn/core/tools/location/GeometryImageWriter.scala:80-88 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:39 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:39-47 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/NodeUtil.scala:39-47 — 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) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:115 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:115-123 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:115-123 — 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:165 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:165-173 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:165-173 — 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) backend/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala:11 — backend/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala:11-19 | server/src/main/scala/kpn/core/tools/monitor/ChangeSetTaskTool.scala:11-19 — 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) backend/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala:10-18 | server/src/main/scala/kpn/server/analyzer/engine/tile/TileEncoder.scala:10-18 — 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) backend/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala:39 — backend/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala:39-47 | server/src/main/scala/kpn/server/opendata/flanders/FlandersRouteParser.scala:39-47 — 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) backend/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala:31 — backend/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala:31-39 | server/src/main/scala/kpn/server/repository/NetworkInfoRepository.scala:31-39 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:44 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:44-52 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.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) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:20 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:20-28 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:20-28 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala:16-24 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteLastSurveyAnalyzer.scala:16-24 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala:26 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala:26-34 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/JavaRelationConverter.scala:26-34 — 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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala:61 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala:61-69 | server/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorRouteAnalysisSupport.scala:61-69 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×22
  • Duplicated block (32 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:86 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:86-117 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:86-117 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (32 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:66 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:66-97 | server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:66-97 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/poi/PoiTagsUpdateTool.scala:16 — backend/src/main/scala/kpn/core/tools/poi/PoiTagsUpdateTool.scala:16-47 | server/src/main/scala/kpn/core/tools/poi/PoiTagsUpdateTool.scala:16-47 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiTagsUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiTagsUpdateTool.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 (32 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteCountry.scala:36 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteCountry.scala:36-67 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteCountry.scala:36-67 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteCountry.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteCountry.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 (32 lines × 2) backend/src/main/scala/kpn/monitor/AppMonitor.scala:41 — backend/src/main/scala/kpn/monitor/AppMonitor.scala:41-72 | server/src/main/scala/kpn/monitor/AppMonitor.scala:41-72 — before extracting anything, compare `backend/src/main/scala/kpn/monitor/AppMonitor.scala` and `server/src/main/scala/kpn/monitor/AppMonitor.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/BaseNetworkMainAnalyzer.scala:36 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/BaseNetworkMainAnalyzer.scala:36-67 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/BaseNetworkMainAnalyzer.scala:36-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/BaseNetworkMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/BaseNetworkMainAnalyzer.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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:655 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:655-686 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:655-686 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:655` 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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala:68 — backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala:68-99 | server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala:68-99 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileUtil.scala:18 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileUtil.scala:18-49 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileUtil.scala:18-49 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileUtil.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNodeChangeBuilder.scala:28 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNodeChangeBuilder.scala:28-59 | server/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNodeChangeBuilder.scala:28-59 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNodeChangeBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNodeChangeBuilder.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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:87 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:87-118 | server/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:87-118 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:532 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:532-563 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:532-563 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationDetailsPageBuilder.scala:32 — backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationDetailsPageBuilder.scala:32-63 | server/src/main/scala/kpn/server/api/analysis/pages/location/LocationDetailsPageBuilder.scala:32-63 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationDetailsPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/location/LocationDetailsPageBuilder.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 (32 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:45 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:45-76 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:45-76 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala:29 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala:29-60 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala:29-60 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.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 (32 lines × 2) backend/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala:17 — backend/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala:17-48 | server/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala:17-48 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala` and `server/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/api/src/main/scala/kpn/api/common/ReplicationId.scala:5 — backend/api/src/main/scala/kpn/api/common/ReplicationId.scala:5-36 | server/src/main/scala/kpn/api/common/ReplicationId.scala:5-36 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/ReplicationId.scala` and `server/src/main/scala/kpn/api/common/ReplicationId.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 `backend/api/src/main/scala/kpn/api/common/ReplicationId.scala:5` 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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/AnalyzerConfiguration.scala:21 — backend/src/main/scala/kpn/server/analyzer/AnalyzerConfiguration.scala:21-52 | server/src/main/scala/kpn/server/analyzer/AnalyzerConfiguration.scala:21-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/AnalyzerConfiguration.scala` and `server/src/main/scala/kpn/server/analyzer/AnalyzerConfiguration.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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteUnexpectedNodeAnalyzer.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteUnexpectedNodeAnalyzer.scala:8-39 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteUnexpectedNodeAnalyzer.scala:8-39 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteUnexpectedNodeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteUnexpectedNodeAnalyzer.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteUnexpectedNodeAnalyzer.scala:8` 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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeDeleterImpl.scala:23 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeDeleterImpl.scala:23-54 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeDeleterImpl.scala:23-54 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeDeleterImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeDeleterImpl.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 (32 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tile/NodeTileChangeAnalyzer.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/tile/NodeTileChangeAnalyzer.scala:14-45 | server/src/main/scala/kpn/server/analyzer/engine/tile/NodeTileChangeAnalyzer.scala:14-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/NodeTileChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/NodeTileChangeAnalyzer.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 (32 lines × 2) backend/src/main/scala/kpn/tools/code/typescript/TypeScriptEnumerationWriter.scala:10 — backend/src/main/scala/kpn/tools/code/typescript/TypeScriptEnumerationWriter.scala:10-41 | server/src/main/scala/kpn/tools/code/typescript/TypeScriptEnumerationWriter.scala:10-41 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/typescript/TypeScriptEnumerationWriter.scala` and `server/src/main/scala/kpn/tools/code/typescript/TypeScriptEnumerationWriter.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.
AC4 · Keyboard semantics · Anchor without href · ×20
  • Anchor without href frontend/src/app/analysis/components/action/action-button.component.ts:12 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/analysis/components/changes/filter/change-filter-period.component.ts:28 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/analysis/components/changes/filter/change-filter-period.component.ts:30 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/analysis/components/edit/edit-link.component.ts:10 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/analysis/location/internal/selection/components/location-tree-node.component.ts:15 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:22 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/monitor/internal/route/components/monitor-route-sub-relation-menu-option.component.ts:12 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/ol/components/map-link-menu.component.ts:19 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/planner/pages/planner/sidebar/plan-result-menu.component.ts:14 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/planner/pages/planner/sidebar/plan-result-menu.component.ts:23 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/root/internal/menu/menu-test-actions.component.ts:14 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/root/internal/menu/menu-test-actions.component.ts:17 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/root/internal/menu/menu-test-actions.component.ts:20 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/root/internal/menu/menu-test-actions.component.ts:23 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/root/internal/menu/menu-test-actions.component.ts:44 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/shared/components/page/page-experimental.component.ts:16 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/shared/components/page/page-experimental.component.ts:28 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/shared/user/user-link-login.component.ts:9 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/shared/user/user-link-logout.component.ts:9 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href frontend/src/app/tryout/filter/tryout-filter-page.component.ts:25 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×20
  • Edited copy of a member (4 corresponding lines) backend/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala:41 — backend/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala:41-44 | server/src/main/scala/kpn/core/tools/country/PolygonBuilder.scala:41-44 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:38 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:38-41 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:38-41 — 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) backend/src/main/scala/kpn/core/util/NaturalSorting.scala:11 — backend/src/main/scala/kpn/core/util/NaturalSorting.scala:11-14 | server/src/main/scala/kpn/core/util/NaturalSorting.scala:11-14 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:246 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:246-249 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:246-249 — 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) backend/src/main/scala/kpn/server/opendata/france/FranceRouteParser.scala:47 — backend/src/main/scala/kpn/server/opendata/france/FranceRouteParser.scala:47-50 | server/src/main/scala/kpn/server/opendata/france/FranceRouteParser.scala:47-50 — 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) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:91 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:91-94 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:91-94 — 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) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:35 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:35-38 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:35-38 — 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) backend/src/main/scala/kpn/core/tools/operation/Processes.scala:28 — backend/src/main/scala/kpn/core/tools/operation/Processes.scala:28-31 | server/src/main/scala/kpn/core/tools/operation/Processes.scala:28-31 — 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) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:123 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:123-126 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:123-126 — 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:81 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:81-84 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.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) backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:15 — backend/src/main/scala/kpn/core/analysis/TagInterpreter.scala:15-18 | server/src/main/scala/kpn/core/analysis/TagInterpreter.scala:15-18 — 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) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:182 — backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:182-185 | server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:182-185 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:87 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:87-90 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:87-90 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:127 — backend/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:127-130 | server/src/main/scala/kpn/core/tools/poi/PoiAnalyzerTool.scala:127-130 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeLocationAnalyzer.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeLocationAnalyzer.scala:10-13 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeLocationAnalyzer.scala:10-13 — 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) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:49 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:49-52 | server/src/main/scala/kpn/api/custom/Timestamp.scala:44-47 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.scala:58-61 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.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) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:22 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:22-25 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:22-25 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:152 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:152-155 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:152-155 — 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) backend/src/main/scala/kpn/server/api/analysis/pages/OverviewPageBuilder.scala:93 — backend/src/main/scala/kpn/server/api/analysis/pages/OverviewPageBuilder.scala:93-96 | server/src/main/scala/kpn/server/api/analysis/pages/OverviewPageBuilder.scala:93-96 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×20
  • Duplicated block (28 lines × 2) backend/api/src/main/scala/kpn/api/common/route/GeometryDiff.scala:16 — backend/api/src/main/scala/kpn/api/common/route/GeometryDiff.scala:16-43 | server/src/main/scala/kpn/api/common/route/GeometryDiff.scala:16-43 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/route/GeometryDiff.scala` and `server/src/main/scala/kpn/api/common/route/GeometryDiff.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 `backend/api/src/main/scala/kpn/api/common/route/GeometryDiff.scala:16` 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 (28 lines × 2) backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutor.scala:20 — backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutor.scala:20-47 | server/src/main/scala/kpn/core/overpass/OverpassQueryExecutor.scala:20-47 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutor.scala` and `server/src/main/scala/kpn/core/overpass/OverpassQueryExecutor.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 (28 lines × 2) backend/src/main/scala/kpn/core/tools/backup/BackupTool.scala:19 — backend/src/main/scala/kpn/core/tools/backup/BackupTool.scala:19-46 | server/src/main/scala/kpn/core/tools/backup/BackupTool.scala:19-46 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/backup/BackupTool.scala` and `server/src/main/scala/kpn/core/tools/backup/BackupTool.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 (28 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:63 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:63-90 | server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:63-90 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:84 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:84-111 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:84-111 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 149 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorCreatePpRoutesTool.scala:41 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorCreatePpRoutesTool.scala:41-68 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorCreatePpRoutesTool.scala:41-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorCreatePpRoutesTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorCreatePpRoutesTool.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 (28 lines × 2) backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:41 — backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:41-68 | server/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:41-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.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 (28 lines × 2) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeRouteReferences.scala:33 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeRouteReferences.scala:33-60 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeRouteReferences.scala:33-60 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeRouteReferences.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryNodeRouteReferences.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 (28 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala:22 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala:22-49 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala:22-49 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala` as WHOLE FILES: this scan already matched 4 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 (28 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:45 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:45-72 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:45-72 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:20 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:20-47 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala:20-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:19-46 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:19-46 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.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 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 `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkMapPageBuilder.scala:33 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkMapPageBuilder.scala:33-60 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkMapPageBuilder.scala:33-60 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkMapPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkMapPageBuilder.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 (28 lines × 2) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:65 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:65-92 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:65-92 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala` as WHOLE FILES: this scan already matched 4 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 (28 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/RouteChangeInfoBuilder.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/RouteChangeInfoBuilder.scala:16-43 | server/src/main/scala/kpn/server/analyzer/engine/changes/builder/RouteChangeInfoBuilder.scala:16-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/RouteChangeInfoBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/builder/RouteChangeInfoBuilder.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 (28 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkRouteAnalyzer.scala:20 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkRouteAnalyzer.scala:20-47 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkRouteAnalyzer.scala:20-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkRouteAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkRouteAnalyzer.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 (28 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:54 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:54-81 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:54-81 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/statistics/ChangeStatisticsUpdater.scala:20 — backend/src/main/scala/kpn/database/actions/statistics/ChangeStatisticsUpdater.scala:20-47 | server/src/main/scala/kpn/database/actions/statistics/ChangeStatisticsUpdater.scala:20-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/statistics/ChangeStatisticsUpdater.scala` and `server/src/main/scala/kpn/database/actions/statistics/ChangeStatisticsUpdater.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 `backend/src/main/scala/kpn/database/actions/statistics/ChangeStatisticsUpdater.scala:20` 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 × 2) backend/src/main/scala/kpn/server/analyzer/engine/monitor/MonitorFilter.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/MonitorFilter.scala:10-37 | server/src/main/scala/kpn/server/analyzer/engine/monitor/MonitorFilter.scala:10-37 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/MonitorFilter.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/MonitorFilter.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 (28 lines × 2) backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala:22 — backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala:22-49 | server/src/main/scala/kpn/core/util/GeoJsonUtil.scala:22-49 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/GeoJsonUtil.scala` and `server/src/main/scala/kpn/core/util/GeoJsonUtil.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×20
  • Duplicated block (27 lines × 2) backend/src/main/scala/kpn/core/tools/backup/BackupTool.scala:57 — backend/src/main/scala/kpn/core/tools/backup/BackupTool.scala:57-83 | server/src/main/scala/kpn/core/tools/backup/BackupTool.scala:57-83 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/backup/BackupTool.scala` and `server/src/main/scala/kpn/core/tools/backup/BackupTool.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 (27 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/TryoutLoadRelationTool.scala:40 — backend/src/main/scala/kpn/core/tools/next/support/TryoutLoadRelationTool.scala:40-66 | server/src/main/scala/kpn/core/tools/next/support/TryoutLoadRelationTool.scala:40-66 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/TryoutLoadRelationTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/TryoutLoadRelationTool.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 (27 lines × 2) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:308 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:308-334 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:308-334 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (27 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:121 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:121-147 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala:121-147 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFactCount.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (27 lines × 2) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTileIds.scala:27 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTileIds.scala:27-53 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTileIds.scala:27-53 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTileIds.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorStateTileIds.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 (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala:47 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala:47-73 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala:47-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationConfigurationReader.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 (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala:98 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala:98-124 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala:98-124 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkFactAnalyzer.scala` as WHOLE FILES: this scan already matched 4 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 (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:691 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:691-717 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:691-717 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:691` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffAnalyzer.scala:29 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffAnalyzer.scala:29-55 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffAnalyzer.scala:29-55 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffAnalyzer.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 (27 lines × 2) backend/src/main/scala/kpn/server/api/ApiImpl.scala:19 — backend/src/main/scala/kpn/server/api/ApiImpl.scala:19-45 | server/src/main/scala/kpn/server/api/ApiImpl.scala:19-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/ApiImpl.scala` and `server/src/main/scala/kpn/server/api/ApiImpl.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 (27 lines × 2) backend/src/main/scala/kpn/server/config/AuthenticationCookieFilter.scala:51 — backend/src/main/scala/kpn/server/config/AuthenticationCookieFilter.scala:51-77 | server/src/main/scala/kpn/server/config/AuthenticationCookieFilter.scala:51-77 — before extracting anything, compare `backend/src/main/scala/kpn/server/config/AuthenticationCookieFilter.scala` and `server/src/main/scala/kpn/server/config/AuthenticationCookieFilter.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 (27 lines × 2) backend/src/main/scala/kpn/server/config/RequestContextFilter.scala:25 — backend/src/main/scala/kpn/server/config/RequestContextFilter.scala:25-51 | server/src/main/scala/kpn/server/config/RequestContextFilter.scala:25-51 — before extracting anything, compare `backend/src/main/scala/kpn/server/config/RequestContextFilter.scala` and `server/src/main/scala/kpn/server/config/RequestContextFilter.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 (27 lines × 2) backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeReader.scala:22 — backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeReader.scala:22-48 | server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeReader.scala:22-48 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeReader.scala` and `server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeReader.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 (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RoutePathReport.scala:27 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RoutePathReport.scala:27-53 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RoutePathReport.scala:27-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RoutePathReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RoutePathReport.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 (27 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetChangesPageBuilder.scala:30 — backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetChangesPageBuilder.scala:30-56 | server/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetChangesPageBuilder.scala:30-56 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetChangesPageBuilder.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 (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:124 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:124-150 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:124-150 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (27 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala:26 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala:26-52 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala:26-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkNodesPageExample.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 (27 lines × 2) backend/src/main/scala/kpn/core/taginfo/TagInfoReport.scala:113 — backend/src/main/scala/kpn/core/taginfo/TagInfoReport.scala:113-139 | server/src/main/scala/kpn/core/taginfo/TagInfoReport.scala:113-139 — before extracting anything, compare `backend/src/main/scala/kpn/core/taginfo/TagInfoReport.scala` and `server/src/main/scala/kpn/core/taginfo/TagInfoReport.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) backend/src/main/scala/kpn/database/base/MongoAggregates.scala:13 — backend/src/main/scala/kpn/database/base/MongoAggregates.scala:13-39 | server/src/main/scala/kpn/database/base/MongoAggregates.scala:13-39 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/MongoAggregates.scala` and `server/src/main/scala/kpn/database/base/MongoAggregates.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 (27 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteWithoutWaysAnalyzer.scala:6 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteWithoutWaysAnalyzer.scala:6-32 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteWithoutWaysAnalyzer.scala:6-32 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteWithoutWaysAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteWithoutWaysAnalyzer.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteWithoutWaysAnalyzer.scala:6` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×18
  • Duplicated block (35 lines × 2) backend/api/src/main/scala/kpn/api/common/planner/PlanRoute.scala:12 — backend/api/src/main/scala/kpn/api/common/planner/PlanRoute.scala:12-46 | server/src/main/scala/kpn/api/common/planner/PlanRoute.scala:12-46 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/planner/PlanRoute.scala` and `server/src/main/scala/kpn/api/common/planner/PlanRoute.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 (35 lines × 2) backend/src/main/scala/kpn/core/builders/RouteDetailsBuilder.scala:11 — backend/src/main/scala/kpn/core/builders/RouteDetailsBuilder.scala:11-45 | server/src/main/scala/kpn/api/common/route/RouteDetails.scala:18-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/builders/RouteDetailsBuilder.scala` and `server/src/main/scala/kpn/api/common/route/RouteDetails.scala` as WHOLE FILES: 82% 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 (35 lines × 2) backend/src/main/scala/kpn/core/doc/RouteRelation.scala:17 — backend/src/main/scala/kpn/core/doc/RouteRelation.scala:17-51 | server/src/main/scala/kpn/core/doc/RouteRelation.scala:16-50 — before extracting anything, compare `backend/src/main/scala/kpn/core/doc/RouteRelation.scala` and `server/src/main/scala/kpn/core/doc/RouteRelation.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. 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 (35 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/RouteExploreTool.scala:24 — backend/src/main/scala/kpn/core/tools/next/support/RouteExploreTool.scala:24-58 | server/src/main/scala/kpn/core/tools/next/support/RouteExploreTool.scala:24-58 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteExploreTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteExploreTool.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. 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 (35 lines × 2) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTiles.scala:31 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTiles.scala:31-65 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTiles.scala:31-65 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTiles.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTiles.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 (35 lines × 2) backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetInfo.scala:28 — backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetInfo.scala:28-62 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetInfo.scala:28-62 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetInfo.scala` and `server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetInfo.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (35 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:193 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:193-227 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:193-227 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (35 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiAddressAnalyzer.scala:16 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiAddressAnalyzer.scala:16-50 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiAddressAnalyzer.scala:16-50 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiAddressAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiAddressAnalyzer.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 (35 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala:46 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala:46-80 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala:46-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala` as WHOLE FILES: this scan already matched 4 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 (35 lines × 2) backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:263 — backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:263-297 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:263-297 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala` and `server/src/main/scala/kpn/server/api/status/StatusFacade.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 235 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:263` 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 (35 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:212 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:212-246 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:212-246 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (35 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSearchResults.scala:25 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSearchResults.scala:25-59 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSearchResults.scala:25-59 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSearchResults.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSearchResults.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 (35 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:103 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:103-137 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala:103-137 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (35 lines × 2) backend/api/src/main/scala/kpn/api/common/PoiAnalysis.scala:35 — backend/api/src/main/scala/kpn/api/common/PoiAnalysis.scala:35-69 | server/src/main/scala/kpn/api/common/PoiAnalysis.scala:35-69 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/PoiAnalysis.scala` and `server/src/main/scala/kpn/api/common/PoiAnalysis.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 (35 lines × 2) backend/api/src/main/scala/kpn/api/custom/ScopedRouteType.scala:15 — backend/api/src/main/scala/kpn/api/custom/ScopedRouteType.scala:15-49 | server/src/main/scala/kpn/api/custom/ScopedRouteType.scala:15-49 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/custom/ScopedRouteType.scala` and `server/src/main/scala/kpn/api/custom/ScopedRouteType.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 `backend/api/src/main/scala/kpn/api/custom/ScopedRouteType.scala:15` 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 (35 lines × 2) backend/src/main/scala/kpn/core/doc/NetworkDoc.scala:36 — backend/src/main/scala/kpn/core/doc/NetworkDoc.scala:36-70 | server/src/main/scala/kpn/core/doc/NetworkDoc.scala:35-69 — before extracting anything, compare `backend/src/main/scala/kpn/core/doc/NetworkDoc.scala` and `server/src/main/scala/kpn/core/doc/NetworkDoc.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 (35 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructurePathElement.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructurePathElement.scala:10-44 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructurePathElement.scala:10-44 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructurePathElement.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructurePathElement.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 (35 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSaver.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSaver.scala:19-53 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSaver.scala:19-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSaver.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSaver.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×18
  • Duplicated block (30 lines × 2) backend/src/main/scala/kpn/core/data/DataBuilder.scala:64 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:64-93 | server/src/main/scala/kpn/core/data/DataBuilder.scala:64-93 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `server/src/main/scala/kpn/core/data/DataBuilder.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (30 lines × 2) backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:38 — backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:38-67 | server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:38-67 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:35 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:35-64 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:35-64 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:94 — backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:94-123 | server/src/main/scala/kpn/database/index/IndexConfiguration.scala:94-123 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/IndexConfiguration.scala` and `server/src/main/scala/kpn/database/index/IndexConfiguration.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 366 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:224 — backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:224-253 | server/src/main/scala/kpn/database/index/IndexConfiguration.scala:224-253 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/IndexConfiguration.scala` and `server/src/main/scala/kpn/database/index/IndexConfiguration.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 366 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:256 — backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:256-285 | server/src/main/scala/kpn/database/index/IndexConfiguration.scala:256-285 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/IndexConfiguration.scala` and `server/src/main/scala/kpn/database/index/IndexConfiguration.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 366 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala:22 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala:22-51 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala:22-51 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/RouteLocator.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 (30 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/BaseNodeMainAnalyzer.scala:44 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/BaseNodeMainAnalyzer.scala:44-73 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/BaseNodeMainAnalyzer.scala:44-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/BaseNodeMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/BaseNodeMainAnalyzer.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 (30 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:282 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:282-311 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:282-311 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:143 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:143-172 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:143-172 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:210 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:210-239 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:210-239 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetInfoBuilder.scala:13 — backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetInfoBuilder.scala:13-42 | server/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetInfoBuilder.scala:13-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetInfoBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetInfoBuilder.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 (30 lines × 2) backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:189 — backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:189-218 | server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:189-218 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` and `server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 273 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteInfoBuilder.scala:19 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteInfoBuilder.scala:19-48 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteInfoBuilder.scala:19-48 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteInfoBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteInfoBuilder.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 (30 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:153 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:153-182 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:153-182 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateNodeDiffsAnalyzer.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateNodeDiffsAnalyzer.scala:11-40 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateNodeDiffsAnalyzer.scala:11-40 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateNodeDiffsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateNodeDiffsAnalyzer.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 (30 lines × 2) backend/src/main/scala/kpn/core/files/ScanRemoteTool.scala:5 — backend/src/main/scala/kpn/core/files/ScanRemoteTool.scala:5-34 | server/src/main/scala/kpn/core/files/ScanRemoteTool.scala:5-34 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/ScanRemoteTool.scala` and `server/src/main/scala/kpn/core/files/ScanRemoteTool.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 `backend/src/main/scala/kpn/core/files/ScanRemoteTool.scala:5` 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 (30 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageBuilder.scala:16 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageBuilder.scala:16-45 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageBuilder.scala:16-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkDetailsPageBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×18
  • Duplicated block (29 lines × 2) backend/src/main/scala/kpn/core/common/TimestampLocal.scala:79 — backend/src/main/scala/kpn/core/common/TimestampLocal.scala:79-107 | server/src/main/scala/kpn/core/common/TimestampLocal.scala:79-107 — before extracting anything, compare `backend/src/main/scala/kpn/core/common/TimestampLocal.scala` and `server/src/main/scala/kpn/core/common/TimestampLocal.scala` as WHOLE FILES: this scan already matched 6 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) backend/src/main/scala/kpn/core/tools/operation/OperationTool.scala:76 — backend/src/main/scala/kpn/core/tools/operation/OperationTool.scala:76-104 | server/src/main/scala/kpn/core/tools/operation/OperationTool.scala:76-104 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/OperationTool.scala` and `server/src/main/scala/kpn/core/tools/operation/OperationTool.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 (29 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:37 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:37-65 | server/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:37-65 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:40 — backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:40-68 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:40-68 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala` and `server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:40` 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 (29 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:45 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:45-73 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala:45-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationStoreReader.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/RouteMainAnalyzer.scala:63 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/RouteMainAnalyzer.scala:63-91 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/RouteMainAnalyzer.scala:63-91 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/RouteMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/RouteMainAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:71 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:71-99 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:71-99 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkChangesPageBuilder.scala:50 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkChangesPageBuilder.scala:50-78 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkChangesPageBuilder.scala:50-78 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkChangesPageBuilder.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 (29 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWikipediaAnalyzer.scala:16 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWikipediaAnalyzer.scala:16-44 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWikipediaAnalyzer.scala:16-44 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWikipediaAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiWikipediaAnalyzer.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 (29 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetNetworksPageBuilder.scala:25 — backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetNetworksPageBuilder.scala:25-53 | server/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetNetworksPageBuilder.scala:25-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetNetworksPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/subset/SubsetNetworksPageBuilder.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 (29 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorMultiGpxAdd.scala:55 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorMultiGpxAdd.scala:55-83 | server/src/main/scala/kpn/server/monitor/route/update/MonitorMultiGpxAdd.scala:55-83 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorMultiGpxAdd.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorMultiGpxAdd.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/monitor/route/update/MonitorMultiGpxAdd.scala:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (29 lines × 2) backend/src/main/scala/kpn/tools/code/CodecWriter.scala:280 — backend/src/main/scala/kpn/tools/code/CodecWriter.scala:280-308 | server/src/main/scala/kpn/tools/code/CodecWriter.scala:280-308 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/CodecWriter.scala` and `server/src/main/scala/kpn/tools/code/CodecWriter.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:31-59 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:31-59 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) backend/api/src/main/scala/kpn/api/common/NodeInfo.scala:27 — backend/api/src/main/scala/kpn/api/common/NodeInfo.scala:27-55 | server/src/main/scala/kpn/api/common/NodeInfo.scala:27-55 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/NodeInfo.scala` and `server/src/main/scala/kpn/api/common/NodeInfo.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 (29 lines × 2) backend/src/main/scala/kpn/database/actions/networks/NetworkPipeline.scala:15 — backend/src/main/scala/kpn/database/actions/networks/NetworkPipeline.scala:15-43 | server/src/main/scala/kpn/database/actions/networks/NetworkPipeline.scala:15-43 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/NetworkPipeline.scala` and `server/src/main/scala/kpn/database/actions/networks/NetworkPipeline.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 (29 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructureFragment.scala:7 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructureFragment.scala:7-35 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructureFragment.scala:7-35 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructureFragment.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/StructureFragment.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 (29 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIds.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIds.scala:14-42 | server/src/main/scala/kpn/server/analyzer/engine/context/ElementIds.scala:14-42 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIds.scala` and `server/src/main/scala/kpn/server/analyzer/engine/context/ElementIds.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 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 `backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIds.scala:14` 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 (29 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Line.scala:7 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Line.scala:7-35 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Line.scala:7-35 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Line.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Line.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 `backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Line.scala:7` 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.
D35 · Change Coupling · Change coupling · ×17
  • Change coupling: location-nodes-page.component.ts ↔ location-routes-page.component.ts frontend/src/app/analysis/location/internal/nodes/location-nodes-page.component.ts:1 — `frontend/src/app/analysis/location/internal/nodes/location-nodes-page.component.ts` and `frontend/src/app/analysis/location/internal/routes/location-routes-page.component.ts` change together 91% of the time (10 of the 11 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 10 shared commits counted here, the most recent 3 are `63b3607c` shared parent for location pages; `1d08a553` improve user interface - location filters; `ca10547a` #379 signal service in location pages (at that commit the files were still `frontend/src/app/analysis/location/nodes/location-nodes-page.component.ts` and `frontend/src/app/analysis/location/routes/location-routes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: network-nodes-page.component.ts ↔ network-routes-page.component.ts frontend/src/app/analysis/network/internal/nodes/network-nodes-page.component.ts:1 — `frontend/src/app/analysis/network/internal/nodes/network-nodes-page.component.ts` and `frontend/src/app/analysis/network/internal/routes/network-routes-page.component.ts` change together 85% of the time (17 of the 20 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 17 shared commits counted here, the most recent 3 are `9f908c16` shared parent for network pages; `92f085b2` improve user interface - translations; `d3a3c076` improve user interface - node and route tables (at that commit the files were still `frontend/src/app/analysis/network/nodes/network-nodes-page.component.ts` and `frontend/src/app/analysis/network/routes/network-routes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: network-facts-page.component.ts ↔ network-nodes-page.component.ts frontend/src/app/analysis/network/internal/facts/network-facts-page.component.ts:1 — `frontend/src/app/analysis/network/internal/facts/network-facts-page.component.ts` and `frontend/src/app/analysis/network/internal/nodes/network-nodes-page.component.ts` change together 81% of the time (17 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 17 shared commits counted here, the most recent 3 are `9f908c16` shared parent for network pages; `92f085b2` improve user interface - translations; `b729237d` #379 signal service in network pages (at that commit the files were still `frontend/src/app/analysis/network/facts/network-facts-page.component.ts` and `frontend/src/app/analysis/network/nodes/network-nodes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: network-facts-page.component.ts ↔ network-routes-page.component.ts frontend/src/app/analysis/network/internal/facts/network-facts-page.component.ts:1 — `frontend/src/app/analysis/network/internal/facts/network-facts-page.component.ts` and `frontend/src/app/analysis/network/internal/routes/network-routes-page.component.ts` change together 80% of the time (16 of the 20 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 16 shared commits counted here, the most recent 3 are `9f908c16` shared parent for network pages; `92f085b2` improve user interface - translations; `b729237d` #379 signal service in network pages (at that commit the files were still `frontend/src/app/analysis/network/facts/network-facts-page.component.ts` and `frontend/src/app/analysis/network/routes/network-routes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: RouteDataTool.scala ↔ RouteAnalysisContextReport.scala server/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:1 — `server/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.scala` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `91160adf` #368 migrate edge analysis (at that commit the files were still `server/src/main/scala/kpn/core/tools/next/support/RouteAnalysisTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/RouteAnalysisContextReport.scala`); `efbf8294` #368 improve path analysis (at that commit the files were still `server/src/main/scala/kpn/core/tools/next/support/RouteAnalysisTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/RouteAnalysisContextReport.scala`); `a63e3434` #368 new segment analysis (at that commit the files were still `server/src/main/scala/kpn/core/tools/next/support/RouteAnalysisTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/RouteAnalysisContextReport.scala`) — run `git show` on any of them.
  • Change coupling: RouteStructureRowsAnalyzer.scala ↔ RouteDetailsPageExample.scala server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:1 — `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteDetailsPageExample.scala` change together 64% of the time (9 of the 14 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 9 shared commits counted here, the most recent 3 are `d74fdfdb` refactor monitor - route structure; `03272eb4` improve user interface - include segmentIds and pathIds in RouteStruc…; `ac9d72a6` improve route member poi analysis (at that commit the file was still `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/route/RouteStructureRowsAnalyzer.scala`) — run `git show` on any of them.
  • Change coupling: location-map-page.component.ts ↔ location-nodes-page.component.ts frontend/src/app/analysis/location/internal/map/location-map-page.component.ts:1 — `frontend/src/app/analysis/location/internal/map/location-map-page.component.ts` and `frontend/src/app/analysis/location/internal/nodes/location-nodes-page.component.ts` change together 64% of the time (7 of the 11 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 7 shared commits counted here, the most recent 3 are `63b3607c` shared parent for location pages; `ca10547a` #379 signal service in location pages (at that commit the files were still `frontend/src/app/analysis/location/map/location-map-page.component.ts` and `frontend/src/app/analysis/location/nodes/location-nodes-page.component.ts`); `f07b6f0a` ngrx - improve state handling in location pages (at that commit the files were still `client/src/app/analysis/location/map/location-map-page.component.ts` and `client/src/app/analysis/location/nodes/location-nodes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: node-changes-page.component.ts ↔ route-changes-page.component.ts frontend/src/app/analysis/node/internal/changes/node-changes-page.component.ts:1 — `frontend/src/app/analysis/node/internal/changes/node-changes-page.component.ts` and `frontend/src/app/analysis/route/internal/changes/route-changes-page.component.ts` change together 61% of the time (22 of the 36 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 22 shared commits counted here, the most recent 3 are `670778a3` improve user interface - improve pages; `6dcd0d26` #333 switch to OAuth2 - wip (at that commit the files were still `frontend/src/app/analysis/node/changes/_node-changes-page.component.ts` and `frontend/src/app/analysis/route/changes/_route-changes-page.component.ts`); `c050dec7` #209 add "situation on" in node and route changes pages (at that commit the files were still `client/src/app/analysis/node/changes/_node-changes-page.component.ts` and `client/src/app/analysis/route/changes/_route-changes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: route-details-page.service.ts ↔ route-segments-page.component.ts frontend/src/app/analysis/route/internal/details/route-details-page.service.ts:1 — `frontend/src/app/analysis/route/internal/details/route-details-page.service.ts` and `frontend/src/app/analysis/route/internal/segments/route-segments-page.component.ts` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3d943982` improve map - route segment and path maps; `1f83e484` improve route pages navigation; `83ef23a8` improve route pages navigation — run `git show` on any of them.
  • Change coupling: api.service.ts ↔ AnalysisFacade.scala frontend/src/app/shared/services/api.service.ts:1 — `frontend/src/app/shared/services/api.service.ts` and `server/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala` change together 59% of the time (20 of the 34 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `6c69ceb1` improve map - subset networks markers; `2f567d1c` mongo bson codecs - Country and RouteType converters + fix overview page; `0a17487e` refactor monitor - route tab pages — run `git show` on any of them.
  • Change coupling: overview-list-stat-table.component.ts ↔ overview-table-header.component.ts frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts:1 — `frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts` and `frontend/src/app/analysis/overview/internal/overview/components/overview-table-header.component.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3783a448` add Poland; `182d5980` #323 node networks in Denmark (at that commit the files were still `client/libs/analysis/src/lib/overview/overview/overview-list-stat-table.component.ts` and `client/libs/analysis/src/lib/overview/overview/overview-table-header.component.ts`); `eb8e4e44` #321 support horse riding node networks in France (at that commit the files were still `client/libs/analysis/src/lib/overview/overview/overview-list-stat-table.component.ts` and `client/libs/analysis/src/lib/overview/overview/overview-table-header.component.ts`) — run `git show` on any of them.
  • Change coupling: location-map-page.component.ts ↔ location-routes-page.component.ts frontend/src/app/analysis/location/internal/map/location-map-page.component.ts:1 — `frontend/src/app/analysis/location/internal/map/location-map-page.component.ts` and `frontend/src/app/analysis/location/internal/routes/location-routes-page.component.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `63b3607c` shared parent for location pages; `ca10547a` #379 signal service in location pages (at that commit the files were still `frontend/src/app/analysis/location/map/location-map-page.component.ts` and `frontend/src/app/analysis/location/routes/location-routes-page.component.ts`); `f07b6f0a` ngrx - improve state handling in location pages (at that commit the files were still `client/src/app/analysis/location/map/location-map-page.component.ts` and `client/src/app/analysis/location/routes/location-routes-page.component.ts`) — run `git show` on any of them.
  • Change coupling: BaseRouteMemberAnalyzer.scala ↔ RouteStructureRowsAnalyzer.scala server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:1 — `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala` change together 57% of the time (8 of the 14 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 8 shared commits counted here, the most recent 3 are `03272eb4` improve user interface - include segmentIds and pathIds in RouteStruc…; `ac9d72a6` improve route member poi analysis (at that commit the files were still `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/detail/RouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/route/RouteStructureRowsAnalyzer.scala`); `0990b539` improve route member display - wayType analysis (at that commit the files were still `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/detail/RouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/analyzers/route/RouteStructureRowsAnalyzer.scala`) — run `git show` on any of them.
  • Change coupling: TileViewTool.scala ↔ ZoomLevel.scala server/src/main/scala/kpn/core/tools/tile/TileViewTool.scala:1 — `server/src/main/scala/kpn/core/tools/tile/TileViewTool.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/ZoomLevel.scala` change together 55% of the time (6 of the 11 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 6 shared commits counted here, the most recent 3 are `bf9d8155` refactor analysis - improve tile processing (at that commit the file was still `server/src/main/scala/kpn/api/common/tiles/ZoomLevel.scala`); `c0f4b985` refactor analysis - improve tile processing (at that commit the file was still `server/src/main/scala/kpn/api/common/tiles/ZoomLevel.scala`); `addb8885` refactor analysis - improve opendata tile processing (at that commit the file was still `server/src/main/scala/kpn/api/common/tiles/ZoomLevel.scala`) — run `git show` on any of them.
  • Change coupling: monitor.service.ts ↔ MonitorFacade.scala frontend/src/app/monitor/internal/monitor.service.ts:1 — `frontend/src/app/monitor/internal/monitor.service.ts` and `server/src/main/scala/kpn/server/monitor/MonitorFacade.scala` change together 50% of the time (9 of the 18 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `7302a96e` refactor monitor - route members in separate tab; `c76b86cf` #293 monitor superroutes - multi-gpx routes (at that commit the file was still `client/libs/monitor/src/lib/monitor.service.ts`); `5ed99792` #293 monitor superroutes - wip (at that commit the files were still `client/src/app/monitor/monitor.service.ts` and `server/src/main/scala/kpn/server/api/monitor/MonitorFacade.scala`) — run `git show` on any of them.
  • Change coupling: node-changes-page.component.ts ↔ node-page-header.component.ts frontend/src/app/analysis/node/internal/changes/node-changes-page.component.ts:1 — `frontend/src/app/analysis/node/internal/changes/node-changes-page.component.ts` and `frontend/src/app/analysis/node/internal/components/node-page-header.component.ts` change together 50% of the time (9 of the 18 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 9 shared commits counted here, the most recent 3 are `ccbb219c` shared parent for node pages; `670778a3` improve user interface - improve pages; `f1994114` cleanup node map page (at that commit the files were still `frontend/src/app/analysis/node/changes/node-changes-page.component.ts` and `frontend/src/app/analysis/node/components/node-page-header.component.ts`) — run `git show` on any of them.
  • Change coupling: route-page-header.component.ts ↔ route-segments-page.component.ts frontend/src/app/analysis/route/internal/components/route-page-header.component.ts:1 — `frontend/src/app/analysis/route/internal/components/route-page-header.component.ts` and `frontend/src/app/analysis/route/internal/segments/route-segments-page.component.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 5 shared commits counted here, the most recent 3 are `ccf97b4d` refactor monitor - shared parent for route tab pages; `16787ead` refactor monitor - shared parent for route tab pages; `0a17487e` refactor monitor - route tab pages — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×16
  • Duplicated block (33 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:78 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:78-110 | server/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala:78-110 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderNetherlands.scala` as WHOLE FILES: this scan already matched 3 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 (33 lines × 2) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:62 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:62-94 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:62-94 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (33 lines × 2) backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:37 — backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:37-69 | server/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:37-69 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:384 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:384-416 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:384-416 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:384` 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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala:27 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala:27-59 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala:27-59 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.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 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 `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala:27` 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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileCoordinateSimplifier.scala:44 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileCoordinateSimplifier.scala:44-76 | server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileCoordinateSimplifier.scala:44-76 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileCoordinateSimplifier.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileCoordinateSimplifier.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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileDataNodeBuilder.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileDataNodeBuilder.scala:31-63 | server/src/main/scala/kpn/server/analyzer/engine/tiles/TileDataNodeBuilder.scala:31-63 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileDataNodeBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/TileDataNodeBuilder.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 (33 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:74 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:74-106 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala:74-106 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageBuilder.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 (33 lines × 2) backend/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala:85 — backend/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala:85-117 | server/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala:85-117 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala` and `server/src/main/scala/kpn/server/api/status/SystemStatusMonitor.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (33 lines × 2) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala:63 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala:63-95 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala:63-95 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteChangePageBuilder.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 (33 lines × 2) backend/api/src/main/scala/kpn/api/common/route/LinkInfo.scala:5 — backend/api/src/main/scala/kpn/api/common/route/LinkInfo.scala:5-37 | server/src/main/scala/kpn/api/common/route/LinkInfo.scala:5-37 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/route/LinkInfo.scala` and `server/src/main/scala/kpn/api/common/route/LinkInfo.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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala:12-44 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala:12-44 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.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. Note first that the copies are not typed on the same thing: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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 (33 lines × 2) backend/src/main/scala/kpn/core/gpx/GpxRoute.scala:12 — backend/src/main/scala/kpn/core/gpx/GpxRoute.scala:12-44 | server/src/main/scala/kpn/core/gpx/GpxRoute.scala:12-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/gpx/GpxRoute.scala` and `server/src/main/scala/kpn/core/gpx/GpxRoute.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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:156 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:156-188 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:156-188 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (33 lines × 2) backend/src/main/scala/kpn/core/doc/NodeDoc.scala:26 — backend/src/main/scala/kpn/core/doc/NodeDoc.scala:26-58 | server/src/main/scala/kpn/core/doc/NodeDoc.scala:25-57 — before extracting anything, compare `backend/src/main/scala/kpn/core/doc/NodeDoc.scala` and `server/src/main/scala/kpn/core/doc/NodeDoc.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 (33 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tile/TileTask.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/tile/TileTask.scala:9-41 | server/src/main/scala/kpn/server/analyzer/engine/tile/TileTask.scala:9-41 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/TileTask.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/TileTask.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×16
  • Duplicated block (31 lines × 2) backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:15 — backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:15-45 | server/src/main/scala/kpn/api/common/monitor/MonitorRouteRelation.scala:16-46 — before extracting anything, compare `backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala` and `server/src/main/scala/kpn/api/common/monitor/MonitorRouteRelation.scala` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:15` 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 (31 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:72 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:72-102 | server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:72-102 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:22 — backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:22-52 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:22-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:22` 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 (31 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:52 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:52-82 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:52-82 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.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 (31 lines × 2) backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:26 — backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:26-56 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:26-56 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala` and `server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.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 (31 lines × 2) backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:38 — backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:38-68 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:38-68 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala` and `server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.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. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:518 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:518-548 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:518-548 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:186 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:186-216 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala:186-216 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNameAnalyzer.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 226 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala:103 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala:103-133 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala:103-133 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/segment/SurfaceAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.scala:26 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.scala:26-56 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.scala:26-56 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/base/BaseNetworkChangeAnalyzer.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 (31 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:15 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:15-45 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:15-45 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.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 (31 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:74 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:74-104 | server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:74-104 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala:36 — backend/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala:36-66 | server/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala:36-66 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationImageWriter.scala` and `server/src/main/scala/kpn/core/tools/location/LocationImageWriter.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 (31 lines × 2) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:14 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:14-44 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:14-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/analysis/RouteMemberNode.scala:12 — backend/src/main/scala/kpn/core/analysis/RouteMemberNode.scala:12-42 | server/src/main/scala/kpn/core/analysis/RouteMemberNode.scala:12-42 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/RouteMemberNode.scala` and `server/src/main/scala/kpn/core/analysis/RouteMemberNode.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 (31 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkDocAnalyzer.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkDocAnalyzer.scala:8-38 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkDocAnalyzer.scala:8-38 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkDocAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkDocAnalyzer.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×14
  • Edited copy of a member (8 corresponding lines) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:73 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:73-80 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteStatesTool.scala:73-80 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:113 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:113-120 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:113-120 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) backend/src/main/scala/kpn/core/util/Triplet.scala:4 — backend/src/main/scala/kpn/core/util/Triplet.scala:4-11 | server/src/main/scala/kpn/core/util/Triplet.scala:4-11 — 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) backend/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala:9 — backend/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala:9-16 | server/src/main/scala/kpn/core/history/NodeMovedAnalyzer.scala:9-16 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:269 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:269-276 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:269-276 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:156 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:156-163 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/RelationAnalyzer.scala:156-163 — 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) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:20 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:20-27 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorDeviations.scala:20-27 — 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) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:23 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.scala:23-30 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteSegments.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) backend/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala:30 — backend/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala:30-37 | server/src/main/scala/kpn/server/api/qr/QrCodeFacade.scala:30-37 — 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) backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:62 — backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:62-69 | server/src/main/scala/kpn/core/replicate/UpdaterTool.scala:62-69 — 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) backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala:10 — backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala:10-17 | server/src/main/scala/kpn/server/monitor/repository/MonitorRouteDelete.scala:10-17 — 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) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala:24 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala:24-31 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRoutes.scala:24-31 — 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) backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:140 — backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:140-147 | server/src/main/scala/kpn/core/replicate/UpdaterTool.scala:140-147 — 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorRouteStructureLoader.scala:46 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorRouteStructureLoader.scala:46-53 | server/src/main/scala/kpn/server/monitor/route/update/MonitorRouteStructureLoader.scala:45-52 — 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 · Duplicated block (34 lines × 2) · ×14
  • Duplicated block (34 lines × 2) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:92 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:92-125 | server/src/main/scala/kpn/api/custom/Timestamp.scala:83-116 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala` and `server/src/main/scala/kpn/api/custom/Timestamp.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:128 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:128-161 | server/src/main/scala/kpn/api/custom/Timestamp.scala:119-152 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala` and `server/src/main/scala/kpn/api/custom/Timestamp.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:105 — backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala:105-138 | server/src/main/scala/kpn/core/replicate/UpdaterTool.scala:105-138 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/UpdaterTool.scala` and `server/src/main/scala/kpn/core/replicate/UpdaterTool.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala:28 — backend/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala:28-61 | server/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala:28-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/ImageGenerationTool.scala` and `server/src/main/scala/kpn/core/tools/support/ImageGenerationTool.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 (34 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:82 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:82-115 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:82-115 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala:34 — backend/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala:34-67 | server/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala:34-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/AnalysisDataDiffReporter.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeDeleteProcessor.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeDeleteProcessor.scala:14-47 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeDeleteProcessor.scala:14-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeDeleteProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeDeleteProcessor.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 (34 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationNodesPageExample.scala:18 — backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationNodesPageExample.scala:18-51 | server/src/main/scala/kpn/server/api/analysis/pages/location/LocationNodesPageExample.scala:18-51 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationNodesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/location/LocationNodesPageExample.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 (34 lines × 2) backend/src/main/scala/kpn/core/history/TagDiffAnalyzer.scala:56 — backend/src/main/scala/kpn/core/history/TagDiffAnalyzer.scala:56-89 | server/src/main/scala/kpn/core/history/TagDiffAnalyzer.scala:56-89 — before extracting anything, compare `backend/src/main/scala/kpn/core/history/TagDiffAnalyzer.scala` and `server/src/main/scala/kpn/core/history/TagDiffAnalyzer.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 (34 lines × 2) backend/src/main/scala/kpn/server/repository/FactRepository.scala:41 — backend/src/main/scala/kpn/server/repository/FactRepository.scala:41-74 | server/src/main/scala/kpn/server/repository/FactRepository.scala:41-74 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/FactRepository.scala` and `server/src/main/scala/kpn/server/repository/FactRepository.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/repository/FactRepository.scala:94 — backend/src/main/scala/kpn/server/repository/FactRepository.scala:94-127 | server/src/main/scala/kpn/server/repository/FactRepository.scala:94-127 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/FactRepository.scala` and `server/src/main/scala/kpn/server/repository/FactRepository.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 81 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/location/LocationGeometry.scala:13 — backend/src/main/scala/kpn/core/tools/location/LocationGeometry.scala:13-46 | server/src/main/scala/kpn/core/tools/location/LocationGeometry.scala:13-46 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationGeometry.scala` and `server/src/main/scala/kpn/core/tools/location/LocationGeometry.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 `backend/src/main/scala/kpn/core/tools/location/LocationGeometry.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. Note first that the copies are not typed on the same thing: `Storable` names `kpn.api.id.Storable` in one and `kpn.core.doc.Storable` 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 (34 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetProcessor.scala:20 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetProcessor.scala:20-53 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetProcessor.scala:20-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetProcessor.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 (34 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiRef.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiRef.scala:11-44 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiRef.scala:11-44 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiRef.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiRef.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 `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiRef.scala:11` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×13
  • Edited copy of a member (7 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeImpactAnalyzer.scala:13 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeImpactAnalyzer.scala:13-19 | server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeImpactAnalyzer.scala:13-19 — 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) backend/src/main/scala/kpn/core/util/Haversine.scala:29 — backend/src/main/scala/kpn/core/util/Haversine.scala:29-35 | server/src/main/scala/kpn/core/util/Haversine.scala:29-35 — 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) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:130 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:130-136 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:130-136 — 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) backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:63 — backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:63-69 | server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:63-69 — 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) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java:67 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java:67-73 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java:67-73 — 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) backend/src/main/scala/kpn/core/builders/WayLineUtil.scala:12 — backend/src/main/scala/kpn/core/builders/WayLineUtil.scala:12-18 | server/src/main/scala/kpn/api/common/route/WayLine.scala:11-17 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala:46 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala:46-52 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzer.scala:46-52 — 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) backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:15 — backend/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:15-21 | server/src/main/scala/kpn/core/tools/location/InterpretedLocationJson.scala:15-21 — 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:269 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:269-275 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:269-275 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala:29 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala:29-35 | server/src/main/scala/kpn/server/analyzer/engine/analysis/common/SurveyDateAnalyzer.scala:29-35 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:24 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:24-30 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeLabelsAnalyzer.scala:24-30 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:101 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:101-107 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:101-107 — 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) backend/api/src/main/scala/kpn/api/common/changes/ChangeSetData.scala:26 — backend/api/src/main/scala/kpn/api/common/changes/ChangeSetData.scala:26-32 | server/src/main/scala/kpn/api/common/changes/ChangeSetData.scala:26-32 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×12
  • Low cohesion: OperationActions (LCOM4 21) backend/src/main/scala/kpn/core/tools/operation/OperationActions.scala:10 — OperationActions's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OperationActions (LCOM4 21) server/src/main/scala/kpn/core/tools/operation/OperationActions.scala:10 — OperationActions's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DatabaseCollection (LCOM4 10) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:32 — DatabaseCollection's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DatabaseCollection (LCOM4 10) server/src/main/scala/kpn/database/base/DatabaseCollection.scala:32 — DatabaseCollection's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MetricsRepository (LCOM4 7) backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:27 — MetricsRepository'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: MetricsRepository (LCOM4 7) server/src/main/scala/kpn/server/repository/MetricsRepository.scala:27 — MetricsRepository'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: MonitorUpdateCommon (LCOM4 6) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:16 — MonitorUpdateCommon's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MonitorUpdateCommon (LCOM4 6) server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:16 — MonitorUpdateCommon's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: NetworkNodeDiffAnalyzer (LCOM4 5) backend/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.scala:12 — NetworkNodeDiffAnalyzer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: NetworkNodeDiffAnalyzer (LCOM4 5) server/src/main/scala/kpn/core/history/NetworkNodeDiffAnalyzer.scala:12 — NetworkNodeDiffAnalyzer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OverpassRepositoryImpl (LCOM4 4) backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:28 — OverpassRepositoryImpl's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OverpassRepositoryImpl (LCOM4 4) server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:28 — OverpassRepositoryImpl's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×11
  • Duplicated block (40 lines × 2) backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:78 — backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:78-117 | server/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala:78-117 — before extracting anything, compare `backend/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala` and `server/src/main/scala/kpn/core/planner/graph/NodeNetworkGraph.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/replicate/OverpassUpdate.scala:28 — backend/src/main/scala/kpn/core/replicate/OverpassUpdate.scala:28-67 | server/src/main/scala/kpn/core/replicate/OverpassUpdate.scala:28-67 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/OverpassUpdate.scala` and `server/src/main/scala/kpn/core/replicate/OverpassUpdate.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 (40 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileIds.scala:36 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileIds.scala:36-75 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileIds.scala:36-75 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileIds.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileIds.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 (40 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:175 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:175-214 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:175-214 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:49 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:49-88 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:49-88 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.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 (40 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala:23 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala:23-62 | server/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala:23-62 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/PoiTilesBuilder.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 (40 lines × 2) backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:68 — backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:68-107 | server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:68-107 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` and `server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 273 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/api/src/main/scala/kpn/api/common/ChangeSetSummary.scala:20 — backend/api/src/main/scala/kpn/api/common/ChangeSetSummary.scala:20-59 | server/src/main/scala/kpn/api/common/ChangeSetSummary.scala:20-59 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/ChangeSetSummary.scala` and `server/src/main/scala/kpn/api/common/ChangeSetSummary.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 (40 lines × 2) backend/api/src/main/scala/kpn/api/custom/Tags.scala:7 — backend/api/src/main/scala/kpn/api/custom/Tags.scala:7-46 | server/src/main/scala/kpn/api/custom/Tags.scala:7-46 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/custom/Tags.scala` and `server/src/main/scala/kpn/api/custom/Tags.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 (40 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationDefinition.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationDefinition.scala:8-47 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationDefinition.scala:8-47 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationDefinition.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationDefinition.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/LocationDefinition.scala:8` 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 (40 lines × 2) backend/src/main/scala/kpn/server/analyzer/load/AnalysisContextLoader.scala:22 — backend/src/main/scala/kpn/server/analyzer/load/AnalysisContextLoader.scala:22-61 | server/src/main/scala/kpn/server/analyzer/load/AnalysisContextLoader.scala:22-61 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/load/AnalysisContextLoader.scala` and `server/src/main/scala/kpn/server/analyzer/load/AnalysisContextLoader.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.
AX2 · Stateful singletons · Stateful singleton · ×10
  • Stateful singleton: AppMonitor backend/src/main/scala/kpn/monitor/AppMonitor.scala:22 — `AppMonitor` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (lastMail; e.g. `lastMail` in `throttledSend` at line 79). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: Analyzer backend/src/main/scala/kpn/server/analyzer/Analyzer.scala:17 — `Analyzer` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (active; e.g. `active` in `process` at line 56). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: ElevationRepository backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:17 — `ElevationRepository` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (cache; e.g. `cache` in `elevationFor` at line 32). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: KnownPoiCacheImpl backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:10 — `KnownPoiCacheImpl` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (knownPois; e.g. `knownPois` in `add` at line 41). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: BlacklistRepositoryImpl backend/src/main/scala/kpn/server/repository/BlacklistRepositoryImpl.scala:8 — `BlacklistRepositoryImpl` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (cachedBlackList, cachedTimestamp; e.g. `cachedBlackList` in `get` at line 20). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: AppMonitor server/src/main/scala/kpn/monitor/AppMonitor.scala:22 — `AppMonitor` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (lastMail; e.g. `lastMail` in `throttledSend` at line 79). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: Analyzer server/src/main/scala/kpn/server/analyzer/Analyzer.scala:17 — `Analyzer` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (active; e.g. `active` in `process` at line 56). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: ElevationRepository server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:17 — `ElevationRepository` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (cache; e.g. `cache` in `elevationFor` at line 32). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: KnownPoiCacheImpl server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:10 — `KnownPoiCacheImpl` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (knownPois; e.g. `knownPois` in `add` at line 41). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
  • Stateful singleton: BlacklistRepositoryImpl server/src/main/scala/kpn/server/repository/BlacklistRepositoryImpl.scala:8 — `BlacklistRepositoryImpl` is one shared instance (@Component: every request runs on it, concurrently, on the server's thread pool) but writes its own state outside any lock (cachedBlackList, cachedTimestamp; e.g. `cachedBlackList` in `get` at line 20). Two requests that interleave lose an update, and a mutable collection written concurrently can corrupt.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×10
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:42 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:42-52 | server/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:42-52 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala:96 — backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala:96-106 | server/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilder.scala:96-106 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:83 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:83-93 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:83-93 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:34 — backend/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:34-44 | server/src/main/scala/kpn/core/replicate/UpdaterToolOptions.scala:34-44 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/ElementIdAnalyzer.scala:15 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ElementIdAnalyzer.scala:15-25 | server/src/main/scala/kpn/server/analyzer/engine/changes/ElementIdAnalyzer.scala:15-25 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala:6 — backend/api/src/main/scala/kpn/api/common/data/raw/RawData.scala:6-16 | server/src/main/scala/kpn/api/common/data/raw/RawData.scala:6-16 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:97 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:97-107 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:97-107 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:228 — backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:228-238 | server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:228-238 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:12 — backend/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:12-22 | server/src/main/scala/kpn/core/poi/tags/TagExpressionFormatter.scala:12-22 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:81 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:81-91 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeUpdateProcessor.scala:81-91 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×10
  • Duplicated block (38 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkExtraAnalyzer.scala:29 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkExtraAnalyzer.scala:29-66 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkExtraAnalyzer.scala:29-66 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkExtraAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkExtraAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:108 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:108-145 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:108-145 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:108` 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 (38 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:492 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:492-529 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:492-529 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:566 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:566-603 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:566-603 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/PoiPageBuilder.scala:22 — backend/src/main/scala/kpn/server/api/analysis/pages/PoiPageBuilder.scala:22-59 | server/src/main/scala/kpn/server/api/analysis/pages/PoiPageBuilder.scala:22-59 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/PoiPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/PoiPageBuilder.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 (38 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationEditPageBuilder.scala:26 — backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationEditPageBuilder.scala:26-63 | server/src/main/scala/kpn/server/api/analysis/pages/location/LocationEditPageBuilder.scala:26-63 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationEditPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/location/LocationEditPageBuilder.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 (38 lines × 2) backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:199 — backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:199-236 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:199-236 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala` and `server/src/main/scala/kpn/server/api/status/StatusFacade.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 235 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkRelationAnalyzerImpl.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkRelationAnalyzerImpl.scala:16-53 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkRelationAnalyzerImpl.scala:16-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkRelationAnalyzerImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/NetworkRelationAnalyzerImpl.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 (38 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageBuilder.scala:35 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageBuilder.scala:35-72 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageBuilder.scala:35-72 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageBuilder.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 (38 lines × 2) backend/src/main/scala/kpn/core/analysis/RouteMemberWay.scala:24 — backend/src/main/scala/kpn/core/analysis/RouteMemberWay.scala:24-61 | server/src/main/scala/kpn/core/analysis/RouteMemberWay.scala:24-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/RouteMemberWay.scala` and `server/src/main/scala/kpn/core/analysis/RouteMemberWay.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×10
  • Duplicated block (36 lines × 2) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:44 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:44-79 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:44-79 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (36 lines × 2) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTileIds.scala:29 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTileIds.scala:29-64 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTileIds.scala:29-64 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTileIds.scala` and `server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorReferenceTileIds.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 (36 lines × 2) backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNetworkChangeBuilder.scala:23 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNetworkChangeBuilder.scala:23-58 | server/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNetworkChangeBuilder.scala:23-58 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNetworkChangeBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/InitialNetworkChangeBuilder.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 (36 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationRoutesPageExample.scala:15 — backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationRoutesPageExample.scala:15-50 | server/src/main/scala/kpn/server/api/analysis/pages/location/LocationRoutesPageExample.scala:15-50 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationRoutesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/location/LocationRoutesPageExample.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 (36 lines × 2) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteUpdatePageBuilder.scala:19 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteUpdatePageBuilder.scala:19-54 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteUpdatePageBuilder.scala:19-54 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteUpdatePageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteUpdatePageBuilder.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 (36 lines × 2) backend/api/src/main/scala/kpn/api/common/Relation.scala:19 — backend/api/src/main/scala/kpn/api/common/Relation.scala:19-54 | server/src/main/scala/kpn/api/common/Relation.scala:19-54 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/Relation.scala` and `server/src/main/scala/kpn/api/common/Relation.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 (36 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/RouteLinkWay.scala:14 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/RouteLinkWay.scala:14-49 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/RouteLinkWay.scala:14-49 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/RouteLinkWay.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/RouteLinkWay.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 (36 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Tiles.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Tiles.scala:8-43 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Tiles.scala:8-43 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Tiles.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/Tiles.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 (36 lines × 2) backend/src/main/scala/kpn/server/api/planner/PlannerController.scala:28 — backend/src/main/scala/kpn/server/api/planner/PlannerController.scala:28-63 | server/src/main/scala/kpn/server/api/planner/PlannerController.scala:28-63 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/planner/PlannerController.scala` and `server/src/main/scala/kpn/server/api/planner/PlannerController.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 `backend/src/main/scala/kpn/server/api/planner/PlannerController.scala:28` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (36 lines × 2) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:45 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:45-80 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:45-80 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D3 · God Classes · TooManyMethods · ×8
  • TooManyMethods: MonitorRouteRepository backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:59 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: MonitorRouteRepository server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:59 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: ApiService frontend/src/app/shared/services/api.service.ts:68 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SymbolShape frontend/src/app/symbol/internal/symbol-shape.ts:1 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnalysisController backend/src/main/scala/kpn/server/api/analysis/AnalysisController.scala:63 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnalysisController server/src/main/scala/kpn/server/api/analysis/AnalysisController.scala:63 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnalysisFacade backend/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala:87 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnalysisFacade server/src/main/scala/kpn/server/api/analysis/AnalysisFacade.scala:87 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×8
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:11 — backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:11-27 | server/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:11-27 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:11 — backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:11-27 | server/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:11-27 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/server/monitor/route/update/MonitorAdd.scala:20 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorAdd.scala:20-36 | server/src/main/scala/kpn/server/monitor/route/update/MonitorAdd.scala:20-36 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala:26 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala:26-42 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffWaysAnalyzer.scala:26-42 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/core/poi/PoiLoader.scala:19 — backend/src/main/scala/kpn/core/poi/PoiLoader.scala:19-35 | server/src/main/scala/kpn/core/poi/PoiLoader.scala:19-35 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiTagAnalyzer.scala:14 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiTagAnalyzer.scala:14-30 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiTagAnalyzer.scala:14-30 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala:12-28 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffFactsAnalyzer.scala:12-28 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) backend/api/src/main/scala/kpn/api/common/Bounds.scala:16 — backend/api/src/main/scala/kpn/api/common/Bounds.scala:16-32 | server/src/main/scala/kpn/api/common/Bounds.scala:16-32 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×8
  • Edited copy of a member (3 corresponding lines) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:508 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:508-510 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:508-510 — 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) backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorAnalyzer.scala:103 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorAnalyzer.scala:103-105 | server/src/main/scala/kpn/server/analyzer/engine/monitor/analysis/MonitorAnalyzer.scala:103-105 — 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) backend/src/main/scala/kpn/core/data/DataBuilder.scala:95 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:95-97 | server/src/main/scala/kpn/core/data/DataBuilder.scala:95-97 — 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) backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:128 — backend/src/main/scala/kpn/core/files/FtpFileSystem.scala:128-130 | server/src/main/scala/kpn/core/files/FtpFileSystem.scala:128-130 — 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) backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:75 — backend/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:75-77 | server/src/main/scala/kpn/core/tools/support/FindSuspiciousExpectedRouteRelationsTags.scala:75-77 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:231 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:231-233 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:231-233 — 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) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:242 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:242-244 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:242-244 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:58 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:58-60 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.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.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×8
  • Duplicated block (49 lines × 2) backend/src/main/scala/kpn/core/tools/country/RingBuilder.scala:23 — backend/src/main/scala/kpn/core/tools/country/RingBuilder.scala:23-71 | server/src/main/scala/kpn/core/tools/country/RingBuilder.scala:23-71 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/country/RingBuilder.scala` and `server/src/main/scala/kpn/core/tools/country/RingBuilder.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 (49 lines × 2) backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:120 — backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:120-168 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:120-168 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` and `server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 209 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:206 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:206-254 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:206-254 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:206` 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 (49 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:173 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:173-221 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:174-222 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (49 lines × 2) backend/src/main/scala/kpn/tools/code/ClassInfoReader.scala:53 — backend/src/main/scala/kpn/tools/code/ClassInfoReader.scala:53-101 | server/src/main/scala/kpn/tools/code/ClassInfoReader.scala:53-101 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/ClassInfoReader.scala` and `server/src/main/scala/kpn/tools/code/ClassInfoReader.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/tools/code/Clazz.scala:72 — backend/src/main/scala/kpn/tools/code/Clazz.scala:72-120 | server/src/main/scala/kpn/tools/code/Clazz.scala:72-120 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/Clazz.scala` and `server/src/main/scala/kpn/tools/code/Clazz.scala` as WHOLE FILES: this scan already matched 3 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 (49 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetSummaryInfosBuilder.scala:28 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetSummaryInfosBuilder.scala:28-76 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetSummaryInfosBuilder.scala:28-76 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetSummaryInfosBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetSummaryInfosBuilder.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 (49 lines × 2) backend/src/main/scala/kpn/core/util/CoordinateUtil.scala:23 — backend/src/main/scala/kpn/core/util/CoordinateUtil.scala:23-71 | server/src/main/scala/kpn/core/util/CoordinateUtil.scala:23-71 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/CoordinateUtil.scala` and `server/src/main/scala/kpn/core/util/CoordinateUtil.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×8
  • Duplicated block (43 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:31-73 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:31-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:450 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:450-492 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:450-492 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:98 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:98-140 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:98-140 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:43 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:43-85 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:43-85 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.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 (43 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:64 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:64-106 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:64-106 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:64` 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 (43 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteEdgeReport.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteEdgeReport.scala:8-50 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteEdgeReport.scala:8-50 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteEdgeReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteEdgeReport.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 (43 lines × 2) backend/src/main/scala/kpn/server/repository/PoiRepositoryImpl.scala:26 — backend/src/main/scala/kpn/server/repository/PoiRepositoryImpl.scala:26-68 | server/src/main/scala/kpn/server/repository/PoiRepositoryImpl.scala:26-68 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/PoiRepositoryImpl.scala` and `server/src/main/scala/kpn/server/repository/PoiRepositoryImpl.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 (43 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:184 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:184-226 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:184-226 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` and `server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 468 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×8
  • Duplicated block (41 lines × 2) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts.scala:30 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts.scala:30-70 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts.scala:30-70 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetStatsCounts.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 (41 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:16-56 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:16-56 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.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 (41 lines × 2) backend/src/main/scala/kpn/database/actions/base/ChangesPipeline.scala:23 — backend/src/main/scala/kpn/database/actions/base/ChangesPipeline.scala:23-63 | server/src/main/scala/kpn/database/actions/base/ChangesPipeline.scala:23-63 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/base/ChangesPipeline.scala` and `server/src/main/scala/kpn/database/actions/base/ChangesPipeline.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 (41 lines × 2) backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerTool.scala:12 — backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerTool.scala:12-52 | server/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerTool.scala:12-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerTool.scala` and `server/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerTool.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 `backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerTool.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 (41 lines × 2) backend/src/main/scala/kpn/core/util/GeoJson.scala:24 — backend/src/main/scala/kpn/core/util/GeoJson.scala:24-64 | server/src/main/scala/kpn/core/util/GeoJson.scala:24-64 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/GeoJson.scala` and `server/src/main/scala/kpn/core/util/GeoJson.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 (41 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIdMap.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIdMap.scala:11-51 | server/src/main/scala/kpn/server/analyzer/engine/context/ElementIdMap.scala:11-51 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/context/ElementIdMap.scala` and `server/src/main/scala/kpn/server/analyzer/engine/context/ElementIdMap.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 (41 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:25-65 | server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala:25-65 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.scala` and `server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationRepository.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 (41 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java:1 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java:1-41 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java:1-41 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java` and `server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×8
  • Duplicated block (8 lines × 4) backend/api/src/main/scala/kpn/api/common/status/BarChart.scala:5 — backend/api/src/main/scala/kpn/api/common/status/BarChart.scala:5-12 | backend/api/src/main/scala/kpn/api/common/status/BarChart2D.scala:11-18 | server/src/main/scala/kpn/api/common/status/BarChart.scala:5-12 | server/src/main/scala/kpn/api/common/status/BarChart2D.scala:11-18 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/status/BarChart.scala` and `server/src/main/scala/kpn/api/common/status/BarChart.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 (8 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:290 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:290-297 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:48-55 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:290-297 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:48-55 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:57 — backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:57-64 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:43-50 | server/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:57-64 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:43-50 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:88 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:88-95 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:118-125 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:88-95 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:118-125 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.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 (8 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:87 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:87-94 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.scala:60-67 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:87-94 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.scala:60-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:27 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:27-34 | backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullNodeAnalyzer.scala:24-31 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala:27-34 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullNodeAnalyzer.scala:24-31 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNodeAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:31 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:31-38 | backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala:24-31 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:31-38 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullNetworkAnalyzer.scala:24-31 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:91 — backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:91-98 | backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteParser.scala:67-74 | server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:91-98 | server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankRouteParser.scala:67-74 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala` and `server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×8
  • Outbound HTTP without resilience backend/src/main/java/kpn/DownloadTool.java:23 — `WebClient.builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala:22 — `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/src/main/scala/kpn/server/config/UserService.scala:52 — `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/src/main/scala/kpn/server/search/Geocoder.scala:25 — `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience server/src/main/java/kpn/DownloadTool.java:23 — `WebClient.builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorRemoteImpl.scala:22 — `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience server/src/main/scala/kpn/server/config/UserService.scala:52 — `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience server/src/main/scala/kpn/server/search/Geocoder.scala:25 — `new RestTemplate(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
AC3 · Page structure · Data table has no header cells · ×7
  • Data table has no header cells frontend/src/app/analysis/changeset/internal/components/change-set-header.component.ts:15 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells frontend/src/app/analysis/node/internal/details/components/node-summary.component.ts:23 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells frontend/src/app/analysis/overview/internal/overview/components/overview-list-stat-table.component.ts:11 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells frontend/src/app/monitor/internal/components/monitor-changes.component.ts:45 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells frontend/src/app/monitor/internal/route/change/monitor-route-change-page.component.ts:46 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells frontend/src/app/monitor/internal/route/monitor-route-gaps.component.ts:13 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells frontend/src/app/tryout/structure/components/structure-table.component.ts:13 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×7
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/core/tools/tile/TileToolOptions.scala:11 — backend/src/main/scala/kpn/core/tools/tile/TileToolOptions.scala:11-28 | server/src/main/scala/kpn/core/tools/tile/TileToolOptions.scala:11-28 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:47 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:47-64 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffNodesAnalyzer.scala:47-64 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:105 — backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:105-122 | server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:105-122 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:33-50 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:33-50 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiMapillaryAnalyzer.scala:15 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiMapillaryAnalyzer.scala:15-32 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiMapillaryAnalyzer.scala:15-32 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/server/api/analysis/pages/ChangesPageBuilder.scala:24 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangesPageBuilder.scala:24-41 | server/src/main/scala/kpn/server/api/analysis/pages/ChangesPageBuilder.scala:24-41 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiTitleAnalyzer.scala:14 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiTitleAnalyzer.scala:14-31 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiTitleAnalyzer.scala:14-31 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) backend/src/main/scala/kpn/core/tools/support/LogoTool.scala:53 — backend/src/main/scala/kpn/core/tools/support/LogoTool.scala:53-68 | server/src/main/scala/kpn/core/tools/support/LogoTool.scala:53-68 — 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) backend/src/main/scala/kpn/server/config/BsonHttpMessageConverter.scala:30 — backend/src/main/scala/kpn/server/config/BsonHttpMessageConverter.scala:30-45 | server/src/main/scala/kpn/server/config/BsonHttpMessageConverter.scala:30-45 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:157 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:157-172 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:157-172 — 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) backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkRoutesPageBuilder.scala:20 — backend/src/main/scala/kpn/server/api/analysis/pages/network/NetworkRoutesPageBuilder.scala:20-35 | server/src/main/scala/kpn/server/api/analysis/pages/network/NetworkRoutesPageBuilder.scala:19-34 — 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) backend/base/src/main/scala/kpn/core/util/Util.scala:31 — backend/base/src/main/scala/kpn/core/util/Util.scala:31-46 | server/src/main/scala/kpn/core/util/Util.scala:33-48 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:55 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:55-70 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:55-70 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:15 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:15-30 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:15-30 — 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 (19 corresponding lines) · ×7
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:162 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:162-180 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/NodeNetworkStructureAnalyzer.scala:162-180 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:46 — backend/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:46-64 | server/src/main/scala/kpn/core/tools/support/DuplicateRoutesReport.scala:46-64 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:105 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:105-123 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/TileContext.scala:105-123 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/poi/image/OpeningHoursDemo.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/poi/image/OpeningHoursDemo.scala:10-28 | server/src/main/scala/kpn/server/analyzer/engine/poi/image/OpeningHoursDemo.scala:10-28 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteGeometryWayAnalyzer.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteGeometryWayAnalyzer.scala:12-30 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteGeometryWayAnalyzer.scala:12-30 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:120 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:120-138 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:120-138 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:35 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:35-53 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeProcessor.scala:35-53 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×7
  • Duplicated block (37 lines × 2) backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:35 — backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:35-71 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:35-71 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` and `server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 209 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (37 lines × 2) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:165 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:165-201 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:165-201 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:165` 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 (37 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/base/BaseNodeChangeAnalyzer.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/base/BaseNodeChangeAnalyzer.scala:25-61 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/base/BaseNodeChangeAnalyzer.scala:25-61 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/base/BaseNodeChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/base/BaseNodeChangeAnalyzer.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 (37 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:90 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:90-126 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:89-125 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:90` 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 (37 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala:51 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala:51-87 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala:51-87 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiQueryExecutor.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 (37 lines × 2) backend/src/main/scala/kpn/core/loadOld/OsmDataXmlWriter.scala:8 — backend/src/main/scala/kpn/core/loadOld/OsmDataXmlWriter.scala:8-44 | server/src/main/scala/kpn/core/loadOld/OsmDataXmlWriter.scala:8-44 — before extracting anything, compare `backend/src/main/scala/kpn/core/loadOld/OsmDataXmlWriter.scala` and `server/src/main/scala/kpn/core/loadOld/OsmDataXmlWriter.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 `backend/src/main/scala/kpn/core/loadOld/OsmDataXmlWriter.scala:8` 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 (37 lines × 2) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileReportTool.scala:9 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileReportTool.scala:9-45 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileReportTool.scala:9-45 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileReportTool.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileReportTool.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 `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileReportTool.scala:9` 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 (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:125 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:125-136 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:125-136 — 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) backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:92 — backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:92-103 | server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:92-103 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala:11-22 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteOneWayAnalyzer.scala:11-22 — 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) backend/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:69 — backend/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:69-80 | server/src/main/scala/kpn/core/tools/next/support/RouteDataTool.scala:69-80 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteGeometryWayAnalyzer.scala:36 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteGeometryWayAnalyzer.scala:36-47 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteGeometryWayAnalyzer.scala:36-47 — 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) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/PointTileCalculator.scala:32 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/PointTileCalculator.scala:32-43 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/PointTileCalculator.scala:32-43 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (6 members, 50+ identical tokens) backend/src/main/scala/kpn/core/data/DataBuilder.scala:113 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:113-128 | backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:91-106 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:82-97 | server/src/main/scala/kpn/core/data/DataBuilder.scala:113-128 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:91-106 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:82-97 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:79 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:79-96 | backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:180-197 | backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:16-36 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:79-96 | server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:180-197 | server/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:16-36 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:24 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:24-35 | backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:37-49 | backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:51-61 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:24-35 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:37-49 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:51-61 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:35 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:35-53 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:42-62 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala:33-53 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:35-53 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:42-62 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala:33-53 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:342 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:342-353 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:453-462 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:472-481 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:342-353 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:453-462 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:472-481 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:32 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:32-57 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:43-69 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:112-138 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:32-57 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:43-69 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:112-138 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×6
  • Edited copy of a member (13 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala:19-31 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteFactCombinationAnalyzer.scala:19-31 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala:10-22 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/base/analyzers/BaseNodeSurveyAnalyzer.scala:10-22 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:122 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:122-134 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteStructureRowsAnalyzer.scala:122-134 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala:139 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala:139-151 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeProcessor.scala:139-151 — 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:145 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:145-157 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:145-157 — 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:159 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:159-171 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:159-171 — 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 (6 corresponding lines) · ×6
  • Edited copy of a member (6 corresponding lines) backend/src/main/scala/kpn/core/tools/country/SkeletonParser.scala:8 — backend/src/main/scala/kpn/core/tools/country/SkeletonParser.scala:8-13 | server/src/main/scala/kpn/core/tools/country/SkeletonParser.scala:8-13 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala:46 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala:46-51 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetBuilder.scala:46-51 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:217 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:217-222 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:217-222 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:82 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:82-87 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:82-87 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:46 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:46-51 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:46-51 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala:70 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala:70-75 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteDetailsPageBuilder.scala:69-74 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×6
  • Duplicated block (46 lines × 2) backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala:22 — backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala:22-67 | server/src/main/scala/kpn/api/common/planner/LegEnd.scala:22-67 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala` and `server/src/main/scala/kpn/api/common/planner/LegEnd.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (46 lines × 2) backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:120 — backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:120-165 | server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:120-165 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` and `server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 273 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (46 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:99 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:99-144 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:99-144 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (46 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:282 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:282-327 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:282-327 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (46 lines × 2) backend/api/src/main/scala/kpn/api/common/changes/filter/ChangesFilter.scala:4 — backend/api/src/main/scala/kpn/api/common/changes/filter/ChangesFilter.scala:4-49 | server/src/main/scala/kpn/api/common/changes/filter/ChangesFilter.scala:6-88 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/changes/filter/ChangesFilter.scala` and `server/src/main/scala/kpn/api/common/changes/filter/ChangesFilter.scala` as WHOLE FILES: 89% 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 `backend/api/src/main/scala/kpn/api/common/changes/filter/ChangesFilter.scala:4` 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 (46 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNodeAnalysisReport.scala:9 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNodeAnalysisReport.scala:9-54 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNodeAnalysisReport.scala:9-54 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNodeAnalysisReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteNodeAnalysisReport.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×6
  • Duplicated block (42 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:115 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:115-156 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:115-156 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala` as WHOLE FILES: this scan already matched 6 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 (42 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:32 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:32-73 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:32-73 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (42 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationMapPageBuilder.scala:39 — backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationMapPageBuilder.scala:39-80 | server/src/main/scala/kpn/server/api/analysis/pages/location/LocationMapPageBuilder.scala:39-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationMapPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/location/LocationMapPageBuilder.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 (42 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/poi/MasterPoiAnalyzer.scala:31 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/MasterPoiAnalyzer.scala:31-72 | server/src/main/scala/kpn/server/api/analysis/pages/poi/MasterPoiAnalyzer.scala:31-72 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/poi/MasterPoiAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/poi/MasterPoiAnalyzer.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 (42 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationCalculator.scala:20 — backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationCalculator.scala:20-61 | server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationCalculator.scala:20-61 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationCalculator.scala` and `server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationCalculator.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. 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 (42 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tile/TileUpdater.scala:27 — backend/src/main/scala/kpn/server/analyzer/engine/tile/TileUpdater.scala:27-68 | server/src/main/scala/kpn/server/analyzer/engine/tile/TileUpdater.scala:27-68 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tile/TileUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tile/TileUpdater.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×6
  • Duplicated block (7 lines × 4) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:86 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:86-92 | backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:152-158 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:86-92 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:152-158 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:35 — backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:35-41 | backend/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala:57-63 | server/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:35-41 | server/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala:57-63 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala` and `server/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/src/main/scala/kpn/tools/code/codecs/TranslationsCodec.scala:64` calls `writeEndDocument` and `backend/src/main/scala/kpn/tools/code/codecs/PoeTranslationsCodec.scala:42` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 4) backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:85 — backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:85-91 | backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:54-60 | server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala:85-91 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:54-60 — before extracting anything, compare `backend/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` and `server/src/main/scala/kpn/core/poi/PoiQueryResultParser.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:329 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:329-335 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:276-282 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:329-335 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:276-282 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala:21 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala:21-27 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.scala:24-30 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala:21-27 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.scala:24-30 — `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryRouteNetworkReferences.scala` and `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteNetworkReferences.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 7 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 (7 lines × 4) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:197 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:197-203 | backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:205-211 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:197-203 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:205-211 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/DatabaseCollection.scala` and `server/src/main/scala/kpn/database/base/DatabaseCollection.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×6
  • Duplicated block (6 lines × 4) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:16 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:16-21 | backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:47-52 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:16-21 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala:47-52 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityReader.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:385 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:385-390 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:443-448 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:385-390 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:443-448 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:385` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:133 — backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:133-138 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:182-191 | server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala:133-138 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:182-191 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/location/FranceIntermunicipalityAnalysisTool.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:182` 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 × 4) backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:118 — backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:118-123 | backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:128-133 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:118-123 | server/src/main/scala/kpn/database/base/DatabaseCollection.scala:128-133 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/DatabaseCollection.scala` and `server/src/main/scala/kpn/database/base/DatabaseCollection.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 119 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/base/DatabaseCollection.scala:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:104 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:104-109 | backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullRouteAnalyzer.scala:102-107 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:104-109 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullRouteAnalyzer.scala:102-107 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:111 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:111-116 | backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullRouteAnalyzer.scala:95-100 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala:111-116 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullRouteAnalyzer.scala:95-100 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseRouteAnalyzer.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D35 · Change Coupling · Change-coupling hub · ×5
  • Change-coupling hub: network-changes-page.component.ts → network-details-page.component.ts, network-facts-page.component.ts, network-nodes-page.component.ts, network-routes-page.component.ts, route-changes-page.component.ts frontend/src/app/analysis/network/internal/changes/network-changes-page.component.ts — `frontend/src/app/analysis/network/internal/changes/network-changes-page.component.ts` changes together with 5 other files — `frontend/src/app/analysis/network/internal/details/network-details-page.component.ts`, `frontend/src/app/analysis/network/internal/facts/network-facts-page.component.ts`, `frontend/src/app/analysis/network/internal/nodes/network-nodes-page.component.ts`, `frontend/src/app/analysis/network/internal/routes/network-routes-page.component.ts`, `frontend/src/app/analysis/route/internal/changes/route-changes-page.component.ts` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: network-details-page.component.ts → network-facts-page.component.ts, network-nodes-page.component.ts, network-routes-page.component.ts frontend/src/app/analysis/network/internal/details/network-details-page.component.ts — `frontend/src/app/analysis/network/internal/details/network-details-page.component.ts` changes together with 3 other files — `frontend/src/app/analysis/network/internal/facts/network-facts-page.component.ts`, `frontend/src/app/analysis/network/internal/nodes/network-nodes-page.component.ts`, `frontend/src/app/analysis/network/internal/routes/network-routes-page.component.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: location-facts-page.component.ts → location-changes-page.component.ts, location-page-header.component.ts, location-map-page.component.ts, location-nodes-page.component.ts, location-routes-page.component.ts frontend/src/app/analysis/location/internal/facts/location-facts-page.component.ts — `frontend/src/app/analysis/location/internal/facts/location-facts-page.component.ts` changes together with 5 other files — `frontend/src/app/analysis/location/internal/changes/location-changes-page.component.ts`, `frontend/src/app/analysis/location/internal/components/location-page-header.component.ts`, `frontend/src/app/analysis/location/internal/map/location-map-page.component.ts`, `frontend/src/app/analysis/location/internal/nodes/location-nodes-page.component.ts`, `frontend/src/app/analysis/location/internal/routes/location-routes-page.component.ts` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: location-changes-page.component.ts → location-map-page.component.ts, location-nodes-page.component.ts, location-routes-page.component.ts frontend/src/app/analysis/location/internal/changes/location-changes-page.component.ts — `frontend/src/app/analysis/location/internal/changes/location-changes-page.component.ts` changes together with 3 other files — `frontend/src/app/analysis/location/internal/map/location-map-page.component.ts`, `frontend/src/app/analysis/location/internal/nodes/location-nodes-page.component.ts`, `frontend/src/app/analysis/location/internal/routes/location-routes-page.component.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: route-details-page.component.ts → route-changes-page.component.ts, route-page-header.component.ts, route-segments-page.component.ts frontend/src/app/analysis/route/internal/details/route-details-page.component.ts — `frontend/src/app/analysis/route/internal/details/route-details-page.component.ts` changes together with 3 other files — `frontend/src/app/analysis/route/internal/changes/route-changes-page.component.ts`, `frontend/src/app/analysis/route/internal/components/route-page-header.component.ts`, `frontend/src/app/analysis/route/internal/segments/route-segments-page.component.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:19 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:19-32 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCopyTool.scala:19-32 — 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) backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala:40 — backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala:40-53 | server/src/main/scala/kpn/core/tools/poi/PoiTileTaskTool.scala:40-53 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer2.scala:20 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer2.scala:20-33 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer2.scala:21-34 — 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) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:58 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:58-71 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorRouteCreateXmlsTool.scala:58-71 — 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) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:12 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:12-25 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkUpdateRouteDiffsAnalyzer.scala:12-25 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×5
  • Duplicated block (56 lines × 2) backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:166 — backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:166-221 | server/src/main/scala/kpn/database/index/IndexConfiguration.scala:166-221 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/IndexConfiguration.scala` and `server/src/main/scala/kpn/database/index/IndexConfiguration.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 366 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (56 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:29 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:29-84 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:29-84 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.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 (56 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:25 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:25-80 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:25-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.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 (56 lines × 2) backend/src/main/scala/kpn/server/repository/NetworkRepository.scala:25 — backend/src/main/scala/kpn/server/repository/NetworkRepository.scala:25-80 | server/src/main/scala/kpn/server/repository/NetworkRepository.scala:25-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/NetworkRepository.scala` and `server/src/main/scala/kpn/server/repository/NetworkRepository.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 (56 lines × 2) backend/src/main/scala/kpn/server/repository/RawDataRepositoryImpl.scala:20 — backend/src/main/scala/kpn/server/repository/RawDataRepositoryImpl.scala:20-75 | server/src/main/scala/kpn/server/repository/RawDataRepositoryImpl.scala:20-75 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/RawDataRepositoryImpl.scala` and `server/src/main/scala/kpn/server/repository/RawDataRepositoryImpl.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×5
  • Duplicated block (52 lines × 2) backend/src/main/scala/kpn/core/app/stats/Figure.scala:14 — backend/src/main/scala/kpn/core/app/stats/Figure.scala:14-65 | server/src/main/scala/kpn/core/app/stats/Figure.scala:14-65 — before extracting anything, compare `backend/src/main/scala/kpn/core/app/stats/Figure.scala` and `server/src/main/scala/kpn/core/app/stats/Figure.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 (52 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:31 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:31-82 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:31-82 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.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 (52 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:164 — backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:164-215 | server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala:164-215 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/ChangeSetSummaryBuilder.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (52 lines × 2) backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisTool.scala:24 — backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisTool.scala:24-75 | server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisTool.scala:24-75 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisTool.scala` and `server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisTool.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 `backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisTool.scala:24` 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 (52 lines × 2) backend/src/main/scala/kpn/core/util/Memory.scala:14 — backend/src/main/scala/kpn/core/util/Memory.scala:14-65 | server/src/main/scala/kpn/core/util/Memory.scala:14-65 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/Memory.scala` and `server/src/main/scala/kpn/core/util/Memory.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 `backend/src/main/scala/kpn/core/util/Memory.scala:14` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×5
  • Duplicated block (51 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:37 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:37-87 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:37-87 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (51 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureMemberAnalyzer.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureMemberAnalyzer.scala:31-81 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureMemberAnalyzer.scala:31-81 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureMemberAnalyzer.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 (51 lines × 2) backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:30 — backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:30-80 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:30-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala` and `server/src/main/scala/kpn/server/api/status/StatusFacade.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 235 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (51 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorRouteGapAnalyzer.scala:20 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorRouteGapAnalyzer.scala:20-70 | server/src/main/scala/kpn/server/monitor/route/update/MonitorRouteGapAnalyzer.scala:20-70 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorRouteGapAnalyzer.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorRouteGapAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (51 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteLabelsAnalyzer.scala:8 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteLabelsAnalyzer.scala:8-58 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteLabelsAnalyzer.scala:8-58 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteLabelsAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteLabelsAnalyzer.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteLabelsAnalyzer.scala:8` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×5
  • Duplicated block (47 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeIntegrityAnalyzer.scala:18 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeIntegrityAnalyzer.scala:18-64 | server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeIntegrityAnalyzer.scala:18-64 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeIntegrityAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/node/main/analyzers/NodeIntegrityAnalyzer.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 (47 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiContactAnalyzer.scala:16 — backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiContactAnalyzer.scala:16-62 | server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiContactAnalyzer.scala:16-62 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiContactAnalyzer.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiContactAnalyzer.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 (47 lines × 2) backend/src/main/scala/kpn/server/grafana/GrafanaController.scala:27 — backend/src/main/scala/kpn/server/grafana/GrafanaController.scala:27-73 | server/src/main/scala/kpn/server/grafana/GrafanaController.scala:27-73 — before extracting anything, compare `backend/src/main/scala/kpn/server/grafana/GrafanaController.scala` and `server/src/main/scala/kpn/server/grafana/GrafanaController.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 (47 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/CountryCounts.scala:6 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/CountryCounts.scala:6-52 | server/src/main/scala/kpn/server/analyzer/engine/analysis/location/CountryCounts.scala:6-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/CountryCounts.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/location/CountryCounts.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/location/CountryCounts.scala:6` 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 (47 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/CoordinateTransform.scala:42 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/CoordinateTransform.scala:42-88 | server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/CoordinateTransform.scala:42-88 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/domain/CoordinateTransform.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/domain/CoordinateTransform.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×5
  • Duplicated block (44 lines × 2) backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:74 — backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:74-117 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:74-117 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` and `server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 209 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (44 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteMainAnalyzer.scala:56 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteMainAnalyzer.scala:56-99 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteMainAnalyzer.scala:56-99 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteMainAnalyzer.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 (44 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:34 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:34-77 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:34-77 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala` as WHOLE FILES: this scan already matched 7 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. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (44 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationChangesPageBuilder.scala:34 — backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationChangesPageBuilder.scala:34-77 | server/src/main/scala/kpn/server/api/analysis/pages/location/LocationChangesPageBuilder.scala:34-77 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/location/LocationChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/location/LocationChangesPageBuilder.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 (44 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorContext.scala:10 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorContext.scala:10-53 | server/src/main/scala/kpn/server/monitor/route/update/MonitorContext.scala:10-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorContext.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorContext.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×5
  • Duplicated block (39 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:236 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:236-274 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:236-274 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (39 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:345 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:345-383 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:345-383 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (39 lines × 2) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileInfos.scala:19 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileInfos.scala:19-57 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileInfos.scala:19-57 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileInfos.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteTileInfos.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 (39 lines × 2) backend/src/main/scala/kpn/server/analyzer/AnalyzerJob.scala:15 — backend/src/main/scala/kpn/server/analyzer/AnalyzerJob.scala:15-53 | server/src/main/scala/kpn/server/analyzer/AnalyzerJob.scala:15-53 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/AnalyzerJob.scala` and `server/src/main/scala/kpn/server/analyzer/AnalyzerJob.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 (39 lines × 2) backend/src/main/scala/kpn/server/config/WebServerConfiguration.scala:20 — backend/src/main/scala/kpn/server/config/WebServerConfiguration.scala:20-58 | server/src/main/scala/kpn/server/config/WebServerConfiguration.scala:20-58 — before extracting anything, compare `backend/src/main/scala/kpn/server/config/WebServerConfiguration.scala` and `server/src/main/scala/kpn/server/config/WebServerConfiguration.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×5
  • Duplicated block (10 lines × 4) backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:88 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:88-97 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:68-77 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:88-97 | server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:68-77 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:88` 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:398 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:398-407 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:411-420 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:398-407 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:411-420 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:398` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:35 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:35-44 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:47-56 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:35-44 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:47-56 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:45 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:45-54 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:114-123 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:45-54 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:114-123 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.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.
  • Duplicated block (10 lines × 4) backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:127 — backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:127-136 | backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:94-103 | server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:127-136 | server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:94-103 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/core/tools/next/support/NextCreateRouteRelationsTool.scala:127` 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.
GD1 · Unfinished & placeholder code · Unfinished stub · ×5
  • Unfinished stub — body is `???` backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421 — `routeReferenceKey` 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 a "not implemented" error backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:144 — `changesFilterFrom` is a shipped member whose whole body is still a "not implemented" error, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — body is `???` backend/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17 — `decode` 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 `???` server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421 — `routeReferenceKey` 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 `???` server/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17 — `decode` is a shipped member whose whole body is still `???`, and nothing in the repository overrides it — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×5
  • Unfinished stub — body is ??? / NotImplementedError backend/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421 — `routeReferenceKey` 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 — throws a "not implemented" exception backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:144 — `changesFilterFrom` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — body is ??? / NotImplementedError backend/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17 — `decode` 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 server/src/main/scala/kpn/server/monitor/repository/MonitorRouteRepository.scala:421 — `routeReferenceKey` 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 server/src/main/scala/kpn/tools/code/codecs/GeometryCodec.scala:17 — `decode` is a shipped method whose whole body is `???` (or throws NotImplementedError), and nothing in the repository overrides it — scaffolding that was never completed. Implement it or remove the dead surface.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:16-30 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/OsmChangeParser.scala:16-30 — 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) backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorGroupRouteInfos.scala:25 — backend/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorGroupRouteInfos.scala:25-39 | server/src/main/scala/kpn/database/actions/monitor/MongoQueryMonitorGroupRouteInfos.scala:26-40 — 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) backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:58 — backend/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:58-72 | server/src/main/scala/kpn/database/tools/TryoutMongoTimestamp.scala:58-72 — 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:257 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:257-271 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:257-271 — 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 (10 corresponding lines) · ×4
  • Edited copy of a member (10 corresponding lines) backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteBounds.scala:26 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteBounds.scala:26-35 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteBounds.scala:27-36 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala:53 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala:53-62 | server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateStore.scala:53-62 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:169 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:169-178 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:168-177 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:180 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:180-189 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:179-188 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×4
  • Duplicated block (53 lines × 2) backend/src/main/scala/kpn/core/tools/analysis/SingleRouteChangeAnalyzerTool.scala:157 — backend/src/main/scala/kpn/core/tools/analysis/SingleRouteChangeAnalyzerTool.scala:157-209 | server/src/main/scala/kpn/core/tools/analysis/SingleRouteChangeAnalyzerTool.scala:157-209 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/SingleRouteChangeAnalyzerTool.scala` and `server/src/main/scala/kpn/core/tools/analysis/SingleRouteChangeAnalyzerTool.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. Note first that the copies are not typed on the same thing: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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 (53 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:71 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:71-123 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala:71-123 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/NetworkMainAnalyzer.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/core/tools/translations/TranslationImportTool.scala:16 — backend/src/main/scala/kpn/core/tools/translations/TranslationImportTool.scala:16-68 | server/src/main/scala/kpn/core/tools/translations/TranslationImportTool.scala:16-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/translations/TranslationImportTool.scala` and `server/src/main/scala/kpn/core/tools/translations/TranslationImportTool.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 `backend/src/main/scala/kpn/core/tools/translations/TranslationImportTool.scala:16` 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 (53 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:83 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:83-135 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:83-135 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` and `server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 468 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×4
  • Duplicated block (50 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:114 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:114-163 | server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala:114-163 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderFrance.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 149 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:293 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:293-342 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:293-342 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/files/LocalFileSystem.scala:11 — backend/src/main/scala/kpn/core/files/LocalFileSystem.scala:11-60 | server/src/main/scala/kpn/core/files/LocalFileSystem.scala:11-60 — before extracting anything, compare `backend/src/main/scala/kpn/core/files/LocalFileSystem.scala` and `server/src/main/scala/kpn/core/files/LocalFileSystem.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 `backend/src/main/scala/kpn/core/files/LocalFileSystem.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 (50 lines × 2) backend/src/main/scala/kpn/core/tools/translations/TranslationExtractTool.scala:17 — backend/src/main/scala/kpn/core/tools/translations/TranslationExtractTool.scala:17-66 | server/src/main/scala/kpn/core/tools/translations/TranslationExtractTool.scala:17-66 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/translations/TranslationExtractTool.scala` and `server/src/main/scala/kpn/core/tools/translations/TranslationExtractTool.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 `backend/src/main/scala/kpn/core/tools/translations/TranslationExtractTool.scala:17` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×4
  • Duplicated block (62 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:66 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:66-127 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala:66-127 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteNodesAnalyzer.scala` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/core/tools/next/support/TryoutReadReplicateTool.scala:13 — backend/src/main/scala/kpn/core/tools/next/support/TryoutReadReplicateTool.scala:13-74 | server/src/main/scala/kpn/core/tools/next/support/TryoutReadReplicateTool.scala:13-74 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/TryoutReadReplicateTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/TryoutReadReplicateTool.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 `backend/src/main/scala/kpn/core/tools/next/support/TryoutReadReplicateTool.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 (62 lines × 2) backend/src/main/scala/kpn/core/tools/tile/SingleTileTool.scala:19 — backend/src/main/scala/kpn/core/tools/tile/SingleTileTool.scala:19-80 | server/src/main/scala/kpn/core/tools/tile/SingleTileTool.scala:19-80 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/tile/SingleTileTool.scala` and `server/src/main/scala/kpn/core/tools/tile/SingleTileTool.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 `backend/src/main/scala/kpn/core/tools/tile/SingleTileTool.scala:19` 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) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.scala:17 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.scala:17-78 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.scala:17-78 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteAnalysisContextReport.scala:17` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×4
  • Duplicated block (16 lines × 4) backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:45 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:45-60 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:53-68 | server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:45-60 | server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:53-68 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:45` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:47 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:47-62 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala:38-53 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:47-62 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala:38-53 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala` and `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:10-25 | backend/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:128-143 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:10-25 | server/src/main/scala/kpn/server/analyzer/full/analyzers/SingleBaseRouteAnalyzer.scala:128-143 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/RouteTileInfoBuilder.scala:10` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:97 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:97-112 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateContext.scala:85-100 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:97-112 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateContext.scala:85-100 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×4
  • Duplicated block (14 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:80 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:80-93 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:174-187 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:80-93 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala:174-187 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdate.scala` as WHOLE FILES: this scan already matched 7 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. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` 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 (14 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:84 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:84-97 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:115-128 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:84-97 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:115-128 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.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 × 4) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:32 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:32-45 | backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:47-60 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:32-45 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala:47-60 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeStateAnalyzer.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 4) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:153 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:153-166 | backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:168-181 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:153-166 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala:168-181 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteChangesPageExample.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×4
  • Duplicated block (9 lines × 4) backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:13 — backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:13-21 | backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:13-21 | server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:13-21 | server/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:13-21 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala` and `server/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/src/main/scala/kpn/core/tools/analysis/SingleRouteAnalyzerToolOptions.scala:23` calls `required` and `backend/src/main/scala/kpn/core/tools/analysis/InitialAnalysisToolOptions.scala:22` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:20 — backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:20-28 | backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:55-63 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:20-28 | server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala:55-63 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` and `server/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/next/support/RouteUpdateTool.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 (9 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:85 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:85-93 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateContext.scala:70-78 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:85-93 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateContext.scala:70-78 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateCommon.scala:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxDelete.scala:44 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxDelete.scala:44-52 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:191-199 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxDelete.scala:44-52 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:191-199 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxDelete.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxDelete.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.
IC1 · Incompleteness & stubs · Hollow method · ×4
  • Hollow method — returns a constant without doing the work backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:63 — `query` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:69 — `lastKnownValue` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work server/src/main/scala/kpn/server/repository/MetricsRepository.scala:63 — `query` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work server/src/main/scala/kpn/server/repository/MetricsRepository.scala:69 — `lastKnownValue` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
R10 · Code Duplication · Duplicated block (29 lines × 2 locations) · ×4
  • Duplicated block (29 lines × 2 locations) frontend/src/app/analysis/components/edit/edit-step-builder.ts:36 — frontend/src/app/analysis/components/edit/edit-step-builder.ts:36 · frontend/src/app/analysis/components/edit/edit-step-builder.ts:72 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (29 lines × 2 locations) frontend/src/app/analysis/subset/internal/orphan-nodes/components/subset-orphan-node-list.component.ts:43 — frontend/src/app/analysis/subset/internal/orphan-nodes/components/subset-orphan-node-list.component.ts:43 · frontend/src/app/analysis/subset/internal/orphan-routes/components/subset-orphan-route-list.component.ts:44 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (29 lines × 2 locations) frontend/src/app/monitor/internal/route/monitor-route-gap.component.ts:27 — frontend/src/app/monitor/internal/route/monitor-route-gap.component.ts:27 · frontend/src/app/route/internal/components/structure/route-gap.component.ts:27 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (29 lines × 2 locations) frontend/src/app/status/internal/replication-status-page.component.ts:65 — frontend/src/app/status/internal/replication-status-page.component.ts:65 · frontend/src/app/status/internal/system-status-page.component.ts:80 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R7 · Dead Code · Dead file (~31 LoC) · ×4
  • Dead file (~31 LoC) frontend/src/app/analysis/changes/internal/components/changes-sidebar.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~31 LoC) frontend/src/app/analysis/node/internal/changes/components/node-changes-sidebar.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~31 LoC) frontend/src/app/shared/components/link/link-node-ref.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~31 LoC) frontend/src/app/shared/components/link/link-route-ref.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
S1 · Web-Security Posture · Weak hash algorithm · ×4
  • Weak hash algorithm backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteGeometryDigestAnalyzer.scala:16 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:85 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteGeometryDigestAnalyzer.scala:16 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`MessageDigest.getInstance("SHA-256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiImageAnalyzer.scala:85 — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · MethodTooLong · ×3
  • MethodTooLong: OverviewConfigurationService.buildStatisticConfigurations frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:13 — MethodTooLong — buildStatisticConfigurations runs 323 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 223 over it, 3.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JavaLinkAnalyzer.processOnewayMember backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228 — MethodTooLong — processOnewayMember runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JavaLinkAnalyzer.processOnewayMember server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228 — MethodTooLong — processOnewayMember runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D35 · Change Coupling · Change coupling clique · ×3
  • Change coupling clique: monitor-group-add-page.component.ts, monitor-group-delete-page.component.ts, monitor-group-update-page.component.ts frontend/src/app/monitor/internal/group/add/monitor-group-add-page.component.ts — 3 files — `frontend/src/app/monitor/internal/group/add/monitor-group-add-page.component.ts`, `frontend/src/app/monitor/internal/group/delete/monitor-group-delete-page.component.ts`, `frontend/src/app/monitor/internal/group/update/monitor-group-update-page.component.ts` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: subset-changes-page.component.ts, subset-fact-details-page.component.ts, subset-facts-page.component.ts, subset-networks-page.component.ts, subset-orphan-nodes-page.component.ts, subset-orphan-routes-page.component.ts frontend/src/app/analysis/subset/internal/changes/subset-changes-page.component.ts — 6 files — `frontend/src/app/analysis/subset/internal/changes/subset-changes-page.component.ts`, `frontend/src/app/analysis/subset/internal/fact-details/subset-fact-details-page.component.ts`, `frontend/src/app/analysis/subset/internal/facts/subset-facts-page.component.ts`, `frontend/src/app/analysis/subset/internal/networks/subset-networks-page.component.ts`, `frontend/src/app/analysis/subset/internal/orphan-nodes/subset-orphan-nodes-page.component.ts`, `frontend/src/app/analysis/subset/internal/orphan-routes/subset-orphan-routes-page.component.ts` — all change together with no explicit dependency: a fully-connected co-change clique, not 15 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: fact-description.component.ts, fact-name.component.ts, facts.ts frontend/src/app/analysis/fact/components/fact-description.component.ts — 3 files — `frontend/src/app/analysis/fact/components/fact-description.component.ts`, `frontend/src/app/analysis/fact/components/fact-name.component.ts`, `frontend/src/app/analysis/fact/components/facts.ts` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication · Duplicated block (72 lines × 2) · ×3
  • Duplicated block (72 lines × 2) backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:236 — backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:236-307 | server/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala:236-307 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala` and `server/src/main/scala/kpn/core/tools/analysis/AnalysisConfiguration.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (72 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:98 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:98-169 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:99-170 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (72 lines × 2) backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:18 — backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:18-89 | server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:18-89 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala` and `server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.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.
D4 · Code Duplication · Duplicated block (70 lines × 2) · ×3
  • Duplicated block (70 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:420 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:420-489 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:420-489 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (70 lines × 2) backend/src/main/scala/kpn/database/util/Mongo.scala:50 — backend/src/main/scala/kpn/database/util/Mongo.scala:50-119 | server/src/main/scala/kpn/database/util/Mongo.scala:50-119 — before extracting anything, compare `backend/src/main/scala/kpn/database/util/Mongo.scala` and `server/src/main/scala/kpn/database/util/Mongo.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 (70 lines × 2) backend/src/main/scala/kpn/server/api/planner/PlannerFacade.scala:35 — backend/src/main/scala/kpn/server/api/planner/PlannerFacade.scala:35-104 | server/src/main/scala/kpn/server/api/planner/PlannerFacade.scala:35-104 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/planner/PlannerFacade.scala` and `server/src/main/scala/kpn/server/api/planner/PlannerFacade.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (61 lines × 2) · ×3
  • Duplicated block (61 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:386 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:386-446 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:386-446 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (61 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:113 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:113-173 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:113-173 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:113` 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 (61 lines × 2) backend/src/main/scala/kpn/server/opendata/common/OpenDataVectorTileBuilder.scala:20 — backend/src/main/scala/kpn/server/opendata/common/OpenDataVectorTileBuilder.scala:20-80 | server/src/main/scala/kpn/server/opendata/common/OpenDataVectorTileBuilder.scala:20-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/common/OpenDataVectorTileBuilder.scala` and `server/src/main/scala/kpn/server/opendata/common/OpenDataVectorTileBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (60 lines × 2) · ×3
  • Duplicated block (60 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:40-99 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:40-99 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.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 (60 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeUpdateProcessor.scala:19 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeUpdateProcessor.scala:19-78 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeUpdateProcessor.scala:19-78 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeUpdateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeUpdateProcessor.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 (60 lines × 2) backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:111 — backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:111-170 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:111-170 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala` and `server/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×3
  • Duplicated block (57 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala:33 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala:33-89 | server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala:33-89 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteDetailsPageExample.scala:36 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteDetailsPageExample.scala:36-92 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteDetailsPageExample.scala:36-92 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteDetailsPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteDetailsPageExample.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 (57 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:30 — backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:30-86 | server/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:30-86 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.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.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×3
  • Duplicated block (55 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/TimeInfoBuilder.scala:13 — backend/src/main/scala/kpn/server/api/analysis/pages/TimeInfoBuilder.scala:13-67 | server/src/main/scala/kpn/server/api/analysis/pages/TimeInfoBuilder.scala:13-67 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/TimeInfoBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/TimeInfoBuilder.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 (55 lines × 2) backend/src/main/scala/kpn/database/actions/statistics/ChangeSetCounts.scala:14 — backend/src/main/scala/kpn/database/actions/statistics/ChangeSetCounts.scala:14-68 | server/src/main/scala/kpn/database/actions/statistics/ChangeSetCounts.scala:14-68 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/statistics/ChangeSetCounts.scala` and `server/src/main/scala/kpn/database/actions/statistics/ChangeSetCounts.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. 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 (55 lines × 2) backend/src/main/scala/kpn/server/api/poi/PoiController.scala:26 — backend/src/main/scala/kpn/server/api/poi/PoiController.scala:26-80 | server/src/main/scala/kpn/server/api/poi/PoiController.scala:26-80 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/poi/PoiController.scala` and `server/src/main/scala/kpn/server/api/poi/PoiController.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (54 lines × 2) · ×3
  • Duplicated block (54 lines × 2) backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:125 — backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:125-178 | server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:125-178 — before extracting anything, compare `backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` and `server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:125` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (54 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkAnalysisContext.scala:48 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkAnalysisContext.scala:48-101 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkAnalysisContext.scala:48-101 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkAnalysisContext.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkAnalysisContext.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 (54 lines × 2) backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:33 — backend/src/main/scala/kpn/server/repository/MetricsRepository.scala:33-86 | server/src/main/scala/kpn/server/repository/MetricsRepository.scala:33-86 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/MetricsRepository.scala` and `server/src/main/scala/kpn/server/repository/MetricsRepository.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×3
  • Duplicated block (45 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:42 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:42-86 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:42-86 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (45 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:73 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:73-117 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:73-117 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.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 (45 lines × 2) backend/src/main/scala/kpn/server/repository/RawDataRepositoryDevelopmentImpl.scala:20 — backend/src/main/scala/kpn/server/repository/RawDataRepositoryDevelopmentImpl.scala:20-64 | server/src/main/scala/kpn/server/repository/RawDataRepositoryDevelopmentImpl.scala:20-64 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/RawDataRepositoryDevelopmentImpl.scala` and `server/src/main/scala/kpn/server/repository/RawDataRepositoryDevelopmentImpl.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×3
  • Duplicated block (15 lines × 4) backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:189 — backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:189-203 | backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:242-256 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:189-203 | server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:242-256 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` and `server/src/main/scala/kpn/database/actions/locations/LocationQuery.scala` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 248 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/LocationQuery.scala:189` 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 × 4) backend/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala:67 — backend/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala:67-81 | backend/src/main/scala/kpn/server/api/analysis/pages/PoiLocationsPageBuilder.scala:45-59 | server/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala:67-81 | server/src/main/scala/kpn/server/api/analysis/pages/PoiLocationsPageBuilder.scala:45-59 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/LocationsPageBuilder.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:99 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:99-113 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:130-144 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:99-113 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala:130-144 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocations.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.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×3
  • Duplicated block (12 lines × 4) backend/api/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala:30 — backend/api/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala:30-41 | backend/src/main/scala/kpn/core/doc/NetworkInfoNodeDetail.scala:31-42 | server/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala:30-41 | server/src/main/scala/kpn/core/doc/NetworkInfoNodeDetail.scala:30-41 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/common/network/NetworkNodeDetail.scala` and `backend/src/main/scala/kpn/core/doc/NetworkInfoNodeDetail.scala` as WHOLE FILES: 82% 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 × 4) backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:44 — backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:44-55 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:41-52 | server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:44-55 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:41-52 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala` and `server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:44` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 4) backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:53 — backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:53-64 | backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:135-146 | server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:53-64 | server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:135-146 — before extracting anything, compare `backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala` and `server/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala` as WHOLE FILES: this scan already matched 8 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:51` calls `QueryNodes` and `backend/src/main/scala/kpn/server/overpass/OverpassRepositoryImpl.scala:134` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×3
  • Duplicated block (8 lines × 6) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:35 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:35-42 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:47-54 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:116-123 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala:35-42 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAdd.scala:47-54 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowAnalyze.scala:116-123 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAdd.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 × 6) backend/src/main/scala/kpn/core/data/DataBuilder.scala:142 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:142-149 | backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:120-127 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:111-118 | server/src/main/scala/kpn/core/data/DataBuilder.scala:142-149 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:120-127 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:111-118 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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 × 6) backend/src/main/scala/kpn/core/data/DataBuilder.scala:151 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:151-158 | backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:129-136 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:120-127 | server/src/main/scala/kpn/core/data/DataBuilder.scala:151-158 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:129-136 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:120-127 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×3
  • Duplicated block (28 lines × 2 locations) frontend/src/app/analysis/location/internal/nodes/components/location-node-list.component.ts:48 — frontend/src/app/analysis/location/internal/nodes/components/location-node-list.component.ts:48 · frontend/src/app/analysis/location/internal/routes/components/location-route-list.component.ts:42 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (28 lines × 2 locations) frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 — frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-name.component.ts:31 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (28 lines × 2 locations) frontend/src/app/planner/domain/commands/planner-command-move-via-route.ts:38 — frontend/src/app/planner/domain/commands/planner-command-move-via-route.ts:38 · frontend/src/app/planner/domain/commands/planner-command-split-leg.ts:38 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×3
  • Untrusted text written into markup unescaped frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:22 — `network.id` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:54 — `network.name` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped frontend/src/app/analysis/subset/internal/networks/map/network-marker-builder.ts:56 — `network.km` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
AC1 · Text alternatives · <canvas> without a text alternative · ×2
  • <canvas> without a text alternative frontend/src/app/planner/pages/planner/sidebar/elevation-profile.component.ts:12 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative frontend/src/app/symbol/symbol.component.ts:19 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark map/src/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <app-root>, so there is no content here to wrap — render the <main> from the component mounted into it.
D1 · Cyclomatic Complexity · MongoQueryLocationNodes.filterOptions (cyclomatic 42) · ×2
  • MongoQueryLocationNodes.filterOptions (cyclomatic 42) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56 — MongoQueryLocationNodes.filterOptions has cyclomatic complexity 42 (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.
  • MongoQueryLocationNodes.filterOptions (cyclomatic 42) server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56 — MongoQueryLocationNodes.filterOptions has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BaseRouteSegmentAnalyzer.handleRoundabout (cyclomatic 38) · ×2
  • BaseRouteSegmentAnalyzer.handleRoundabout (cyclomatic 38) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:89 — BaseRouteSegmentAnalyzer.handleRoundabout has cyclomatic complexity 38 (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.
  • BaseRouteSegmentAnalyzer.handleRoundabout (cyclomatic 38) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:89 — BaseRouteSegmentAnalyzer.handleRoundabout has cyclomatic complexity 38 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · JavaLinkAnalyzer.determineDirectionBasedOnReference (cyclomatic 27) · ×2
  • JavaLinkAnalyzer.determineDirectionBasedOnReference (cyclomatic 27) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:411 — JavaLinkAnalyzer.determineDirectionBasedOnReference has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • JavaLinkAnalyzer.determineDirectionBasedOnReference (cyclomatic 27) server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:411 — JavaLinkAnalyzer.determineDirectionBasedOnReference has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OneWayAnalyzer.direction (cyclomatic 23) · ×2
  • OneWayAnalyzer.direction (cyclomatic 23) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:29 — OneWayAnalyzer.direction has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • OneWayAnalyzer.direction (cyclomatic 23) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:29 — OneWayAnalyzer.direction has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MongoQueryLocationRoutes.filterOptions (cyclomatic 21) · ×2
  • MongoQueryLocationRoutes.filterOptions (cyclomatic 21) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63 — MongoQueryLocationRoutes.filterOptions 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.
  • MongoQueryLocationRoutes.filterOptions (cyclomatic 21) server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63 — MongoQueryLocationRoutes.filterOptions has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CohenSutherland.clip (cyclomatic 21) · ×2
  • CohenSutherland.clip (cyclomatic 21) backend/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:8 — CohenSutherland.clip has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • CohenSutherland.clip (cyclomatic 21) server/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:8 — CohenSutherland.clip has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JavaLinkAnalyzer.processOnewayMember (cyclomatic 21) · ×2
  • JavaLinkAnalyzer.processOnewayMember (cyclomatic 21) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228 — JavaLinkAnalyzer.processOnewayMember has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • JavaLinkAnalyzer.processOnewayMember (cyclomatic 21) server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228 — JavaLinkAnalyzer.processOnewayMember has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StructureElementAnalyzer.processClosedLoop (cyclomatic 20) · ×2
  • StructureElementAnalyzer.processClosedLoop (cyclomatic 20) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:101 — StructureElementAnalyzer.processClosedLoop 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.
  • StructureElementAnalyzer.processClosedLoop (cyclomatic 20) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:101 — StructureElementAnalyzer.processClosedLoop has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · LinkImageBuilder.paint (cyclomatic 18) · ×2
  • LinkImageBuilder.paint (cyclomatic 18) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:62 — LinkImageBuilder.paint 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.
  • LinkImageBuilder.paint (cyclomatic 18) server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:62 — LinkImageBuilder.paint has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NetworkChangeProcessor.processNetwork (cyclomatic 16) · ×2
  • NetworkChangeProcessor.processNetwork (cyclomatic 16) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:38 — NetworkChangeProcessor.processNetwork 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.
  • NetworkChangeProcessor.processNetwork (cyclomatic 16) server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:38 — NetworkChangeProcessor.processNetwork has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · BaseRouteSegmentAnalyzer.handleRoundabout (cognitive 65) · ×2
  • BaseRouteSegmentAnalyzer.handleRoundabout (cognitive 65) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:89 — BaseRouteSegmentAnalyzer.handleRoundabout has cognitive complexity 65 (threshold 15). Drivers by points: match/switch 14 (47 pts), if/else 6 (12 pts), boolean chains 6 (nesting depth added 39). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
  • BaseRouteSegmentAnalyzer.handleRoundabout (cognitive 65) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:89 — BaseRouteSegmentAnalyzer.handleRoundabout has cognitive complexity 65 (threshold 15). Drivers by points: match/switch 14 (47 pts), if/else 6 (12 pts), boolean chains 6 (nesting depth added 39). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MongoQueryLocationNodes.filterOptions (cognitive 58) · ×2
  • MongoQueryLocationNodes.filterOptions (cognitive 58) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56 — MongoQueryLocationNodes.filterOptions has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 13 (31 pts), if/else 24, boolean chains 3 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
  • MongoQueryLocationNodes.filterOptions (cognitive 58) server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56 — MongoQueryLocationNodes.filterOptions has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 13 (31 pts), if/else 24, boolean chains 3 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · JavaLinkAnalyzer.determineDirectionBasedOnReference (cognitive 46) · ×2
  • JavaLinkAnalyzer.determineDirectionBasedOnReference (cognitive 46) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:411 — JavaLinkAnalyzer.determineDirectionBasedOnReference has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 5, loops 2 (4 pts), match/switch 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.
  • JavaLinkAnalyzer.determineDirectionBasedOnReference (cognitive 46) server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:411 — JavaLinkAnalyzer.determineDirectionBasedOnReference has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaLinkAnalyzer.processOnewayMember (cognitive 45) · ×2
  • JavaLinkAnalyzer.processOnewayMember (cognitive 45) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228 — JavaLinkAnalyzer.processOnewayMember has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JavaLinkAnalyzer.processOnewayMember (cognitive 45) server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:228 — JavaLinkAnalyzer.processOnewayMember has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRouteStructureAnalyzer.analyze (cognitive 39) · ×2
  • BaseRouteStructureAnalyzer.analyze (cognitive 39) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:27 — BaseRouteStructureAnalyzer.analyze has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • BaseRouteStructureAnalyzer.analyze (cognitive 39) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteStructureAnalyzer.scala:27 — BaseRouteStructureAnalyzer.analyze has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StructureElementAnalyzer.processClosedLoop (cognitive 39) · ×2
  • StructureElementAnalyzer.processClosedLoop (cognitive 39) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:101 — StructureElementAnalyzer.processClosedLoop has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 7 (19 pts) (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • StructureElementAnalyzer.processClosedLoop (cognitive 39) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:101 — StructureElementAnalyzer.processClosedLoop has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 7 (19 pts) (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NetworkChangeProcessor.processNetwork (cognitive 35) · ×2
  • NetworkChangeProcessor.processNetwork (cognitive 35) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:38 — NetworkChangeProcessor.processNetwork has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 6 (19 pts), if/else 6 (16 pts) (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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.
  • NetworkChangeProcessor.processNetwork (cognitive 35) server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeProcessor.scala:38 — NetworkChangeProcessor.processNetwork has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 6 (19 pts), if/else 6 (16 pts) (nesting depth added 23). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LinkImageBuilder.paint (cognitive 30) · ×2
  • LinkImageBuilder.paint (cognitive 30) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:62 — LinkImageBuilder.paint has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (27 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.
  • LinkImageBuilder.paint (cognitive 30) server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:62 — LinkImageBuilder.paint has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MongoQueryLocationRoutes.filterOptions (cognitive 28) · ×2
  • MongoQueryLocationRoutes.filterOptions (cognitive 28) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63 — MongoQueryLocationRoutes.filterOptions has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 12 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • MongoQueryLocationRoutes.filterOptions (cognitive 28) server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63 — MongoQueryLocationRoutes.filterOptions has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 12 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CohenSutherland.clip (cognitive 26) · ×2
  • CohenSutherland.clip (cognitive 26) backend/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:8 — CohenSutherland.clip has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CohenSutherland.clip (cognitive 26) server/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:8 — CohenSutherland.clip has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OneWayAnalyzer.direction (cognitive 23) · ×2
  • OneWayAnalyzer.direction (cognitive 23) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:29 — OneWayAnalyzer.direction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, boolean chains 9. 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.
  • OneWayAnalyzer.direction (cognitive 23) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/OneWayAnalyzer.scala:29 — OneWayAnalyzer.direction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RoutedatabankNodeParser.parse (cognitive 22) · ×2
  • RoutedatabankNodeParser.parse (cognitive 22) backend/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:16 — RoutedatabankNodeParser.parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2 (3 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • RoutedatabankNodeParser.parse (cognitive 22) server/src/main/scala/kpn/server/opendata/netherlands/RoutedatabankNodeParser.scala:16 — RoutedatabankNodeParser.parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2 (3 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · BaseRouteTagAnalyzer.assertTagValueMatchesRouteType (cognitive 21) · ×2
  • BaseRouteTagAnalyzer.assertTagValueMatchesRouteType (cognitive 21) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:47 — BaseRouteTagAnalyzer.assertTagValueMatchesRouteType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 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.
  • BaseRouteTagAnalyzer.assertTagValueMatchesRouteType (cognitive 21) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTagAnalyzer.scala:47 — BaseRouteTagAnalyzer.assertTagValueMatchesRouteType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRouteSegmentAnalyzer.analyze (cognitive 20) · ×2
  • BaseRouteSegmentAnalyzer.analyze (cognitive 20) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:36 — BaseRouteSegmentAnalyzer.analyze has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BaseRouteSegmentAnalyzer.analyze (cognitive 20) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:36 — BaseRouteSegmentAnalyzer.analyze has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegEnd.fromPlanString (cognitive 19) · ×2
  • LegEnd.fromPlanString (cognitive 19) backend/api/src/main/scala/kpn/api/common/planner/LegEnd.scala:20 — LegEnd.fromPlanString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (6 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • LegEnd.fromPlanString (cognitive 19) server/src/main/scala/kpn/api/common/planner/LegEnd.scala:20 — LegEnd.fromPlanString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (6 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RingBuilder.findRings (cognitive 19) · ×2
  • RingBuilder.findRings (cognitive 19) backend/src/main/scala/kpn/core/tools/country/RingBuilder.scala:20 — RingBuilder.findRings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 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.
  • RingBuilder.findRings (cognitive 19) server/src/main/scala/kpn/core/tools/country/RingBuilder.scala:20 — RingBuilder.findRings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RouteWayTypeAnalyzer.analyze (cognitive 18) · ×2
  • RouteWayTypeAnalyzer.analyze (cognitive 18) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:39 — RouteWayTypeAnalyzer.analyze has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RouteWayTypeAnalyzer.analyze (cognitive 18) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/RouteWayTypeAnalyzer.scala:39 — RouteWayTypeAnalyzer.analyze has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RouteGapAnalyzer.analyze (cognitive 16) · ×2
  • RouteGapAnalyzer.analyze (cognitive 16) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:15 — RouteGapAnalyzer.analyze has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RouteGapAnalyzer.analyze (cognitive 16) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/RouteGapAnalyzer.scala:15 — RouteGapAnalyzer.analyze has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StructureElementAnalyzer.xxx (cognitive 16) · ×2
  • StructureElementAnalyzer.xxx (cognitive 16) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:385 — StructureElementAnalyzer.xxx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 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.
  • StructureElementAnalyzer.xxx (cognitive 16) server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:385 — StructureElementAnalyzer.xxx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RouteChangeUpdateProcessor.buildNodeChanges (cognitive 16) · ×2
  • RouteChangeUpdateProcessor.buildNodeChanges (cognitive 16) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:72 — RouteChangeUpdateProcessor.buildNodeChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (5 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.
  • RouteChangeUpdateProcessor.buildNodeChanges (cognitive 16) server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:72 — RouteChangeUpdateProcessor.buildNodeChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegBuilder.legEndsToPlanLegs (cognitive 16) · ×2
  • LegBuilder.legEndsToPlanLegs (cognitive 16) backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:60 — LegBuilder.legEndsToPlanLegs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (7 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.
  • LegBuilder.legEndsToPlanLegs (cognitive 16) server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:60 — LegBuilder.legEndsToPlanLegs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaLinkAnalyzer.processNextMember (cognitive 16) · ×2
  • JavaLinkAnalyzer.processNextMember (cognitive 16) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:78 — JavaLinkAnalyzer.processNextMember has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JavaLinkAnalyzer.processNextMember (cognitive 16) server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:78 — JavaLinkAnalyzer.processNextMember has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: SymbolShape frontend/src/app/symbol/internal/symbol-shape.ts:1 — ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlannerEngineImpl frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:42 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 31 over it, 1.08× 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 (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:40-63 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteDiffGeometryAnalyzer.scala:39-62 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:49 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:49-72 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilder.scala:49-72 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala:11-15 | server/src/main/scala/kpn/server/analyzer/engine/elevation/ElevationTile.scala:11-15 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala:91 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala:91-95 | server/src/main/scala/kpn/server/analyzer/engine/monitor/state/MonitorStateTileBuilder.scala:91-95 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (117 lines × 2) · ×2
  • Duplicated block (117 lines × 2) backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:40 — backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:40-156 | server/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:40-156 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `TimestampUtil` names `kpn.api.time.TimestampUtil` in one and `kpn.core.common.TimestampUtil` 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 (117 lines × 2) backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilderTool.scala:21 — backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilderTool.scala:21-137 | server/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilderTool.scala:21-137 — before extracting anything, compare `backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilderTool.scala` and `server/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilderTool.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 `backend/src/main/scala/kpn/server/opendata/common/OpenDataTileBuilderTool.scala:21` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (111 lines × 2) · ×2
  • Duplicated block (111 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:94 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:94-204 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala:94-204 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteSegmentAnalyzer.scala` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (111 lines × 2) backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:222 — backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:222-332 | server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala:222-332 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` and `server/src/main/scala/kpn/server/api/planner/leg/LegBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 273 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (79 lines × 2) · ×2
  • Duplicated block (79 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:103 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:103-181 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala:103-181 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/structure/StructureElementAnalyzer.scala` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 470 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (79 lines × 2) backend/src/main/scala/kpn/server/json/Json.scala:18 — backend/src/main/scala/kpn/server/json/Json.scala:18-96 | server/src/main/scala/kpn/server/json/Json.scala:18-96 — before extracting anything, compare `backend/src/main/scala/kpn/server/json/Json.scala` and `server/src/main/scala/kpn/server/json/Json.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×2
  • Duplicated block (68 lines × 2) backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:288 — backend/src/main/scala/kpn/database/index/IndexConfiguration.scala:288-355 | server/src/main/scala/kpn/database/index/IndexConfiguration.scala:288-355 — before extracting anything, compare `backend/src/main/scala/kpn/database/index/IndexConfiguration.scala` and `server/src/main/scala/kpn/database/index/IndexConfiguration.scala` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 366 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (68 lines × 2) backend/src/main/scala/kpn/server/analyzer/Analyzer.scala:34 — backend/src/main/scala/kpn/server/analyzer/Analyzer.scala:34-101 | server/src/main/scala/kpn/server/analyzer/Analyzer.scala:34-101 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/Analyzer.scala` and `server/src/main/scala/kpn/server/analyzer/Analyzer.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (67 lines × 2) · ×2
  • Duplicated block (67 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/monitor/MonitorRouteOsmSegmentAnalyzer.scala:27 — backend/src/main/java/kpn/server/analyzer/engine/monitor/MonitorRouteOsmSegmentAnalyzer.scala:27-93 | server/src/main/java/kpn/server/analyzer/engine/monitor/MonitorRouteOsmSegmentAnalyzer.scala:27-93 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/monitor/MonitorRouteOsmSegmentAnalyzer.scala` and `server/src/main/java/kpn/server/analyzer/engine/monitor/MonitorRouteOsmSegmentAnalyzer.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 (67 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:105 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:105-171 | server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:105-171 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (66 lines × 2) · ×2
  • Duplicated block (66 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:44 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:44-109 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:44-109 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxAnalyze.scala:44` 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 (66 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:91 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:91-156 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala:91-156 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteMemberAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 166 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (63 lines × 2) · ×2
  • Duplicated block (63 lines × 2) backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialRouteChangeBuilder.scala:26 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialRouteChangeBuilder.scala:26-88 | server/src/main/scala/kpn/server/analyzer/full/analyzers/InitialRouteChangeBuilder.scala:26-88 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/InitialRouteChangeBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/InitialRouteChangeBuilder.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 (63 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.scala:43 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.scala:43-105 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.scala:43-105 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpdate.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.
D4 · Code Duplication · Duplicated block (58 lines × 2) · ×2
  • Duplicated block (58 lines × 2) backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:171 — backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:171-228 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:171-228 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` and `server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 209 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (58 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java:12 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java:12-69 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java:12-69 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java` and `server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 4) · ×2
  • Duplicated block (19–20 lines × 4) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:130 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:130-149 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:436-454 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:130-149 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:436-454 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:130` 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 (19–20 lines × 4) backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:22 — backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:22-41 | backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:46-64 | server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:22-41 | server/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageBuilder.scala:46-64 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/analyzer/engine/changes/builder/NodeChangeInfoBuilder.scala:22` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 6) · ×2
  • Duplicated block (18 lines × 6) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:174 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:174-191 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:205-222 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:236-253 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:174-191 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:205-222 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:236-253 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:174` 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 × 6) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:616 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:616-633 | backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:710-727 | backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:759-776 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:616-633 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:710-727 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:759-776 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:616` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×2
  • Duplicated block (18 lines × 4) backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:66 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:66-83 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:44-61 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:66-83 | server/src/main/scala/kpn/core/tools/location/LocationBuilderSpain.scala:44-61 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:66` 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 × 4) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:71 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:71-88 | backend/src/main/scala/kpn/server/monitor/route/MonitorRouteSegmentsPageBuilder.scala:91-108 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:72-89 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteSegmentsPageBuilder.scala:91-108 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:71` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:33 — backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:33-43 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:34-44 | server/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:33-43 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_Route.scala:34-44 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/facts/MongoQueryRoutesWithFact.scala:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 4) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala:50 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala:50-60 | backend/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:141-151 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala:50-60 | server/src/main/scala/kpn/server/monitor/route/MonitorRouteMembersPageBuilder.scala:141-151 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/route/RouteMembersPageBuilder.scala` as WHOLE FILES: this scan already matched 4 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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×2
  • Duplicated block (11 lines × 6) backend/src/main/scala/kpn/core/overpass/QueryFullRelations.scala:5 — backend/src/main/scala/kpn/core/overpass/QueryFullRelations.scala:5-15 | backend/src/main/scala/kpn/core/overpass/QueryRelationIds.scala:5-15 | backend/src/main/scala/kpn/core/overpass/QueryRelations.scala:5-15 | server/src/main/scala/kpn/core/overpass/QueryFullRelations.scala:5-15 | server/src/main/scala/kpn/core/overpass/QueryRelationIds.scala:5-15 | server/src/main/scala/kpn/core/overpass/QueryRelations.scala:5-15 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/QueryFullRelations.scala` and `server/src/main/scala/kpn/core/overpass/QueryFullRelations.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 (11 lines × 6) backend/src/main/scala/kpn/core/data/DataBuilder.scala:130 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:130-140 | backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:108-118 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:99-109 | server/src/main/scala/kpn/core/data/DataBuilder.scala:130-140 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:108-118 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:99-109 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (83 lines × 2) · ×2
  • Duplicated block (83 lines × 2) backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNetworkAnalyzer.scala:27 — backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNetworkAnalyzer.scala:27-109 | server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNetworkAnalyzer.scala:27-109 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNetworkAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/full/analyzers/FullBaseNetworkAnalyzer.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 (83 lines × 2) backend/src/main/scala/kpn/server/repository/LocationRepository.scala:32 — backend/src/main/scala/kpn/server/repository/LocationRepository.scala:32-114 | server/src/main/scala/kpn/server/repository/LocationRepository.scala:32-114 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/LocationRepository.scala` and `server/src/main/scala/kpn/server/repository/LocationRepository.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.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×2
  • Duplicated block (26 lines × 2 locations) frontend/src/app/map/sources/route-source.ts:91 — frontend/src/app/map/sources/route-source.ts:91 · frontend/src/app/map/sources/route-source.ts:118 — both copies are in the same file, so extract the 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 (26 lines × 2 locations) frontend/src/app/planner/domain/context/planner-test-setup.ts:63 — frontend/src/app/planner/domain/context/planner-test-setup.ts:63 · frontend/src/app/planner/domain/context/planner-test-setup.ts:96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (26 lines × 3 locations) · ×2
  • Duplicated block (26 lines × 3 locations) frontend/src/app/ol/layers/route-change-layers.ts:62 — frontend/src/app/ol/layers/route-change-layers.ts:62 · frontend/src/app/ol/layers/route-change-layers.ts:108 · frontend/src/app/ol/layers/route-change-layers.ts:155 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (26 lines × 3 locations) frontend/src/app/symbol/internal/symbol-parser.ts:68 — frontend/src/app/symbol/internal/symbol-parser.ts:68 · frontend/src/app/symbol/internal/symbol-parser.ts:133 · frontend/src/app/symbol/internal/symbol-parser.ts:210 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function largeNodeStyle (cyclomatic 12, cognitive 28) · ×2
  • Complex function largeNodeStyle (cyclomatic 12, cognitive 28) frontend/src/app/mapold/style/explore-style-survey.ts:95 — largeNodeStyle has cyclomatic complexity 12 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function largeNodeStyle (cyclomatic 12, cognitive 28) frontend/src/app/ol/style/survey-date-style.ts:29 — largeNodeStyle has cyclomatic complexity 12 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R7 · Dead Code · Dead file (~60 LoC) · ×2
  • Dead file (~60 LoC) frontend/src/app/analysis/components/edit/edit-and-paginator.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~60 LoC) frontend/src/app/shared/components/page/page-footer.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~47 LoC) · ×2
  • Dead file (~47 LoC) frontend/src/app/planner/domain/plan/print-plan.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~47 LoC) frontend/src/app/shared/components/sidebar/sidebar.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (frontend/src/app/analysis/node/internal/changes/components/node-changes-sidebar.component.ts, frontend/src/app/analysis/subset/internal/orphan-routes/components/subset-orphan-routes-sidebar.component.ts, frontend/src/app/shared/base/base-sidebar.component.ts and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~42 LoC) · ×2
  • Dead file (~42 LoC) frontend/src/app/analysis/components/changes/fact-comma-list.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~42 LoC) frontend/src/app/route/internal/components/route-segment.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~41 LoC) · ×2
  • Dead file (~41 LoC) frontend/src/app/route/internal/components/route-path.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/route/internal/components/route-paths.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
  • Dead file (~41 LoC) frontend/src/app/shared/components/json/json.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~39 LoC) · ×2
  • Dead file (~39 LoC) frontend/src/app/analysis/components/action/action-button-network-fact-node-checks.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~39 LoC) frontend/src/app/analysis/components/action/action-button-network-fact-nodes.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~33 LoC) · ×2
  • Dead file (~33 LoC) frontend/src/app/planner/domain/debug/planner-marker-layer-printer.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~33 LoC) frontend/src/app/planner/pages/planner/sidebar/elevation-profile.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X18 · Disposal-pattern correctness · Disposable created and abandoned in the function that made it · ×2
  • Disposable created and abandoned in the function that made it server/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.scala:19 — `Source.fromFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.getLines` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Source.fromFile(…)) { 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 backend/src/main/scala/kpn/server/analyzer/engine/changes/ReplicationStateReader.scala:19 — `Source.fromFile(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and its only use reads `.getLines` through it and drops it, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `scala.util.Using.resource(Source.fromFile(…)) { r => … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
AC4 · Keyboard semantics · Link used as a button (placeholder href) · ×1
  • Link used as a button (placeholder href) frontend/src/app/planner/pages/planner/popup/planner-popup.component.ts:14 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard REDACTED:51 — `.lds-ring div` moves (`animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · FactNameComponent.ngOnInit (cyclomatic 41) · ×1
  • FactNameComponent.ngOnInit (cyclomatic 41) frontend/src/app/analysis/fact/components/fact-name.component.ts:17 — FactNameComponent.ngOnInit has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlannerEngineImpl.handleDragEvent (cyclomatic 28) · ×1
  • PlannerEngineImpl.handleDragEvent (cyclomatic 28) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:147 — PlannerEngineImpl.handleDragEvent has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlannerEngineImpl.handleUpEvent (cyclomatic 22) · ×1
  • PlannerEngineImpl.handleUpEvent (cyclomatic 22) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:278 — PlannerEngineImpl.handleUpEvent has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonitorWebsocketService.sendCommand (cyclomatic 18) · ×1
  • MonitorWebsocketService.sendCommand (cyclomatic 18) frontend/src/app/monitor/internal/monitor-websocket.service.ts:27 — MonitorWebsocketService.sendCommand has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 62, 52, 93, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ExplorePageComponent.listRoutesInMap (cyclomatic 18) · ×1
  • ExplorePageComponent.listRoutesInMap (cyclomatic 18) frontend/src/app/explore/explore-page.component.ts:155 — ExplorePageComponent.listRoutesInMap has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 164, 196, 191, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RouteSources.update (cyclomatic 18) · ×1
  • RouteSources.update (cyclomatic 18) frontend/src/app/map/sources/route-sources.ts:26 — RouteSources.update has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 29). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DrawLink.drawWay (cyclomatic 17) · ×1
  • DrawLink.drawWay (cyclomatic 17) frontend/src/app/shared/components/structure/draw-link.ts:52 — DrawLink.drawWay has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D17 · Explicit Debt · TodoComment repeated across 12 files · ×1
  • TodoComment repeated across 12 files server/src/test/scala/kpn/server/api/planner/leg/GraphTestData.scala:66 — The identical TodoComment appears in 12 files (12 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 12 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO redesign". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · PlannerEngineImpl.handleDragEvent (cognitive 61) · ×1
  • PlannerEngineImpl.handleDragEvent (cognitive 61) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:147 — PlannerEngineImpl.handleDragEvent has cognitive complexity 61 (threshold 15). Drivers by points: if/else 29 (55 pts), boolean chains 6 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlannerEngineImpl.handleUpEvent (cognitive 45) · ×1
  • PlannerEngineImpl.handleUpEvent (cognitive 45) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:278 — PlannerEngineImpl.handleUpEvent has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 5 (nesting depth added 22). Of this number, 43 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SymbolParser.parseForeground (cognitive 42) · ×1
  • SymbolParser.parseForeground (cognitive 42) frontend/src/app/symbol/internal/symbol-parser.ts:128 — SymbolParser.parseForeground has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (41 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (SymbolParser.parseForeground2) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SymbolParser.parseForeground2 (cognitive 42) · ×1
  • SymbolParser.parseForeground2 (cognitive 42) frontend/src/app/symbol/internal/symbol-parser.ts:205 — SymbolParser.parseForeground2 has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (41 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (SymbolParser.parseForeground) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · FactNameComponent.ngOnInit (cognitive 41) · ×1
  • FactNameComponent.ngOnInit (cognitive 41) frontend/src/app/analysis/fact/components/fact-name.component.ts:17 — FactNameComponent.ngOnInit has cognitive complexity 41 (threshold 15). Drivers by points: if/else 41. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PdfDocument.drawGrid (cognitive 36) · ×1
  • PdfDocument.drawGrid (cognitive 36) frontend/src/app/planner/pdf/plan/pdf-document.ts:39 — PdfDocument.drawGrid has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorWebsocketService.sendCommand (cognitive 33) · ×1
  • MonitorWebsocketService.sendCommand (cognitive 33) frontend/src/app/monitor/internal/monitor-websocket.service.ts:27 — MonitorWebsocketService.sendCommand has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (33 pts) (nesting depth added 13). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 62, 93, 52, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SymbolParser.parseBackground (cognitive 33) · ×1
  • SymbolParser.parseBackground (cognitive 33) frontend/src/app/symbol/internal/symbol-parser.ts:48 — SymbolParser.parseBackground has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RouteSources.update (cognitive 32) · ×1
  • RouteSources.update (cognitive 32) frontend/src/app/map/sources/route-sources.ts:26 — RouteSources.update has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (31 pts), ternaries 1 (nesting depth added 15). None of this is in the body itself: all 32 points belong to one function literal inside it that branches (line 29). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ExploreStyleSurvey.largeNodeStyle (cognitive 28) · ×1
  • ExploreStyleSurvey.largeNodeStyle (cognitive 28) frontend/src/app/mapold/style/explore-style-survey.ts:95 — ExploreStyleSurvey.largeNodeStyle has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (28 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SurveyDateStyle.largeNodeStyle (cognitive 28) · ×1
  • SurveyDateStyle.largeNodeStyle (cognitive 28) frontend/src/app/ol/style/survey-date-style.ts:29 — SurveyDateStyle.largeNodeStyle has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (28 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NetworkMapStyle.nodeStyle (cognitive 27) · ×1
  • NetworkMapStyle.nodeStyle (cognitive 27) frontend/src/app/ol/style/network-map-style.ts:35 — NetworkMapStyle.nodeStyle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplorePageComponent.listRoutesInMap (cognitive 23) · ×1
  • ExplorePageComponent.listRoutesInMap (cognitive 23) frontend/src/app/explore/explore-page.component.ts:155 — ExplorePageComponent.listRoutesInMap has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, ternaries 1 (nesting depth added 6). None of this is in the body itself: all 23 points belong to 4 function literals inside it that branch (lines 164, 196, 191, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PlannerEngineImpl.handleMoveEvent (cognitive 22) · ×1
  • PlannerEngineImpl.handleMoveEvent (cognitive 22) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:85 — PlannerEngineImpl.handleMoveEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DrawLink.drawWay (cognitive 21) · ×1
  • DrawLink.drawWay (cognitive 21) frontend/src/app/shared/components/structure/draw-link.ts:52 — DrawLink.drawWay has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MonitorLayerStyle.segmentsModeStyle (cognitive 20) · ×1
  • MonitorLayerStyle.segmentsModeStyle (cognitive 20) frontend/src/app/mapold/style/monitor-layer-style.ts:80 — MonitorLayerStyle.segmentsModeStyle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ExploreStyleStandard.style (cognitive 19) · ×1
  • ExploreStyleStandard.style (cognitive 19) frontend/src/app/mapold/style/explore-style-standard.ts:70 — ExploreStyleStandard.style has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (19 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PreferencesService.constructor (cognitive 19) · ×1
  • PreferencesService.constructor (cognitive 19) frontend/src/app/shared/core/preferences/preferences.service.ts:13 — PreferencesService.constructor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorRouteGapBuilder.drawLines (cognitive 18) · ×1
  • MonitorRouteGapBuilder.drawLines (cognitive 18) frontend/src/app/monitor/internal/route/monitor-route-gap-builder.ts:64 — MonitorRouteGapBuilder.drawLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainMapNodeStyle.determineLargeNodeStyle (cognitive 18) · ×1
  • MainMapNodeStyle.determineLargeNodeStyle (cognitive 18) frontend/src/app/ol/style/main-map-node-style.ts:85 — MainMapNodeStyle.determineLargeNodeStyle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RouteGapBuilder.drawLines (cognitive 18) · ×1
  • RouteGapBuilder.drawLines (cognitive 18) frontend/src/app/route/internal/components/structure/route-gap-builder.ts:64 — RouteGapBuilder.drawLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DayUtil.toString (cognitive 18) · ×1
  • DayUtil.toString (cognitive 18) frontend/src/app/shared/components/day-util.ts:25 — DayUtil.toString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 31 shared lines) · ×1
  • Near-duplicate member family (6 members, 31 shared lines) backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:86 — backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:86-167 | backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:169-236 | backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:238-297 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:86-167 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:169-236 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:238-297 — These 6 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 52 shared lines) · ×1
  • Near-duplicate member family (4 members, 52 shared lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:321 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:321-376 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:378-433 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:321-376 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:378-433 — These 4 members are variants of one another: a block of 52 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 51 shared lines) · ×1
  • Near-duplicate member family (4 members, 51 shared lines) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56-267 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63-169 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:56-267 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:63-169 — These 4 members are variants of one another: a block of 51 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 31 shared lines) · ×1
  • Near-duplicate member family (4 members, 31 shared lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:263 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:263-319 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:321-376 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:263-319 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:321-376 — These 4 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 30 shared lines) · ×1
  • Near-duplicate member family (4 members, 30 shared lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:177 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:177-217 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:219-261 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:177-217 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:219-261 — These 4 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 20 shared lines) · ×1
  • Near-duplicate member family (4 members, 20 shared lines) backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:119 — backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:119-168 | backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:170-228 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:119-168 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:170-228 — These 4 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) backend/api/src/main/scala/kpn/api/common/route/GeometryDiff.scala:11 — backend/api/src/main/scala/kpn/api/common/route/GeometryDiff.scala:11-43 | server/src/main/scala/kpn/api/common/route/GeometryDiff.scala:11-43 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:42 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:42-79 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:202-218 | backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:36-67 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:33-64 | backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:24-56 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:42-79 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:202-218 | server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:36-67 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:33-64 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:24-56 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:280 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:280-327 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:234-274 | backend/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:36-69 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:31-73 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:280-327 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:234-274 | server/src/main/scala/kpn/database/actions/networks/MongoQuerySubsetNetworks.scala:36-69 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteDetails.scala:31-73 — 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 copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:29 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:29-70 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeUpdateProcessor.scala:29-70 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:13 — backend/src/main/scala/kpn/core/builders/MonitorRouteRelationBuilder.scala:13-63 | server/src/main/scala/kpn/api/common/monitor/MonitorRouteRelation.scala:14-64 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:72 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:72-126 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/base/BaseRouteChangeCreateProcessor.scala:71-125 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (70 corresponding lines) · ×1
  • Edited copy of a member (70 corresponding lines) backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:109 — backend/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:109-178 | server/src/main/scala/kpn/core/replicate/ReplicatorTool.scala:109-178 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:53 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:53-88 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:54-89 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:152 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:152-188 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteTileAnalyzer.scala:152-188 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) backend/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:9 — backend/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:9-28 | server/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:9-28 | server/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:30-49 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:168 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:168-201 | server/src/main/scala/kpn/server/monitor/route/update/MonitorUpdateAnalysis.scala:168-201 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 40+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 40+ corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:17 — backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:17-56 | backend/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala:18-59 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeCreateProcessor.scala:17-56 | server/src/main/scala/kpn/server/analyzer/engine/changes/route/main/RouteChangeDeleteProcessor.scala:18-59 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 40 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 (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) backend/src/main/scala/kpn/server/monitor/group/MonitorGroupPageBuilder.scala:21 — backend/src/main/scala/kpn/server/monitor/group/MonitorGroupPageBuilder.scala:21-49 | server/src/main/scala/kpn/server/monitor/group/MonitorGroupPageBuilder.scala:21-49 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:21 — backend/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:21-46 | server/src/main/scala/kpn/server/api/analysis/pages/route/RouteSegmentsPageBuilder.scala:22-47 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:255 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:255-281 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmAnalyze.scala:256-282 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:31 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:31-46 | backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:77-93 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:31-46 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeChangeStateAnalyzer.scala:77-93 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:91 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:91-103 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:105-118 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:91-103 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:105-118 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:40 — backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:40-46 | backend/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:48-54 | server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:40-46 | server/src/main/scala/kpn/server/analyzer/engine/poi/KnownPoiCacheImpl.scala:48-54 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:18 — backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:18-30 | backend/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:22-33 | server/src/main/scala/kpn/core/tools/support/FindDeletedNodesTool.scala:18-30 | server/src/main/scala/kpn/core/tools/support/FindDeletedRoutesTool.scala:22-33 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) backend/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala:27 — backend/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala:27-35 | backend/src/main/scala/kpn/core/tools/support/DownloadRelationTool.scala:27-34 | server/src/main/scala/kpn/core/tools/support/DownloadNodeTool.scala:27-35 | server/src/main/scala/kpn/core/tools/support/DownloadRelationTool.scala:27-34 — 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 copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala:57 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala:57-65 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.scala:50-58 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/base/analyzers/BaseNetworkNameAnalyzer.scala:57-65 | server/src/main/scala/kpn/server/analyzer/engine/analysis/network/main/analyzers/NetworkNameAnalyzer.scala:50-58 — 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 copies of one member (8 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 8+ corresponding lines) backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:69 — backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:69-76 | backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:82-89 | backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:95-102 | backend/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:113-121 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:68-75 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:81-88 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:94-101 | server/src/main/scala/kpn/server/repository/ChangeSetRepository.scala:112-120 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:97 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:97-100 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:127-130 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteLinksReport.scala:97-100 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/report/RouteSegmentReport.scala:127-130 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (122 lines × 2) · ×1
  • Duplicated block (122 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageExample.scala:33 — backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageExample.scala:33-154 | server/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageExample.scala:33-154 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/node/NodeChangesPageExample.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (200 lines × 2) · ×1
  • Duplicated block (200 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:606 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:606-805 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:606-805 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (104 lines × 2) · ×1
  • Duplicated block (104 lines × 2) backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpload.scala:47 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpload.scala:47-150 | server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpload.scala:47-150 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpload.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorGpxUpload.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. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (331 lines × 2) · ×1
  • Duplicated block (331 lines × 2) backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:67 — backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:67-397 | server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala:67-397 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` and `server/src/main/scala/kpn/server/api/analysis/pages/ChangeSetPageExample.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 738 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (92 lines × 2) · ×1
  • Duplicated block (92 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageRetrieverImpl.scala:46 — backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageRetrieverImpl.scala:46-137 | server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageRetrieverImpl.scala:46-137 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageRetrieverImpl.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/image/PoiImageRetrieverImpl.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. Note first that the copies are not typed on the same thing: `Time` names `kpn.api.time.Time` in one and `kpn.core.common.Time` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (77 lines × 2) · ×1
  • Duplicated block (77 lines × 2) backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:38 — backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:38-114 | server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala:38-114 — before extracting anything, compare `backend/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala` and `server/src/main/scala/kpn/core/overpass/OverpassQueryExecutorLocalImpl.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (101 lines × 2) · ×1
  • Duplicated block (101 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:114 — backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:114-214 | server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala:114-214 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/monitor/changes/MonitorChangeProcessor.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 178 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (69 lines × 2) · ×1
  • Duplicated block (69 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:10 — backend/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:10-78 | server/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala:10-78 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala` and `server/src/main/scala/kpn/server/analyzer/engine/tiles/CohenSutherland.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (65 lines × 2) · ×1
  • Duplicated block (65 lines × 2) backend/src/main/scala/kpn/core/analysis/Facts.scala:21 — backend/src/main/scala/kpn/core/analysis/Facts.scala:21-85 | server/src/main/scala/kpn/core/analysis/Facts.scala:21-85 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/Facts.scala` and `server/src/main/scala/kpn/core/analysis/Facts.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (64 lines × 2) · ×1
  • Duplicated block (64 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:149 — backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:149-212 | server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala:149-212 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/poi/PoiChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (118 lines × 2) · ×1
  • Duplicated block (118 lines × 2) backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:63 — backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala:63-180 | server/src/main/scala/kpn/core/report/LinkImageBuilder.scala:63-180 — before extracting anything, compare `backend/src/main/scala/kpn/core/report/LinkImageBuilder.scala` and `server/src/main/scala/kpn/core/report/LinkImageBuilder.scala` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (211 lines × 2) · ×1
  • Duplicated block (211 lines × 2) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:57 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:57-267 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:57-267 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (74 lines × 2) · ×1
  • Duplicated block (74 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteDocBuilder.scala:21 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteDocBuilder.scala:21-94 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteDocBuilder.scala:21-94 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteDocBuilder.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/BaseRouteDocBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeCreateProcessor.scala:16 — backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeCreateProcessor.scala:16-63 | server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeCreateProcessor.scala:16-63 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeCreateProcessor.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/network/main/NetworkChangeCreateProcessor.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (78 lines × 2) · ×1
  • Duplicated block (78 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:30 — backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:30-107 | server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala:30-107 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/changes/node/main/NodeDocChangeAnalyzer.scala` as WHOLE FILES: this scan already matched 3 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.
D4 · Code Duplication · Duplicated block (80 lines × 2) · ×1
  • Duplicated block (80 lines × 2) backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:88 — backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:88-167 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:88-167 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala` and `server/src/main/scala/kpn/server/api/status/StatusFacade.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 235 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (30–31 lines × 10) · ×1
  • Duplicated block (30–31 lines × 10) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:188 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:188-217 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:232-261 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:289-319 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:346-376 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:403-433 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:188-217 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:232-261 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:289-319 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:346-376 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:403-433 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:188` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:229` calls `unwind` and `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:185` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31 lines × 6) · ×1
  • Duplicated block (31 lines × 6) backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:120 — backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:120-150 | backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:185-215 | backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:249-279 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:120-150 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:185-215 | server/src/main/scala/kpn/server/api/status/StatusFacade.scala:249-279 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala` and `server/src/main/scala/kpn/server/api/status/StatusFacade.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 235 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/api/status/StatusFacade.scala:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 4) · ×1
  • Duplicated block (27 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:134 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:134-160 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:135-161 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:134-160 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:135-161 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:134` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (23 lines × 4) · ×1
  • Duplicated block (23 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:90 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:90-112 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:161-183 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:90-112 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:161-183 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationFacts.scala:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:103 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:103-126 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:104-127 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:103-126 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:104-127 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:103` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (21–22 lines × 4) · ×1
  • Duplicated block (21–22 lines × 4) backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:47 — backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:47-67 | backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:53-74 | server/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:47-67 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanNodes.scala:53-74 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala` and `server/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/nodes/MongoQueryOrphanNodes.scala:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–21 lines × 4) · ×1
  • Duplicated block (20–21 lines × 4) backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:144 — backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:144-164 | backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:203-222 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:144-164 | server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:203-222 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` and `server/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 209 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:222` calls `computed` and `backend/src/main/scala/kpn/database/actions/base/ChangeCountPipeline.scala:164` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×1
  • Duplicated block (21 lines × 4) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:323 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:323-343 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:380-400 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:323-343 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:380-400 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:323` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:41 — backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:41-60 | backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:44-63 | server/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:41-60 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:44-63 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala` and `server/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:41` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetOrphanRoutes.scala:42` calls `equal`, `country`, `routeType` and `backend/src/main/scala/kpn/database/actions/routes/MongoQueryOrphanRoutes.scala:40` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–20 lines × 4) · ×1
  • Duplicated block (18–20 lines × 4) backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:669 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:669-688 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:702-719 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:669-688 | server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:702-719 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 474 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/post/StatisticsUpdater.scala:669` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–18 lines × 6) · ×1
  • Duplicated block (16–18 lines × 6) backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:81 — backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:81-96 | backend/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:182-197 | backend/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:19-36 | server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:81-96 | server/src/main/scala/kpn/core/tools/monitor/support/OldMonitorTileTool.scala:182-197 | server/src/main/scala/kpn/server/analyzer/engine/tiles/TileFileRepository.scala:19-36 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala` and `server/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/monitor/support/MonitorTileEncoder.scala:81` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowUpdate.scala:38 — backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowUpdate.scala:38-54 | backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala:36-52 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowUpdate.scala:38-54 | server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmUpdate.scala:36-52 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowUpdate.scala` and `server/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowUpdate.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/server/monitor/route/update/MonitorOsmNowUpdate.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.
D4 · Code Duplication · Duplicated block (4–16 lines × 4) · ×1
  • Duplicated block (4–16 lines × 4) backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:14 — backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:14-17 | backend/src/main/scala/kpn/core/tools/tile/TileToolOptions.scala:13-28 | server/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:14-17 | server/src/main/scala/kpn/core/tools/tile/TileToolOptions.scala:13-28 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:13` calls `head`, `required` and `backend/src/main/scala/kpn/core/tools/tile/TileToolOptions.scala:13` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) backend/src/main/scala/kpn/core/data/DataBuilder.scala:114 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:114-128 | backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:92-106 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:83-97 | server/src/main/scala/kpn/core/data/DataBuilder.scala:114-128 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:92-106 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:83-97 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:36 — backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:36-49 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:43-56 | backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala:34-47 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:36-49 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:43-56 | server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkFacts.scala:34-47 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala` and `server/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetNetworkElementIdFacts.scala:57` calls `computed` and `backend/src/main/scala/kpn/database/actions/facts/MongoQuerySubsetFactRefs_NetworkFactsWithElementIds.scala:50` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×1
  • Duplicated block (12–13 lines × 4) backend/src/main/scala/kpn/core/data/DataBuilder.scala:65 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:65-76 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:41-53 | server/src/main/scala/kpn/core/data/DataBuilder.scala:65-76 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:41-53 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala` as WHOLE FILES: this scan already matched 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/core/data/DataBuilder.scala:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:283 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:283-295 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:238-250 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:283-295 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala:238-250 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationRoutes.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–12 lines × 4) · ×1
  • Duplicated block (10–12 lines × 4) backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:16 — backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:16-27 | backend/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:18-27 | server/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:16-27 | server/src/main/scala/kpn/core/tools/poi/PoiTileUpdateToolOptions.scala:18-27 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala` and `server/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.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 `backend/src/main/scala/kpn/core/tools/poi/PoiTileTaskToolOptions.scala:16` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) backend/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:10 — backend/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:10-25 | server/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:10-25 | server/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala:31-46 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala` and `server/src/main/scala/kpn/tools/code/typescript/CamelCaseUtil.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:26 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:26-35 | backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:40-49 | backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:53-61 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:26-35 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:40-49 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:53-61 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeCountsDemo.scala:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:176 — backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:176-181 | backend/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:42-48 | server/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala:176-181 | server/src/main/scala/kpn/server/analyzer/engine/changes/changes/ChangeSetInfoApiImpl.scala:42-48 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala` and `server/src/main/scala/kpn/core/tools/support/FindDeletedNodesHistoryTool.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:347 — backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:347-353 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:456-462 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:475-481 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:347-353 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:456-462 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:475-481 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` and `server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 435 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:347` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:345` calls `integrityCheckFailedFilter`, `factFilter` and `backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationNodes.scala:474` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 10) · ×1
  • Duplicated block (5 lines × 10) backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:56 — backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:56-60 | backend/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:209-213 | backend/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:40-44 | backend/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:37-41 | backend/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:29-33 | server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala:56-60 | server/src/main/scala/kpn/database/actions/locations/MongoQueryLocationChanges.scala:209-213 | server/src/main/scala/kpn/database/actions/networks/MongoQueryNetworkChanges.scala:40-44 | server/src/main/scala/kpn/database/actions/routes/MongoQueryRouteChanges.scala:37-41 | server/src/main/scala/kpn/database/actions/subsets/MongoQuerySubsetChanges.scala:29-33 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala` and `server/src/main/scala/kpn/database/actions/changes/MongoQueryChangeSetSummaries.scala` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:19 — backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:19-22 | backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:33-37 | server/src/main/scala/kpn/api/custom/Timestamp.scala:14-17 | server/src/main/scala/kpn/api/custom/Timestamp.scala:28-32 — before extracting anything, compare `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala` and `server/src/main/scala/kpn/api/custom/Timestamp.scala` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:39` calls `fromIso` and `backend/api/src/main/scala/kpn/api/custom/Timestamp.scala:22` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) backend/api/src/main/scala/kpn/api/common/network/NetworkRouteRow.scala:23 — backend/api/src/main/scala/kpn/api/common/network/NetworkRouteRow.scala:23-35 | backend/src/main/scala/kpn/core/doc/NetworkRouteDetail.scala:27-39 | server/src/main/scala/kpn/core/doc/NetworkRouteDetail.scala:26-38 — before extracting anything, compare `backend/src/main/scala/kpn/core/doc/NetworkRouteDetail.scala` and `server/src/main/scala/kpn/core/doc/NetworkRouteDetail.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (110 lines × 2) · ×1
  • Duplicated block (110 lines × 2) backend/src/main/scala/kpn/core/analysis/Network.scala:27 — backend/src/main/scala/kpn/core/analysis/Network.scala:27-136 | server/src/main/scala/kpn/core/analysis/Network.scala:27-136 — before extracting anything, compare `backend/src/main/scala/kpn/core/analysis/Network.scala` and `server/src/main/scala/kpn/core/analysis/Network.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) backend/src/main/scala/kpn/core/tools/location/LocationData.scala:16 — backend/src/main/scala/kpn/core/tools/location/LocationData.scala:16-74 | server/src/main/scala/kpn/core/tools/location/LocationData.scala:16-74 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationData.scala` and `server/src/main/scala/kpn/core/tools/location/LocationData.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 `backend/src/main/scala/kpn/core/tools/location/LocationData.scala:16` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (100 lines × 2) · ×1
  • Duplicated block (100 lines × 2) backend/src/main/scala/kpn/core/tools/operation/OperationActions.scala:19 — backend/src/main/scala/kpn/core/tools/operation/OperationActions.scala:19-118 | server/src/main/scala/kpn/core/tools/operation/OperationActions.scala:19-118 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/operation/OperationActions.scala` and `server/src/main/scala/kpn/core/tools/operation/OperationActions.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (174 lines × 2) · ×1
  • Duplicated block (174 lines × 2) backend/src/main/scala/kpn/core/util/Log.scala:21 — backend/src/main/scala/kpn/core/util/Log.scala:21-194 | server/src/main/scala/kpn/core/util/Log.scala:21-194 — before extracting anything, compare `backend/src/main/scala/kpn/core/util/Log.scala` and `server/src/main/scala/kpn/core/util/Log.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 `backend/src/main/scala/kpn/core/util/Log.scala:21` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (137 lines × 2) · ×1
  • Duplicated block (137 lines × 2) backend/src/main/scala/kpn/database/actions/routes/QueryBuilder.scala:13 — backend/src/main/scala/kpn/database/actions/routes/QueryBuilder.scala:13-149 | server/src/main/scala/kpn/database/actions/routes/QueryBuilder.scala:13-149 — before extracting anything, compare `backend/src/main/scala/kpn/database/actions/routes/QueryBuilder.scala` and `server/src/main/scala/kpn/database/actions/routes/QueryBuilder.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (167 lines × 2) · ×1
  • Duplicated block (167 lines × 2) backend/src/main/scala/kpn/database/base/Database.scala:47 — backend/src/main/scala/kpn/database/base/Database.scala:47-213 | server/src/main/scala/kpn/database/base/Database.scala:47-213 — before extracting anything, compare `backend/src/main/scala/kpn/database/base/Database.scala` and `server/src/main/scala/kpn/database/base/Database.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. Note first that the copies are not typed on the same thing: `WithStringId` names `kpn.api.id.WithStringId` in one and `kpn.core.doc.WithStringId` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (90 lines × 2) · ×1
  • Duplicated block (90 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteAnalysisContext.scala:71 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteAnalysisContext.scala:71-160 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteAnalysisContext.scala:71-160 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteAnalysisContext.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/BaseRouteAnalysisContext.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (108 lines × 2) · ×1
  • Duplicated block (108 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/WayMemberLink.scala:7 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/WayMemberLink.scala:7-114 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/WayMemberLink.scala:7-114 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/WayMemberLink.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/WayMemberLink.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/domain/WayMemberLink.scala:7` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (113 lines × 2) · ×1
  • Duplicated block (113 lines × 2) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilderTrace.scala:11 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilderTrace.scala:11-123 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilderTrace.scala:11-123 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilderTrace.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilderTrace.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 `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/main/analyzers/SuperSegmentBuilderTrace.scala:11` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (327 lines × 2) · ×1
  • Duplicated block (327 lines × 2) backend/src/main/scala/kpn/server/api/analysis/AnalysisController.scala:68 — backend/src/main/scala/kpn/server/api/analysis/AnalysisController.scala:68-394 | server/src/main/scala/kpn/server/api/analysis/AnalysisController.scala:68-394 — before extracting anything, compare `backend/src/main/scala/kpn/server/api/analysis/AnalysisController.scala` and `server/src/main/scala/kpn/server/api/analysis/AnalysisController.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (139 lines × 2) · ×1
  • Duplicated block (139 lines × 2) backend/src/main/scala/kpn/server/config/AnalysisServerConfiguration.scala:28 — backend/src/main/scala/kpn/server/config/AnalysisServerConfiguration.scala:28-166 | server/src/main/scala/kpn/server/config/AnalysisServerConfiguration.scala:28-166 — before extracting anything, compare `backend/src/main/scala/kpn/server/config/AnalysisServerConfiguration.scala` and `server/src/main/scala/kpn/server/config/AnalysisServerConfiguration.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (142 lines × 2) · ×1
  • Duplicated block (142 lines × 2) backend/src/main/scala/kpn/server/monitor/MonitorController.scala:39 — backend/src/main/scala/kpn/server/monitor/MonitorController.scala:39-180 | server/src/main/scala/kpn/server/monitor/MonitorController.scala:39-180 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/MonitorController.scala` and `server/src/main/scala/kpn/server/monitor/MonitorController.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (165 lines × 2) · ×1
  • Duplicated block (165 lines × 2) backend/src/main/scala/kpn/server/monitor/MonitorFacade.scala:66 — backend/src/main/scala/kpn/server/monitor/MonitorFacade.scala:66-230 | server/src/main/scala/kpn/server/monitor/MonitorFacade.scala:66-230 — before extracting anything, compare `backend/src/main/scala/kpn/server/monitor/MonitorFacade.scala` and `server/src/main/scala/kpn/server/monitor/MonitorFacade.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (71 lines × 2) · ×1
  • Duplicated block (71 lines × 2) backend/src/main/scala/kpn/server/repository/NodeRepository.scala:27 — backend/src/main/scala/kpn/server/repository/NodeRepository.scala:27-97 | server/src/main/scala/kpn/server/repository/NodeRepository.scala:27-97 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/NodeRepository.scala` and `server/src/main/scala/kpn/server/repository/NodeRepository.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (105 lines × 2) · ×1
  • Duplicated block (105 lines × 2) backend/src/main/scala/kpn/server/repository/RouteRepository.scala:50 — backend/src/main/scala/kpn/server/repository/RouteRepository.scala:50-154 | server/src/main/scala/kpn/server/repository/RouteRepository.scala:50-154 — before extracting anything, compare `backend/src/main/scala/kpn/server/repository/RouteRepository.scala` and `server/src/main/scala/kpn/server/repository/RouteRepository.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–40 lines × 2) · ×1
  • Duplicated block (21–40 lines × 2) backend/src/main/scala/kpn/tools/code/domain/ClassInfo.scala:15 — backend/src/main/scala/kpn/tools/code/domain/ClassInfo.scala:15-35 | server/src/main/scala/kpn/tools/code/domain/ClassInfo.scala:15-54 — before extracting anything, compare `backend/src/main/scala/kpn/tools/code/domain/ClassInfo.scala` and `server/src/main/scala/kpn/tools/code/domain/ClassInfo.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.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) backend/src/main/scala/kpn/core/data/DataBuilder.scala:99 — backend/src/main/scala/kpn/core/data/DataBuilder.scala:99-111 | backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:77-89 | backend/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:68-80 | server/src/main/scala/kpn/core/data/DataBuilder.scala:99-111 | server/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala:77-89 | server/src/main/scala/kpn/server/overpass/BaseRelationBuilder.scala:68-80 — before extracting anything, compare `backend/src/main/scala/kpn/core/data/DataBuilder.scala` and `backend/src/main/scala/kpn/server/monitor/route/update/RelationTopLevelDataBuilder.scala` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:24 — backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:24-38 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:29-43 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:27-41 | backend/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:29-43 | server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala:24-38 | server/src/main/scala/kpn/core/tools/location/LocationBuilderBelgium.scala:29-43 | server/src/main/scala/kpn/core/tools/location/LocationBuilderDenmark.scala:27-41 | server/src/main/scala/kpn/core/tools/location/LocationBuilderGermany.scala:29-43 — before extracting anything, compare `backend/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` and `server/src/main/scala/kpn/core/tools/location/LocationBuilderAustria.scala` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 12) · ×1
  • Duplicated block (7 lines × 12) backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:26 — backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:26-32 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:34-40 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:42-48 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:55-61 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:63-69 | backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:71-77 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:26-32 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:34-40 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:42-48 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:55-61 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:63-69 | server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala:71-77 — before extracting anything, compare `backend/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala` and `server/src/main/scala/kpn/server/analyzer/engine/analysis/route/base/analyzers/AccessibilityAnalyzer.scala` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (171 lines × 2) · ×1
  • Duplicated block (171 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:229 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:229-399 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:229-399 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` and `server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 468 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (95 lines × 2) · ×1
  • Duplicated block (95 lines × 2) backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:412 — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:412-506 | server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:412-506 — before extracting anything, compare `backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` and `server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 468 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: base — base: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — frontend/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
R10 · Code Duplication · Duplication concentrated across 15 sibling directories (62 clone groups) · ×1
  • Duplication concentrated across 15 sibling directories (62 clone groups) frontend/src/app/mapold/poi/poi.service.ts:14 — 62 duplicated blocks under frontend/src/app/ have copies in at least two of the sibling directories analysis, explore, map, mapold, monitor, ol (+9 more sibling(s) not listed) — 32 of them are reported below, and 30 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 62 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 62 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 62 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 9 sibling directories (38 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (38 clone groups) frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:17 — 38 duplicated blocks under frontend/src/app/analysis/ have copies in at least two of the sibling directories changes, changeset, components, location, network, node (+3 more sibling(s) not listed) — 19 of them are reported below, and 19 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 38 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 38 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 38 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 11 sibling directories (13 clone groups) · ×1
  • Duplication concentrated across 11 sibling directories (13 clone groups) frontend/src/app/monitor/internal/route/delete/monitor-route-delete-page.service.ts:17 — 13 duplicated blocks under frontend/src/app/monitor/internal/route/ have copies in at least two of the sibling directories add, change, changes, components, delete, details (+5 more sibling(s) not listed) — 9 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (12 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (12 clone groups) frontend/src/app/monitor/internal/group/components/monitor-group-description.component.ts:31 — 12 duplicated blocks under frontend/src/app/monitor/internal/ have copies in at least two of the sibling directories changes, group, groups, route — 8 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 9 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (6 clone groups) frontend/src/app/analysis/location/internal/nodes/location-nodes-page.service.ts:17 — 6 duplicated blocks under frontend/src/app/analysis/location/internal/ have copies in at least two of the sibling directories changes, components, details, edit, facts, map (+3 more sibling(s) not listed) — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (5 clone groups) frontend/src/proxy-vmarc.conf.mjs:1 — 5 duplicated blocks under the repository root have copies in at least two of the sibling directories frontend, map — 1 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (139 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (139 matched lines × 2 locations) frontend/src/app/mapold/poi/poi.service.ts:14 — frontend/src/app/mapold/poi/poi.service.ts:14 · frontend/src/app/shared/services/old-old-poi.service.ts:13 — the two spans are one implementation copied and then locally edited — 914 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (92 identical lines × 2 files) · ×1
  • Wholesale file copy (92 identical lines × 2 files) frontend/src/app/monitor/internal/route/monitor-route-gap-builder.ts:1 — frontend/src/app/monitor/internal/route/monitor-route-gap-builder.ts:1 · frontend/src/app/route/internal/components/structure/route-gap-builder.ts:1 — these 2 files are line-for-line copies of one another — 92 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (80 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (80 matched lines × 2 locations) frontend/src/app/shared/kpn/filter/survey-date-filter.ts:10 — frontend/src/app/shared/kpn/filter/survey-date-filter.ts:10 · frontend/src/app/shared/kpn/filter/timestamp-filter.ts:9 — the two spans are one implementation copied and then locally edited — 553 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (77 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (77 matched lines × 2 locations) frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:17 — frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:17 · frontend/src/app/analysis/subset/internal/changes/subset-changes-page.service.ts:17 — the two spans are one implementation copied and then locally edited — 592 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (76 lines × 2 locations) · ×1
  • Duplicated block (76 lines × 2 locations) frontend/src/app/symbol/internal/symbol-parser.ts:128 — frontend/src/app/symbol/internal/symbol-parser.ts:128 · frontend/src/app/symbol/internal/symbol-parser.ts:205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (75 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (75 matched lines × 2 locations) frontend/src/app/mapold/layers/opendata-tile-layer.ts:24 — frontend/src/app/mapold/layers/opendata-tile-layer.ts:24 · frontend/src/app/ol/layers/old-old-opendata-vector-tile-layer.ts:21 — the two spans are one implementation copied and then locally edited — 367 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (74 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (74 matched lines × 2 locations) frontend/src/app/mapold/style/explore-style-survey.ts:78 — frontend/src/app/mapold/style/explore-style-survey.ts:78 · frontend/src/app/ol/style/survey-date-style.ts:12 — the two spans are one implementation copied and then locally edited — 309 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (73 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (73 matched lines × 2 locations) frontend/src/app/analysis/location/internal/nodes/location-nodes-page.service.ts:17 — frontend/src/app/analysis/location/internal/nodes/location-nodes-page.service.ts:17 · frontend/src/app/analysis/location/internal/routes/location-routes-page.service.ts:17 — the two spans are one implementation copied and then locally edited — 562 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (73 identical lines × 2 files) · ×1
  • Wholesale file copy (73 identical lines × 2 files) frontend/src/app/analysis/node/internal/changes/node-changes-page.service.ts:1 — frontend/src/app/analysis/node/internal/changes/node-changes-page.service.ts:1 · frontend/src/app/analysis/route/internal/changes/route-changes-page.service.ts:1 — these 2 files are line-for-line copies of one another — 73 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (70 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (70 matched lines × 2 locations) frontend/src/app/planner/pdf/plan/pdf-strip-document.ts:10 — frontend/src/app/planner/pdf/plan/pdf-strip-document.ts:10 · frontend/src/app/planner/pdf/plan/pdf-text-document.ts:11 — the two spans are one implementation copied and then locally edited — 544 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (68 identical lines × 3 files) · ×1
  • Wholesale file copy (68 identical lines × 3 files) frontend/src/app/status/internal/log-page.service.ts:1 — frontend/src/app/status/internal/log-page.service.ts:1 · frontend/src/app/status/internal/replication-status-page.service.ts:1 · frontend/src/app/status/internal/system-status-page.service.ts:1 — these 3 files are line-for-line copies of one another — 68 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (58 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (58 matched lines × 2 locations) frontend/src/app/analysis/changes/internal/changes-page.service.ts:17 — frontend/src/app/analysis/changes/internal/changes-page.service.ts:17 · frontend/src/app/analysis/location/internal/changes/location-changes-page.service.ts:17 — the two spans are one implementation copied and then locally edited — 408 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (57 lines × 2 locations) · ×1
  • Duplicated block (57 lines × 2 locations) frontend/src/app/planner/pdf/plan/pdf-strip-document-model.ts:9 — frontend/src/app/planner/pdf/plan/pdf-strip-document-model.ts:9 · frontend/src/app/planner/pdf/plan/pdf-text-document-model.ts:25 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (48 lines × 2 locations) · ×1
  • Duplicated block (48 lines × 2 locations) frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:25 — frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:25 · frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:156 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (40 lines × 3 locations) · ×1
  • Duplicated block (40 lines × 3 locations) frontend/src/app/analysis/location/internal/changes/location-changes-page.service.ts:46 — frontend/src/app/analysis/location/internal/changes/location-changes-page.service.ts:46 · frontend/src/app/analysis/network/internal/changes/network-changes-page.service.ts:45 · frontend/src/app/analysis/subset/internal/changes/subset-changes-page.service.ts:45 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) frontend/src/app/analysis/subset/internal/orphan-nodes/subset-orphan-nodes-page.service.ts:13 — frontend/src/app/analysis/subset/internal/orphan-nodes/subset-orphan-nodes-page.service.ts:13 · frontend/src/app/analysis/subset/internal/orphan-routes/subset-orphan-routes-page.service.ts:13 — the two spans are one implementation copied and then locally edited — 353 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (38 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (38 matched lines × 2 locations) frontend/src/app/analysis/network/internal/nodes/components/network-node-filter.ts:88 — frontend/src/app/analysis/network/internal/nodes/components/network-node-filter.ts:88 · frontend/src/app/analysis/network/internal/routes/components/network-route-filter.ts:60 — the two spans are one implementation copied and then locally edited — 433 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) frontend/src/app/monitor/internal/group/components/monitor-group-description.component.ts:31 — frontend/src/app/monitor/internal/group/components/monitor-group-description.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) frontend/src/app/analysis/location/internal/facts/components/location-facts.component.ts:71 — frontend/src/app/analysis/location/internal/facts/components/location-facts.component.ts:71 · frontend/src/app/analysis/network/internal/facts/components/network-facts.component.ts:110 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) frontend/src/app/shared/services/old-old-poi-preferences.ts:35 — frontend/src/app/shared/services/old-old-poi-preferences.ts:35 · frontend/src/app/state/poi/poi-preferences.ts:4 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (25 lines × 4 locations) · ×1
  • Duplicated block (25 lines × 4 locations) frontend/src/app/analysis/components/action/action-button-network.component.ts:37 — frontend/src/app/analysis/components/action/action-button-network.component.ts:37 · frontend/src/app/analysis/components/action/action-button-node.component.ts:32 · frontend/src/app/analysis/components/action/action-button-relation.component.ts:35 · frontend/src/app/analysis/components/action/action-button-way.component.ts:32 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) frontend/src/app/map/sources/route-source.ts:216 — frontend/src/app/map/sources/route-source.ts:216 · frontend/src/app/map/sources/route-source.ts:242 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (25 lines × 3 locations) · ×1
  • Duplicated block (25 lines × 3 locations) frontend/src/app/monitor/internal/group/components/monitor-group-name.component.ts:31 — frontend/src/app/monitor/internal/group/components/monitor-group-name.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-description.component.ts:31 · frontend/src/app/monitor/internal/route/components/monitor-route-name.component.ts:31 — the 3 copies are spread across 3 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R11 · Import Boundaries · Boundary violation [package · ×1
  • Boundary violation [package:relative-cross-package] frontend/src/theme.less:5 — frontend/src/theme.less:5 reaches into another package with a relative path (../node_modules/ng-zorro-antd/ng-zorro-antd.less) — import the package by name instead.
R2 · Cyclomatic Complexity · Complex function ngOnInit (cyclomatic 41, cognitive 41) · ×1
  • Complex function ngOnInit (cyclomatic 41, cognitive 41) frontend/src/app/analysis/fact/components/fact-name.component.ts:17 — ngOnInit has cyclomatic complexity 41 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleDragEvent (cyclomatic 28, cognitive 61) · ×1
  • Complex function handleDragEvent (cyclomatic 28, cognitive 61) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:147 — handleDragEvent has cyclomatic complexity 28 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleUpEvent (cyclomatic 20, cognitive 43) · ×1
  • Complex function handleUpEvent (cyclomatic 20, cognitive 43) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:278 — handleUpEvent has cyclomatic complexity 20 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 32) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 32) frontend/src/app/map/sources/route-sources.ts:29 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function drawWay (cyclomatic 17, cognitive 22) · ×1
  • Complex function drawWay (cyclomatic 17, cognitive 22) frontend/src/app/shared/components/structure/draw-link.ts:52 — drawWay has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleMoveEvent (cyclomatic 15, cognitive 22) · ×1
  • Complex function handleMoveEvent (cyclomatic 15, cognitive 22) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:85 — handleMoveEvent has cyclomatic complexity 15 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function standardLayerVisible (cyclomatic 15, cognitive 14) · ×1
  • Complex function standardLayerVisible (cyclomatic 15, cognitive 14) frontend/src/app/map/sources/route-sources.ts:85 — standardLayerVisible has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 14, cognitive 19) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 19) frontend/src/app/explore/explore-page.component.ts:164 — (anonymous) has cyclomatic complexity 14 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseForeground (cyclomatic 13, cognitive 42) · ×1
  • Complex function parseForeground (cyclomatic 13, cognitive 42) frontend/src/app/symbol/internal/symbol-parser.ts:128 — parseForeground has cyclomatic complexity 13 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseForeground2 (cyclomatic 13, cognitive 42) · ×1
  • Complex function parseForeground2 (cyclomatic 13, cognitive 42) frontend/src/app/symbol/internal/symbol-parser.ts:205 — parseForeground2 has cyclomatic complexity 13 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseBackground (cyclomatic 13, cognitive 33) · ×1
  • Complex function parseBackground (cyclomatic 13, cognitive 33) frontend/src/app/symbol/internal/symbol-parser.ts:48 — parseBackground has cyclomatic complexity 13 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function nodeStyle (cyclomatic 13, cognitive 27) · ×1
  • Complex function nodeStyle (cyclomatic 13, cognitive 27) frontend/src/app/ol/style/network-map-style.ts:35 — nodeStyle has cyclomatic complexity 13 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function style (cyclomatic 13, cognitive 19) · ×1
  • Complex function style (cyclomatic 13, cognitive 19) frontend/src/app/mapold/style/explore-style-standard.ts:70 — style has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function drawGrid (cyclomatic 12, cognitive 36) · ×1
  • Complex function drawGrid (cyclomatic 12, cognitive 36) frontend/src/app/planner/pdf/plan/pdf-document.ts:39 — drawGrid has cyclomatic complexity 12 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 12, cognitive 16) · ×1
  • Complex function (anonymous) (cyclomatic 12, cognitive 16) frontend/src/app/monitor/internal/monitor-websocket.service.ts:62 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleSingleClickEvent (cyclomatic 12, cognitive 15) · ×1
  • Complex function handleSingleClickEvent (cyclomatic 12, cognitive 15) frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:370 — handleSingleClickEvent has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function segmentsModeStyle (cyclomatic 11, cognitive 20) · ×1
  • Complex function segmentsModeStyle (cyclomatic 11, cognitive 20) frontend/src/app/mapold/style/monitor-layer-style.ts:80 — segmentsModeStyle has cyclomatic complexity 11 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function constructor (cyclomatic 11, cognitive 19) · ×1
  • Complex function constructor (cyclomatic 11, cognitive 19) frontend/src/app/shared/core/preferences/preferences.service.ts:13 — constructor has cyclomatic complexity 11 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function equalPopupState (cyclomatic 11, cognitive 14) · ×1
  • Complex function equalPopupState (cyclomatic 11, cognitive 14) frontend/src/app/mapold/popup/map-route-popup-handler.ts:95 — equalPopupState has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · frontend/src/app/planner/domain/interaction/planner-engine-impl.ts · ×1
  • frontend/src/app/planner/domain/interaction/planner-engine-impl.ts: 628 lines of code frontend/src/app/planner/domain/interaction/planner-engine-impl.ts:1 — frontend/src/app/planner/domain/interaction/planner-engine-impl.ts has 628 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/app/symbol/internal/symbol-shape.ts · ×1
  • frontend/src/app/symbol/internal/symbol-shape.ts: 511 lines of code frontend/src/app/symbol/internal/symbol-shape.ts:1 — frontend/src/app/symbol/internal/symbol-shape.ts has 511 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts · ×1
  • frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts: 403 lines of code frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts:1 — frontend/src/app/analysis/overview/internal/overview/components/overview-configuration.service.ts has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R5 · Dependency Freshness · Dependency Freshness · ×1
  • Dependency Freshness — 33 outdated package(s); JS/npm CVEs scored in D30
R6 · Tooling · No typecheck script · ×1
  • No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~263 LoC) · ×1
  • Dead file (~263 LoC) frontend/src/app/monitor/internal/route/details/monitor-route-structure-row.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/monitor/internal/route/details/monitor-route-structure.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~214 LoC) · ×1
  • Dead file (~214 LoC) frontend/src/app/ol/layers/route-layers.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~168 LoC) · ×1
  • Dead file (~168 LoC) frontend/src/app/analysis/changeset/internal/components/change-set-location-tree-node.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~140 LoC) · ×1
  • Dead file (~140 LoC) frontend/src/app/mapold/old-map.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~111 LoC) · ×1
  • Dead file (~111 LoC) frontend/src/app/analysis/components/changes/filter/change-filter-options.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~102 LoC) · ×1
  • Dead file (~102 LoC) frontend/src/app/ol/style/network-map-style.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/ol/layers/network-nodes-vector-tile-layer.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~85 LoC) · ×1
  • Dead file (~85 LoC) frontend/src/app/planner/pages/planner/popup/planner-popup.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~84 LoC) · ×1
  • Dead file (~84 LoC) frontend/src/app/planner/pages/planner/popup/planner-popup-node.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/planner/pages/planner/popup/planner-popup-contents.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~75 LoC) · ×1
  • Dead file (~75 LoC) frontend/src/app/planner/pages/planner/popup/planner-popup-poi.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/planner/pages/planner/popup/planner-popup-contents.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~67 LoC) · ×1
  • Dead file (~67 LoC) frontend/src/app/planner/pages/planner/popup/planner-popup-route.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/planner/pages/planner/popup/planner-popup-contents.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~66 LoC) · ×1
  • Dead file (~66 LoC) frontend/src/app/shared/components/page/page-experimental.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~63 LoC) · ×1
  • Dead file (~63 LoC) frontend/src/app/shared/components/icon/icon-button.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/shared/base/pages/home/home-page.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~58 LoC) · ×1
  • Dead file (~58 LoC) frontend/src/app/analysis/node/internal/details/components/node-details-sidebar.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~56 LoC) · ×1
  • Dead file (~56 LoC) frontend/src/app/ol/style/node-map-style.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~54 LoC) · ×1
  • Dead file (~54 LoC) frontend/src/app/ol/layers/network-nodes-vector-tile-layer.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~53 LoC) · ×1
  • Dead file (~53 LoC) frontend/src/app/mapold/popup/map-route-popup.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/mapold/old-map.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~51 LoC) · ×1
  • Dead file (~51 LoC) frontend/src/app/analysis/components/action/action-button-network-fact-routes.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~45 LoC) · ×1
  • Dead file (~45 LoC) frontend/src/app/shared/base/pages/home/home-page.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~36 LoC) · ×1
  • Dead file (~36 LoC) frontend/src/app/monitor/internal/route/components/monitor-route-sub-relation-menu-option.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~35 LoC) · ×1
  • Dead file (~35 LoC) frontend/src/app/monitor/internal/route/details/monitor-route-structure.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~32 LoC) · ×1
  • Dead file (~32 LoC) frontend/src/app/ol/layers/network-nodes-marker-layer.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~30 LoC) · ×1
  • Dead file (~30 LoC) frontend/src/app/analysis/components/edit/edit-goto.service.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~29 LoC) · ×1
  • Dead file (~29 LoC) frontend/src/app/planner/pages/planner/popup/planner-popup-contents.component.ts — no import path from any entry point (6 application, 19 tooling, 35 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/planner/pages/planner/popup/planner-popup.component.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R8 · Dependency Hygiene · Unused dependency '@angular-devkit/core' · ×1
  • Unused dependency '@angular-devkit/core' frontend/package.json:65 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@angular-devkit/schematics' · ×1
  • Unused dependency '@angular-devkit/schematics' frontend/package.json:66 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@angular/language-service' · ×1
  • Unused dependency '@angular/language-service' frontend/package.json:70 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'canvg' · ×1
  • Unused dependency 'canvg' frontend/package.json:45 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'ngx-cookie-service' · ×1
  • Unused dependency 'ngx-cookie-service' frontend/package.json:51 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'ngxtension' · ×1
  • Unused dependency 'ngxtension' frontend/package.json:54 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'ol-mapbox-style' · ×1
  • Unused dependency 'ol-mapbox-style' frontend/package.json:57 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'source-map-explorer' · ×1
  • Unused dependency 'source-map-explorer' frontend/package.json:60 — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 90 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:472 — `!reversed && node1 == onewayStartNode(member2)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java:71 — `Objects.equals(role, that.role) && Objects.equals(member, that.member)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:89 — `currentMemberIndex > 0 && links.get(currentMemberIndex - 1) != null && links.get(currentMemberIndex - 1).isNodeOrRelationMember()` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:282 — `dirFW == NONE && dirBW == NONE && Utils.isUnidirectional(member) && !link.isOnewayHead` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:11 — `hasRoleForward(member) || hasRoleBackward(member)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:99 — `lastBackwardWayMemberIndex != UNCONNECTED && lastForwardWayMemberIndex != UNCONNECTED` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:143 — `lastBackwardWayMemberIndex == UNCONNECTED && lastForwardWayMemberIndex == UNCONNECTED` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:414 — `memberIndex1 < 0 || memberIndex1 >= members.size()` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:418 — `memberIndex2 < 0 || memberIndex2 >= members.size()` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java:59 — `n == nodes.get(0) || n == nodes.get(nodes.size() - 1)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java:63 — `nodes.size() >= 3 && nodes.get(nodes.size() - 1) == nodes.get(0)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaWay.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:30 — `nodesCount > 2 && way.getNode(0).getId() == way.getNode(way.getNodesCount() - 1).getId()` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java:69 — `obj == null || getClass() != obj.getClass()` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaMember.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:291 — `prevHead != null && !prevHead.linkedToPreviousMember` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:107 — `previousLink != null && !Utils.isUnidirectional(currentMember)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:140 — `previousLink != null && previousLink.isOnewayTail` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:481 — `reversed && node1 == onewayEndNode(member2)` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:187 — `roundaboutDirection == ROUNDABOUT_LEFT || roundaboutDirection == ROUNDABOUT_RIGHT` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java:20 — `this == ROUNDABOUT_RIGHT || this == ROUNDABOUT_LEFT` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLink.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java:28 — `way != null && way.hasTag("junction", "circular", "roundabout")` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/Utils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java:509 — `way1 != null && way2 != null && (way1.isFirstLastNode(way2.firstNode()) || way1.isFirstLastNode(way2.lastNode()))` appears character-identically in 2 files — backend/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java, server/src/main/java/kpn/server/analyzer/engine/analysis/route/structure/reference/JavaLinkAnalyzer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate frontend/src/app/mapold/style/explore-style.ts:24 — `featureLayer === 'route' || featureLayer === 'node-route'` appears character-identically in 2 files — frontend/src/app/mapold/style/explore-style.ts, frontend/src/app/mapold/style/route-detail-style.ts. 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 frontend/src/app/planner/domain/context/planner-marker-layer-impl.ts:53 — `flag && flag.flagType !== PlanFlagType.invisible` appears character-identically in 2 files — frontend/src/app/planner/domain/context/planner-marker-layer-impl.ts, frontend/src/app/planner/domain/context/planner-route-layer-impl.ts. 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 frontend/src/app/mapold/layers/layers.ts:62 — `mapLayer.layerType === 'route' && mapLayer.layer.getVisible()` appears character-identically in 2 files — frontend/src/app/mapold/layers/layers.ts, frontend/src/app/mapold/old-map.service.ts. 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 frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-5-reference-details.component.ts:195 — `selectEvent.target.files && selectEvent.target.files.length > 0` appears character-identically in 2 files — frontend/src/app/monitor/internal/route/components/monitor-route-properties-step-5-reference-details.component.ts, frontend/src/app/monitor/internal/route/gpx/monitor-route-gpx-reference.component.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Disabled test · ×30
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:10 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:14 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:18 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:22 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:26 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:30 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:34 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzerTest.scala:13 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzerTest.scala:39 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationFacadeTest.scala:15 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationRepositoryTest.scala:11 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationRepositoryTest.scala:16 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationRepositoryTest.scala:21 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationTileTest.scala:8 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test backend/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationTileTest.scala:19 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:10 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:14 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:18 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:22 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:26 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:30 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/FullAnalysisTriggerTest.scala:34 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzerTest.scala:13 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/analysis/network/NetworkShapeAnalyzerTest.scala:39 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test server/src/test/scala/kpn/server/analyzer/engine/elevation/ElevationFacadeTest.scala:15 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • + 5 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Low CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×3
  • Projects may be oversized for their cohesion frontend/package.json:1 — `frontend` (52359 LoC, 1385 module-visible types across 237 directories) overshoots its size bounds. 3 of 4 build unit(s) (Maven, npm, sbt) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion REDACTED:1 — `server` (65502 LoC, 2629 module-visible types across 186 directories) overshoots its size bounds. 3 of 4 build unit(s) (Maven, npm, sbt) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion backend/build.sbt:1 — `backend` (65482 LoC, 2628 module-visible types across 190 directories) overshoots its size bounds. 3 of 4 build unit(s) (Maven, npm, sbt) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
AX6 · Interface segregation · Fat interface · ×2
  • Fat interface: RouteMember (18 abstract members) backend/src/main/scala/kpn/core/analysis/RouteMember.scala:8 — `RouteMember` declares 18 abstract members: `endNodes`, `memberType`, `link`, `linkName`, `nodes`, `id`, `role`, `element`, `linkDescription`, `length`, `nodeCount`, `name`, `description`, `from`, `to`, `fromNode`, `toNode`, `accessible`. 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. 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: RouteMember (18 abstract members) server/src/main/scala/kpn/core/analysis/RouteMember.scala:8 — `RouteMember` declares 18 abstract members: `endNodes`, `memberType`, `link`, `linkName`, `nodes`, `id`, `role`, `element`, `linkDescription`, `length`, `nodeCount`, `name`, `description`, `from`, `to`, `fromNode`, `toNode`, `accessible`. 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. 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
X9 · Subsumed condition operand · Subsumed condition operand · ×2
  • Subsumed condition operand server/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiMapillaryAnalyzer.scala:21 — `tagValue.startsWith("https")` can never decide this `||` — every value satisfying `tagValue.startsWith("https")` also satisfies `tagValue.startsWith("http")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand backend/src/main/scala/kpn/server/api/analysis/pages/poi/analyzers/PoiMapillaryAnalyzer.scala:21 — `tagValue.startsWith("https")` can never decide this `||` — every value satisfying `tagValue.startsWith("https")` also satisfies `tagValue.startsWith("http")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:427 — 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 427).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add scalafix or scapegoat (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation frontend/package.json:29 — `frontend/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
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 3117 Scala product file(s) passes `-Yexplicit-nulls`, enables WartRemover's `Null` wart or runs Scalafix's `DisableSyntax.noNulls`, so every reference type admits null and nothing reports a `null` written into the code or returned from a Java API — the first one to reach a method call is a `NullPointerException`. `Option` by convention is a habit no tool here holds the code to.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-58f72ea0287c4b3fb6ce659352034660/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-58f72ea0287c4b3fb6ce659352034660/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-58f72ea0287c4b3fb6ce659352034660/history-2.json --exit-code 0 --source .1artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=24" --report-format json --report-path /tmp/watchdog-gitleaks-58f72ea0287c4b3fb6ce659352034660/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-58f72ea0287c4b3fb6ce659352034660/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude backend/src/main/scala/kpn/tools/code/codecs/generated --exclude frontend/src/app/api/common --exclude map/.vscode --exclude server/src/main/scala/kpn/tools/code/codecs/generated .7artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update124artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) — `frontend/src/app/shared/components/format/show-if-truncated.directive.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a1eabd-3448-7a0d-9e38-1cf12d55ed9a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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