Public report — druid, published 6 Aug 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 06-08-2026 @ 17:08 UTC Public
Code Health Audit

Apache/druid

No baseline yet — first run
45% Weak
CriticalWeakAdequateStrongExemplary
upper third — near Adequate

Very large · 892,635 LoC · rebuild ~14.7 person-years · weakest lens: Accessibility (38%)

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

44/46dimensions tool-verifieddeterministic · confidence 1.0 · 2 LLM-assisted, advisory
1501findings with an exact file:lineof 1520 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
46/113dimensions across the health lenses892635 LoC — wide & deep

Executive summary

Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.

apache/druid carries serious gaps (45%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.

It is strongest in Domain Modelling (100%) — the domain model is expressive and well-guarded. Code Health (76%) is solid too.

The area that most needs attention is Accessibility (38%) — it raises ongoing delivery and operational cost. Security (41%) is the next concern — exposure to security and compliance incidents is elevated.

Leadership focus, highest impact first: Give every control a programmatic label (a <label for> /… (Forms & labels); Make custom controls keyboard-operable (role + tabindex + key handler) (Keyboard semantics); accessibility in the toolchain (A11y enforcement).

For scale: Very large (~892,635 production lines); rebuilding it from scratch would take roughly ~14.7 person-years (~8–28 engineers). Approximate, ±~30%.

It builds on a genuinely strong Domain Modelling foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Accessibility 38% · 46% weightSecurity 41% · 25% weightReadiness 52% · 14% weightArchitecture 56% · 8% weightMaturity 75% · 4% weightCode Health 76% · 2% weightDomain Modelling 100% · 1% weight

Raise Accessibility 38 → 70 (the Healthy floor) ⇒ headline 45 → ~51.

Code composition — where the lines go
Tests 100%
Rebuild cost & value ~ Modeled — €710,000–€3,600,000
Cost to rebuild€710,000–€3,600,000 (7.1–22.4 person-years (11,866–37,645 h), ~8–28 engineers)
Domain complexityHigh — harder problems cost more per line
Quality factor0.7× (at 45% quality) — the last 20% of quality is most of the work
Size & shapeVery large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
Dead frontend code~114 LoC unreachable (2 file(s)) — that slice of this estimate buys code with zero runtime value; deleting it is the cheapest win in this report (the R7 card lists every file)

This codebase represents roughly ~14.7 person-years of build effort (about ~€2,100,000 to rebuild). Its weakest lens is Accessibility at 38% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain High (×1.4) — CQRS, domain model × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
+6.7 pts · Medium effort · Forms & labels
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
+6.7 pts · Medium effort · Keyboard semantics
3
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
+6.7 pts · Medium effort · A11y enforcement

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Very large asset (~14.7 person-years to rebuild), and its weakest lens is Accessibility at 38%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Very large, ~14.7 person-years rebuild (892,635 LoC) · weakest lens: Accessibility 38%
→ Direct remediation budget at Accessibility first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 34.3–228.6 engineer-days every year, paid as drag on the ~685,855 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–3 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 2–5% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 169,115 line(s) changed over a 90-day window ⇒ ~685,855/year · D1/D2/D4 code quality: averaging 7.2/10 ⇒ a 2–5% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 3 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–5% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 7.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

549 modules, 4342 dependencies — 18 dependency cycles, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

(global)…ruid.java.util.common….util.emitter.service…monomorphicprocessing….druid.segment.vector…il.common.granularity…uid.java.util.emitter…e.druid.segment.serde…he.druid.segment.data…druid.server.security….druid.segment.column…druid.query.dimension…he.druid.query.filter…uid.query.aggregationorg.apache.druid.query…d.segment.incremental…che.druid.server.http…id.server.coordinator…g.apache.druid.server…realtime.appenderator…apache.druid.metadata…uid.indexing.overlord…druid.indexing.common….indexing.common.taskorg.apache.druid.guice….druid.initialization….apache.druid.segment…ache.druid.data.input…druid.sql.calcite.rel…druid.data.input.impl…apache.druid.timeline…va.util.common.logger…dexing.seekablestream…ava.util.common.guava…pache.druid.discovery…d.sql.calcite.planner…g.apache.druid.client…he.druid.msq.indexing…pache.druid.benchmark…apache.druid.msq.exec(global)1…ruid.java.util.common2….util.emitter.service3…monomorphicprocessing4….druid.segment.vector5…il.common.granularity6…uid.java.util.emitter7…e.druid.segment.serde8…he.druid.segment.data9…druid.server.security10….druid.segment.column11…druid.query.dimension12…he.druid.query.filter13…uid.query.aggregation14org.apache.druid.query15…d.segment.incremental16…che.druid.server.http17…id.server.coordinator18…g.apache.druid.server19…realtime.appenderator20…apache.druid.metadata21…uid.indexing.overlord22…druid.indexing.common23….indexing.common.task24org.apache.druid.guice25….druid.initialization26….apache.druid.segment27…ache.druid.data.input28…druid.sql.calcite.rel29…druid.data.input.impl30…apache.druid.timeline31…va.util.common.logger32…dexing.seekablestream33…ava.util.common.guava34…pache.druid.discovery35…d.sql.calcite.planner36…g.apache.druid.client37…he.druid.msq.indexing38…pache.druid.benchmark39…apache.druid.msq.exec401812171133811241165313811111171299353913212517413374425253214446617821112241230394164454314311163276913713314826272436332542121074914321315114241778141423135111715223151841380111911991119373314218111291311742712324643296211729811462033281423133933331812946671036131219134017209151118114223221651129131259732301159311921461032191181211493434212114233112318531925521810041512224612451131311113213413256490122252231211548141113782531253666321421115114186174138216433211151511510129223612656131431111111516212141295210+509 more modules (most-connected shown)

At a glance — Code Health · 76% · Strong

At a glance — Architecture · 56% · Adequate · gated by R9

At a glance — Maturity · 75% · Strong

At a glance — Readiness · 52% · Adequate · gated by P5

At a glance — Security · 41% · Weak · gated by D28, D29, D38

At a glance — Domain Modelling · 100% · Exemplary

At a glance — Accessibility · 38% · Weak · gated by AC2, 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:2021 — Injection32High / Critical
A06:2021 — Vulnerable & Outdated Components22High / Critical
A02:2021 — Cryptographic Failures13High / Critical
A05:2021 — Security Misconfiguration7Medium

Roadmap

Begin by ensuring every form control and button has a proper programmatic label, as placeholders are insufficient. Next, make all custom interactive elements fully keyboard-operable and ensure anchors have valid hrefs. To prevent future regressions, integrate accessibility linting and automated testing into the CI pipeline. Finally, correct page structure by adding a language attribute and main landmark, while also fixing visual safety issues like low contrast and missing focus styles.

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

Do thisHelpsEffortDimension
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+6.7 ptsMediumForms & labels
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+6.7 ptsMediumKeyboard semantics
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+6.7 ptsMediumA11y enforcement
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+6.6 ptsMediumPage structure
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.+6.1 ptsMediumVisual & motion safety
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with setup_test_profiling_env.sh.+2.6 ptsLowSecret Scanning
Resolve the 11 Secret finding(s) in Secrets (history) — start with runtime.properties (10), AbstractDruidJdbcStatement.java.+3.6 ptsMediumSecrets (history)
Resolve the 23 High finding(s) in Static Analysis (SAST) — start with worker.yml (7), codeql.yml (4), cron-job-its.yml (2).+3.2 ptsMediumStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
web-console/package-lock.json0.0SlopOSV Dependency Vulnerabilities: High CVE: [GHSA redacted]
.github/workflows/worker.yml4.4MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/codeql.yml4.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
extensions-core/druid-pac4j/src/main/java/org/apache/druid/security/pac4j/Pac4jSessionStore.java5.7MixedStatic Analysis (SAST): High: object-deserialization
examples/config/coordinator/runtime.properties5.8MixedSecrets (history): Secret: generic-api-key
examples/config/historical/runtime.properties5.8MixedSecrets (history): Secret: aws-access-token
examples/config/realtime/runtime.properties5.8MixedSecrets (history): Secret: generic-api-key
examples/config/master/runtime.properties5.8MixedSecrets (history): Secret: generic-api-key
examples/config/compute/runtime.properties5.8MixedSecrets (history): Secret: aws-access-token
.github/workflows/cron-job-its.yml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
web-console/e2e-tests/util/druid.ts5.8MixedStatic Analysis (SAST): High: detect-child-process
distribution/docker/Dockerfile6.3MixedIaC & Container Security: Medium IaC: DS-0001
distribution/docker/Dockerfile.mariadb6.9MixedIaC & Container Security: Medium IaC: CKV_DOCKER_7
distribution/docker/Dockerfile.mysql6.9MixedIaC & Container Security: Medium IaC: CKV_DOCKER_7
processing/src/main/java/org/apache/druid/math/expr/ExprEval.java7.0MixedCyclomatic Complexity: ExprEval.bestEffortOf (cyclomatic 34)
processing/src/main/java/org/apache/druid/extendedset/intset/ConciseSet.java7.0MixedCyclomatic Complexity: ConciseSet.compareTo (cyclomatic 31)
processing/src/main/java/org/apache/druid/segment/projections/Projections.java7.0MixedCyclomatic Complexity: Projections.walkClusterGroupFilter (cyclomatic 27)
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java7.0MixedCyclomatic Complexity: ApproximateHistogram.ruleCombineBins (cyclomatic 25)
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java7.0MixedCyclomatic Complexity: DruidQuery.computeVirtualColumns (cyclomatic 24)
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java7.0MixedCyclomatic Complexity: SeekableStreamSupervisor.verifyAndMergeCheckpoints (cyclomatic 23)

Methodology & how to trust this report

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

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

What we checked — 46 dimensions across the health lenses
D1D2D3D4D13D15D16D19D21D28D29D31D33D34D35D38AC1AC2AC3AC4AC5AC6AC7AX5DM1DM5DM8M1M2M3M4P1P3P4P5P6R1R10R2R3R4R5R6R7R8R9

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 019fd80b-f36b-749a-b48e-0caf2138dc6a.

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.

  • D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — 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.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • 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").
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
  • 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.
  • 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 clean result is "no unlabelled native 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.
  • 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.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • 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.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.4 / 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: DocumentedVerifiedPrevented · effective 6.4 / 10 · rule-coverage 100% · ceiling Prevented

179 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Expressions.toSimpleLeafFilter at 69. A further 13 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 BaseColumnarLongsFromGeneratorBenchmark.makeGenerator at 27 — they are counted neither in the figure above nor in this dimension's score.

Expressions.toSimpleLeafFilter (cyclomatic 69)sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java:516
SeekableStreamIndexTaskRunner.runInternal (cyclomatic 69)indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:411
SegmentMetadataQueryQueryToolChest.mergeAnalyses (cyclomatic 48)processing/src/main/java/org/apache/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java:267
CombineAndSimplifyBounds.doSimplify (cyclomatic 47)sql/src/main/java/org/apache/druid/sql/calcite/filtration/CombineAndSimplifyBounds.java:123
7298.call (cyclomatic 42)indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:177

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

What to do

  1. Resolve the 1 Expressions.toSimpleLeafFilter (cyclomatic 69) finding(s) in Cyclomatic Complexity — start with Expressions.java. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 SeekableStreamIndexTaskRunner.runInternal (cyclomatic 69) finding(s) in Cyclomatic Complexity — start with SeekableStreamIndexTaskRunner.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 SegmentMetadataQueryQueryToolChest.mergeAnalyses (cyclomatic 48) finding(s) in Cyclomatic Complexity — start with SegmentMetadataQueryQueryToolChest.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity5.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: DocumentedVerifiedPrevented · effective 5.5 / 10 · rule-coverage 100% · ceiling Prevented

670 method(s) exceeded the cognitive complexity threshold of 15; the worst was DruidRexExecutor.reduce at 170.

Ranges.toRange (cognitive 16) · ×2sql/src/main/java/org/apache/druid/sql/calcite/filtration/Ranges.java:75
DruidRexExecutor.reduce (cognitive 170)sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:60
Expressions.toSimpleLeafFilter (cognitive 157)sql/src/main/java/org/apache/druid/sql/calcite/expression/Expressions.java:516
SeekableStreamIndexTaskRunner.runInternal (cognitive 135)indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:411
SegmentMetadataQueryQueryToolChest.mergeAnalyses (cognitive 119)processing/src/main/java/org/apache/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java:267

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

What to do

  1. Resolve the 2 Ranges.toRange (cognitive 16) finding(s) in Cognitive Complexity — start with Ranges.java (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 DruidRexExecutor.reduce (cognitive 170) finding(s) in Cognitive Complexity — start with DruidRexExecutor.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Expressions.toSimpleLeafFilter (cognitive 157) finding(s) in Cognitive Complexity — start with Expressions.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.3 / 10Exemplary✓ 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: DocumentedVerifiedPrevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Prevented

178 god class(es) detected.

TooManyMethods: SeekableStreamSupervisor · ×90indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:159
FileTooLong: supervisor/SeekableStreamSupervisor.java · ×88indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:0

✓ On the Gold path — maintain.

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

D4 · Code Duplication9.8 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

366 duplicated block group(s) detected.

Duplicated block (8 lines × 2) · ×43server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:250
Duplicated block (9 lines × 2) · ×37server/src/main/java/org/apache/druid/server/ClientInfoResource.java:235
Duplicated block (6 lines × 2) · ×36server/src/main/java/org/apache/druid/server/coordinator/rules/CompositePartialLoadMatcher.java:161
Duplicated block (10 lines × 2) · ×33server/src/main/java/org/apache/druid/server/coordinator/InlineSchemaDataSourceCompactionConfig.java:113
Duplicated block (7 lines × 2) · ×29server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:587

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

✓ On the Gold path — maintain.

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

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

Leaked secret: hardcoded-credential.github/scripts/setup_test_profiling_env.sh:44

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with setup_test_profiling_env.sh. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D15 · Churn × Complexity Hotspots9.9 / 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: DocumentedVerifiedPrevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java (7×69=483); server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java (17×17=289); indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java (9×23=207)

Hotspot: indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java · ×10indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java

✓ On the Gold path — maintain.

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

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

188 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is web-console/src/views/datasources-view/datasources-view.tsx.

Off-boarding risk: anonymized user #1 · ×12
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D19 · Documentation Quality / 10Strong◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

The Apache Druid project has a strong README presence with 27 README files covering load data, manage clusters, issue queries, and community extensions. The website README (Docusaurus) is well written for the web console: it explains dependencies, variables, testing, and development commands while noting that the full document outline exists below the clip marker. A dedicated multi-stage-query developer notes file covers model, indexing, planning, execution, statistics, counters, SQL, and references, plus a Quidem UT README explaining install/java/maven, running tests, launching a test-generating broker, and contributing community extensions. The documentation is comprehensive for its scope but the visible content (e.g., the web console Getting started section) appears to be cut by the scanner clip marker rather than being missing; clipped sections are not penalized. The documentation is comprehensive and well-structured across READMEs, architecture markdowns, and XML docs for a Druid ecosystem project. It includes usage examples (DruidContainer constructor, standard images), credits acknowledging contributors, detailed OpenTelemetry emitter working/enablement steps, moving-average-query extension overview, gRPC query API rationale, Consul-based service discovery with configuration, Docker build/run instructions, and a Jupyter notebook tutorial landing page. The main strength is the cross-project documentation that ties together testcontainers, extensions, data generators, and notebooks into cohesive material. The README is a focused test-documentation guide for Consul embedded TLS/mTLS integration in the `embedded-tests` module. It states the migration rationale, shows a runnable Maven command with full explanation, lists each test class and its purpose, and points to implementation files. The visible content is clear and complete for an end-user running tests.

What to do

  1. Improve Documentation Quality — currently 7.5/10. — The Apache Druid project has a strong README presence with 27 README files covering load data, manage clusters, issue queries, and community extensions. The website README (Docusaurus) is well written for the web console: it explains dependencies, variables, testing, and development commands while noting that the full document outline exists below the clip marker. A dedicated multi-stage-query developer notes file covers model, indexing, planning, execution, statistics, counters, SQL, and references, plus a Quidem UT README explaining install/java/maven, running tests, launching a test-generating broker, and contributing community extensions. The documentation is comprehensive for its scope but the visible content (e.g., the web console Getting started section) appears to be cut by the scanner clip marker rather than being missing; clipped sections are not penalized. The documentation is comprehensive and well-structured across READMEs, architecture markdowns, and XML docs for a Druid ecosystem project. It includes usage examples (DruidContainer constructor, standard images), credits acknowledging contributors, detailed OpenTelemetry emitter working/enablement steps, moving-average-query extension overview, gRPC query API rationale, Consul-based service discovery with configuration, Docker build/run instructions, and a Jupyter notebook tutorial landing page. The main strength is the cross-project documentation that ties together testcontainers, extensions, data generators, and notebooks into cohesive material. The README is a focused test-documentation guide for Consul embedded TLS/mTLS integration in the `embedded-tests` module. It states the migration rationale, shows a runnable Maven command with full explanation, lists each test class and its purpose, and points to implementation files. The visible content is clear and complete for an end-user running tests.

Detailed fixes: d19_recommendation.md.

D21 · Naming Consistency / 10Exemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

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

Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

Secret: generic-api-key · ×11sql/src/main/java/org/apache/druid/sql/avatica/AbstractDruidJdbcStatement.java:47detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed

What to do

  1. Resolve the 11 Secret finding(s) in Secrets (history) — start with runtime.properties (10), AbstractDruidJdbcStatement.java. — One of this dimension's main actionable groups (11 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)0.1 / 10Critical✓ 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: DocumentedVerifiedPrevented · effective 0.1 / 10 · rule-coverage 100% · ceiling Documented

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

High: dependabot-missing-cooldown · ×23.github/dependabot.yml:24detected by semgrep finding
Medium: weak-ssl-context · ×7extensions-contrib/influxdb-emitter/src/main/java/org/apache/druid/emitter/influxdb/InfluxdbEmitter.java:237detected by semgrep finding
Low: insecure-hostname-verifier · ×2extensions-contrib/consul-extensions/src/main/java/org/apache/druid/consul/discovery/ConsulClients.java:32detected by semgrep finding

What to do

  1. Resolve the 23 High finding(s) in Static Analysis (SAST) — start with worker.yml (7), codeql.yml (4), cron-job-its.yml (2). — One of this dimension's main actionable groups (23 issue-level).
  2. Resolve the 7 Medium finding(s) in Static Analysis (SAST) — start with InfluxdbEmitter.java, OpenLineageRequestLoggerProvider.java, PortFinder.java. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 2 Low finding(s) in Static Analysis (SAST) — start with ConsulClients.java, InfluxdbEmitter.java. — 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.

D31 · IaC & Container Security9.3 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

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

Medium IaC: DS-0001 · ×7distribution/docker/Dockerfiledetected by trivy finding

✓ On the Gold path — maintain.

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

D33 · JS/npm Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether JavaScript/npm dependencies have known published vulnerabilities (CVEs) — the npm ecosystem's biggest risk.

Method: JS/npm CVE scan via trivy fs --scanners vuln over JS manifests (package.json/yarn.lock/pnpm-lock/bun.lockb); 0-10 tight normalizer. NotApplicable without JS manifests. Exhaustive, deterministic.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable JS/npm dependencies.

✓ On the Gold path — maintain.

Detailed fixes: d33_recommendation.md.

D34 · Knowledge Freshness8.1 / 10Strong✓ 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: DocumentedVerifiedPrevented · effective 8.1 / 10 · rule-coverage 100% · ceiling Documented

581 of 3000 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java.

Orphaned knowledge · ×18extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java
Further orphaned files (smaller)

What to do

  1. Resolve the 18 Orphaned knowledge finding(s) in Knowledge Freshness — start with ApproximateHistogram.java, FixedBucketsHistogram.java, CoordinatorBasicAuthorizerMetadataStorageUpdater.java. — One of this dimension's main actionable groups (18 issue-level).
  2. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Exemplary✓ 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; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: CliOverlord.java↔MiddleManagerJettyServerInitializer.java 92%; CoordinatorJettyServerInitializer.java↔MiddleManagerJettyServerInitializer.java 92%; MiddleManagerJettyServerInitializer.java↔QueryJettyServerInitializer.java 92%

Boundary-crossing change coupling: ExpressionModule.java ↔ DruidOperatorTable.java · ×3processing/src/main/java/org/apache/druid/guice/ExpressionModule.java
Change coupling clique: CliOverlord.java, CoordinatorJettyServerInitializer.java, MiddleManagerJettyServerInitializer.java, QueryJettyServerInitializer.java, RouterJettyServerInitializer.java · ×2services/src/main/java/org/apache/druid/cli/CliOverlord.java
Change coupling: GroupByQueryKit.java ↔ ScanQueryKit.java · ×2multi-stage-query/src/main/java/org/apache/druid/msq/querykit/groupby/GroupByQueryKit.java

✓ On the Gold path — maintain.

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

D38 · OSV Dependency Vulnerabilities1.2 / 10Critical✓ Tool-verified

What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.

Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.

Maturity: DocumentedVerifiedPrevented · effective 1.2 / 10 · rule-coverage 100% · ceiling Documented

22 finding(s): 0 critical, 12 high, 6 medium, 4 low.

High CVE: [GHSA redacted] · ×12web-console/package-lock.jsondetected by osv-scanner finding
Medium CVE: [GHSA redacted] · ×6web-console/package-lock.jsondetected by osv-scanner finding
Low CVE: [GHSA redacted] · ×4web-console/package-lock.jsondetected by osv-scanner finding

What to do

  1. Resolve the 12 High CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (12). — One of this dimension's main actionable groups (12 issue-level).
  2. Resolve the 6 Medium CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (6). — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 4 Low CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (4). — One of this dimension's main actionable groups (4 recommendation-level).

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

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

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.

AC2 · Forms & labels1.9 / 10Critical✓ 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, 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.

  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×3) — array-input.tsx:64, formatted-input.tsx:100, load-data-view.tsx:1309
  • This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×7) — json-collapse.tsx:41, segment-timeline.tsx:200, show-value.tsx:53, …
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — show-log.tsx:197
  • This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — load-data-view.tsx:1394, destination-form.tsx:111

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 structure4.3 / 10Weak✓ 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.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — unified-console.html:20
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — unified-console.html:23

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.5 / 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 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.

  • 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. (×9) — click-to-copy.tsx:32, query-error-pane.tsx:50, query-error-pane.tsx:92, …
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×8) — json-input.tsx:200, loader.tsx:64, expression-entry.tsx:45, …

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.

AC6 · Visual & motion safety6.4 / 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.

  • `#browser-update` sets color: #ffffff on background-color: #d9822b — 2.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — unified-console.html:30

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.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

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

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

DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether entities protect their state (private/init-only setters) instead of exposing public setters that bypass invariants. Softened when a rehydration framework (Marten/EF) is present.

Method: Roslyn (DDD-gated): public setters on entities detected; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM8 · Value-object opportunities10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.

Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.

M1 · Documentation (README)7.1 / 10Strong✓ Tool-verified

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

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

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 63 of 78 project(s) that lack one — worth up to 1.6 pts.
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 `NNNN-title.md` documents 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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

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

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

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup0.0 / 10Critical✓ 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.

  • A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.

What to do

  • Codify backups + geo-recovery in IaC and document RTO/RPO and the restore procedure — a persistence guard alone is not disaster recovery.
P6 · Release Hygiene8.0 / 10Strong✓ 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.

  • A changelog exists but has few versioned entries — keep it current with each release.

What to do

  • Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
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.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.5 / 10Strong✓ Tool-verified

React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).

Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.

  • web-console/src/ace-modes/hjson.ts:147 · web-console/src/ace-modes/hjson.ts:177 — 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. — hjson.ts:147
  • web-console/src/components/fancy-numeric-input/fancy-numeric-input.tsx:82 · web-console/src/dialogs/async-action-dialog/async-action-dialog.tsx:43 — 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. — fancy-numeric-input.tsx:82
  • web-console/src/components/formatted-input/formatted-input.tsx:32 · web-console/src/dialogs/alert-dialog/alert-dialog.tsx:37 — 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. — formatted-input.tsx:32
  • web-console/src/views/load-data-view/load-data-view.tsx:3214 · web-console/src/views/load-data-view/load-data-view.tsx:3274 — 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. — load-data-view.tsx:3214
  • web-console/src/ace-modes/dsql.ts:121 · web-console/src/ace-modes/hjson.ts:267 — 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. — dsql.ts:121
  • web-console/src/druid-models/console/console.ts:24 · web-console/src/links.ts:58 — 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. — console.ts:24
  • web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx:167 · web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx:242 — 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. — ingestion-spec.tsx:167
  • web-console/src/views/workbench-view/column-tree/column-tree.tsx:379 · web-console/src/views/workbench-view/column-tree/column-tree.tsx:407 — 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. — column-tree.tsx:379

What to do

  • Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity7.0 / 10Strong✓ 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.

  • Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×8) — hjson-context.ts:59, schema-step.tsx:265, spec-conversion.ts:82, …

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.3 / 10Adequate✓ 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.

  • 40 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: web-console/src/views/load-data-view/load-data-view.tsx (3519), web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx (2632), web-console/src/views/datasources-view/datasources-view.tsx (1735), web-console/src/views/supervisors-view/supervisors-view.tsx (1310), web-console/src/druid-models/stages/stages.mock.ts (1282), web-console/src/views/services-view/services-view.tsx (1179) (+34 more).

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage7.5 / 10Strong✓ 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. (×8) — schema-step.tsx, workbench-view.tsx, continuous-chart-render.tsx, …

What to do

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

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

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D33). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ 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.

R7 · Dead Code9.8 / 10Exemplary✓ 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 81 application, 8 tooling and 197 test entry point(s) detected in this repo. Gate removals on your build/type-check — an undetected custom entry would make these reachable.
  • no import path from any entry point (81 application, 8 tooling, 197 test roots considered) (×2) — execution-stages-pane-loader.tsx, dart-query-entry.mock.ts
  • Nothing ultimately consumes this binding: its only referrer is the re-export in web-console/src/druid-models/broker-dynamic-config/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web-console/src/druid-models/broker-dynamic-config/index.ts in the same commit, or the barrel will import a name that no longer exists. — broker-dynamic-config.mock.ts:21
  • Nothing ultimately consumes this binding: its only referrer is the re-export in web-console/src/druid-models/mocks.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web-console/src/druid-models/mocks.ts in the same commit, or the barrel will import a name that no longer exists. — coordinator-dynamic-config.mock.ts:21
  • Nothing ultimately consumes this binding: its only referrer is the re-export in web-console/src/druid-models/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web-console/src/druid-models/index.ts in the same commit, or the barrel will import a name that no longer exists. — external-config.ts:114

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 Hygiene8.5 / 10Strong✓ 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.

  • Declared in web-console/package.json but never imported anywhere in that package or its workspace members — dead weight and attack surface. Verify against build tooling before removing.
  • Every import is type-only — move it to devDependencies. — interval-input.tsx:21

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ 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.

  • web-console/src/helpers/index.ts → web-console/src/helpers/capabilities.ts → web-console/src/helpers/index.ts (one verified cycle inside a mutually-dependent group of 62 files) — index.ts
  • web-console/src/singletons/api.ts → web-console/src/utils/index.tsx → web-console/src/utils/download-query-detail-archive.ts → web-console/src/singletons/index.ts → web-console/src/singletons/api.ts (one verified cycle inside a mutually-dependent group of 14 files) — api.ts
  • web-console/src/views/explore-view/models/explore-state.ts → web-console/src/views/explore-view/models/expression-meta.ts → web-console/src/views/explore-view/utils/index.ts → web-console/src/views/explore-view/utils/table-query.ts → web-console/src/views/explore-view/models/index.ts → web-console/src/views/explore-view/models/explore-state.ts (one verified cycle inside a mutually-dependent group of 10 files) — explore-state.ts
  • web-console/src/views/workbench-view/column-tree/column-tree-menu/index.ts → web-console/src/views/workbench-view/column-tree/column-tree-menu/string-menu-items/string-menu-items.tsx → web-console/src/views/workbench-view/column-tree/column-tree.tsx → web-console/src/views/workbench-view/column-tree/column-tree-menu/index.ts — index.ts

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.

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
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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 Health76%StrongSolid.
Architecture56%Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity75%StrongSolid.
Readiness52%Adequate — gated by P5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security41%Weak — gated by D28, D29, D38Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Accessibility38%Weak — gated by AC2, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 67 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 — no DI registrations detected
  • AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph 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
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface 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 — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) 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
  • 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.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — Not assessed: these audit 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 audit 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.
  • C4 Data Retention — Not assessed: these retention 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 retention 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.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
  • D10 Test Quality — ~893669 lines of test source are present (.java, .ts, .tsx) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Maven POM and package.json), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — Production source is present (.java, .py, .ts, .tsx) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Maven POM and package.json — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
  • D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .java, .py, .ts, .tsx, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.java, .ts, .tsx) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • 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
  • DM6 Domain ↔ infrastructure boundary — no domain-layer types detected — domain↔infrastructure boundary check not applicable
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this check looks for (23 CQRS handler(s))
  • 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 check looks for
  • GD1 Unfinished & placeholder code — no source files
  • IC1 Incompleteness & stubs — 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
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from 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
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: these web-security 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 web-security 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.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — 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
  • X2 Cancellation propagation — 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
  • X3 Exception handling — 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
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — 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

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.

Issue — 68 finding(s)
D29 · Static Analysis (SAST) · High · ×23
  • High: dependabot-missing-cooldown .github/dependabot.yml:24 — This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is. This configuration file has 2 such entries; one cooldown decision clears them all — reported once.
  • High: github-actions-mutable-action-tag .github/workflows/backport.yml:40 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/codeql.yml:42 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/codeql.yml:44 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/codeql.yml:52 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: github/codeql-action/init@<40-character SHA>`. This step references `github/codeql-action/init@v3`; resolve the SHA it points at today with `gh api repos/github/codeql-action/commits/v3 --jq .sha`. `github/codeql-action/init` is hosted INSIDE the `github/codeql-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `github/codeql-action/init` path in `uses:` and query only `github/codeql-action`.
  • High: github-actions-mutable-action-tag .github/workflows/codeql.yml:78 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: github/codeql-action/analyze@<40-character SHA>`. This step references `github/codeql-action/analyze@v3`; resolve the SHA it points at today with `gh api repos/github/codeql-action/commits/v3 --jq .sha`. `github/codeql-action/analyze` is hosted INSIDE the `github/codeql-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `github/codeql-action/analyze` path in `uses:` and query only `github/codeql-action`.
  • High: github-actions-mutable-action-tag .github/workflows/cron-job-its.yml:39 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/cron-job-its.yml:42 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/labeler.yml:35 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/labeler@<40-character SHA>`. This step references `actions/labeler@v6`; resolve the SHA it points at today with `gh api repos/actions/labeler/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/pr-checks.yml:32 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: amannn/action-semantic-pull-request@<40-character SHA>`. This step references `amannn/action-semantic-pull-request@v6`; resolve the SHA it points at today with `gh api repos/amannn/action-semantic-pull-request/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/pr-merged.yml:36 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/stale.yml:26 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/stale@<40-character SHA>`. This step references `actions/stale@v10`; resolve the SHA it points at today with `gh api repos/actions/stale/commits/v10 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/worker.yml:65 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/worker.yml:69 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/worker.yml:77 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/download-artifact@<40-character SHA>`. This step references `actions/download-artifact@v8`; resolve the SHA it points at today with `gh api repos/actions/download-artifact/commits/v8 --jq .sha`.
  • High: run-shell-injection .github/workflows/worker.yml:83 — Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
  • High: run-shell-injection .github/workflows/worker.yml:116 — Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
  • High: github-actions-mutable-action-tag .github/workflows/worker.yml:121 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: mikepenz/action-junit-report@<40-character SHA>`. This step references `mikepenz/action-junit-report@v6`; resolve the SHA it points at today with `gh api repos/mikepenz/action-junit-report/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/worker.yml:136 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
  • High: object-deserialization extensions-core/druid-pac4j/src/main/java/org/apache/druid/security/pac4j/Pac4jSessionStore.java:278 — Found object deserialization using ObjectInputStream. Deserializing entire Java objects is dangerous because malicious actors can create Java object streams with unintended consequences. Ensure that the objects being deserialized are not user-controlled. If this must be done, consider using HMACs to sign the data stream to make sure it is not tampered with, or consider only transmitting object fields and populating a new object. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • High: npm-missing-minimum-release-age web-console/.npmrc:1 — This .npmrc does not set a minimum release age or sets it too low. Newly published packages can be malicious or unstable. Add a minimum release age (`min-release-age = 7` for the npm CLI, `minimum-release-age = 7` for pnpm, `minimumReleaseAge` in `pnpm-workspace.yaml`, or `npmMinimalAgeGate: 7d` in `.yarnrc.yml` for Yarn Berry) — use the key your package manager reads; Yarn Classic has no release-age setting, so pin exact versions and review lockfile bumps there instead to wait 7 days before resolving newly published package versions. Added in: v11.10 Reference: https://github.blog/changelog/2026-02-18-npm-bulk-trusted-publishing-config-and-script-security-now-generally-available/. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is.
  • High: detect-child-process web-console/e2e-tests/util/druid.ts:41 — Detected calls to child_process from a function argument `ingestionSpecPath`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
  • High: detect-child-process web-console/e2e-tests/util/druid.ts:41 — Detected calls to child_process from a function argument `sedCommands`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
D34 · Knowledge Freshness · Orphaned knowledge · ×18
  • Orphaned knowledge extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/db/updater/CoordinatorBasicAuthorizerMetadataStorageUpdater.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/java/util/emitter/core/HttpPostEmitter.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/extendedset/intset/ImmutableConciseSet.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/query/context/ResponseContext.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/storage/sql/SQLCatalogManager.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions-contrib/consul-extensions/src/main/java/org/apache/druid/consul/discovery/ConsulDiscoveryConfig.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/endpoint/CoordinatorBasicAuthorizerResourceHandler.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/hll/HyperLogLogCollector.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidCorrelateUnnestRel.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge sql/src/main/java/org/apache/druid/sql/calcite/rel/Windowing.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/segment/join/filter/JoinFilterAnalyzer.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge server/src/main/java/org/apache/druid/client/cache/MemcachedCache.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/TaskMonitor.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/query/operator/join/SortedInnerJoinOperator.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions-contrib/consul-extensions/src/main/java/org/apache/druid/consul/discovery/ConsulLeaderSelector.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge processing/src/main/java/org/apache/druid/query/rowsandcols/ArrayListRowsAndColumns.java — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D38 · OSV Dependency Vulnerabilities · High CVE · ×12
  • High CVE: [GHSA redacted] web-console/package-lock.json — brace-expansion 1.1.12: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 1.1.16 with an `overrides` entry). This is 1 of 4 advisories with a published fix this scan raises against brace-expansion 1.1.12, and their fixed versions do not agree — anything below 1.1.18 still leaves at least one of them open. Take this package to 1.1.18 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against brace-expansion 1.1.12: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — brace-expansion 2.0.2: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 2.1.2 with an `overrides` entry). This is 1 of 4 advisories with a published fix this scan raises against brace-expansion 2.0.2, and their fixed versions do not agree — anything below 2.1.4 still leaves at least one of them open. Take this package to 2.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against brace-expansion 2.0.2: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — fast-uri 3.0.3: [GHSA redacted] — fast-uri is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin fast-uri to 3.1.3 with an `overrides` entry). This is 1 of 5 advisories with a published fix this scan raises against fast-uri 3.0.3, and their fixed versions do not agree — anything below 3.1.5 still leaves at least one of them open. Take this package to 3.1.5 or later: that is the floor for the package, not this row's target alone. This one row stands for the 5 advisories this scan raises against fast-uri 3.0.3: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — flatted 3.3.1: [GHSA redacted] — flatted is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin flatted to 3.4.0 with an `overrides` entry). This is 1 of 2 advisories with a published fix this scan raises against flatted 3.3.1, and their fixed versions do not agree — anything below 3.4.2 still leaves at least one of them open. Take this package to 3.4.2 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against flatted 3.3.1: [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — js-yaml 3.14.1: [GHSA redacted] — js-yaml is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin js-yaml to 3.15.0 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against js-yaml 3.14.1, and their fixed versions do not agree — anything below 3.15.0 still leaves at least one of them open. Take this package to 3.15.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against js-yaml 3.14.1: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — js-yaml 4.1.0: [GHSA redacted] — js-yaml is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin js-yaml to 4.3.0 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against js-yaml 4.1.0, and their fixed versions do not agree — anything below 4.3.0 still leaves at least one of them open. Take this package to 4.3.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against js-yaml 4.1.0: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — minimatch 3.0.5: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 3.1.4 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 3.0.5, and their fixed versions do not agree — anything below 3.1.4 still leaves at least one of them open. Take this package to 3.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 3.0.5: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — minimatch 3.1.2: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 3.1.4 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 3.1.2, and their fixed versions do not agree — anything below 3.1.4 still leaves at least one of them open. Take this package to 3.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 3.1.2: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — minimatch 5.1.6: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 5.1.8 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 5.1.6, and their fixed versions do not agree — anything below 5.1.8 still leaves at least one of them open. Take this package to 5.1.8 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 5.1.6: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — minimatch 9.0.5: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 9.0.7 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 9.0.5, and their fixed versions do not agree — anything below 9.0.7 still leaves at least one of them open. Take this package to 9.0.7 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 9.0.5: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — picomatch 2.3.1: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 2.3.2 with an `overrides` entry). This one row stands for the 2 advisories this scan raises against picomatch 2.3.1: [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] web-console/package-lock.json — picomatch 4.0.3: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 4.0.4 with an `overrides` entry). This one row stands for the 2 advisories this scan raises against picomatch 4.0.3: [GHSA redacted], [GHSA redacted].
D28 · Secrets (history) · Secret · ×11
  • Secret: generic-api-key sql/src/main/java/org/apache/druid/sql/avatica/AbstractDruidJdbcStatement.java:47 — matched rule 'generic-api-key'
  • Secret: generic-api-key examples/config/coordinator/runtime.properties:8 — matched rule 'generic-api-key'
  • Secret: aws-access-token examples/config/coordinator/runtime.properties:7 — matched rule 'aws-access-token'
  • Secret: aws-access-token examples/config/historical/runtime.properties:8 — matched rule 'aws-access-token'
  • Secret: generic-api-key examples/config/historical/runtime.properties:7 — matched rule 'generic-api-key'
  • Secret: generic-api-key examples/config/realtime/runtime.properties:8 — matched rule 'generic-api-key'
  • Secret: aws-access-token examples/config/realtime/runtime.properties:7 — matched rule 'aws-access-token'
  • Secret: generic-api-key examples/config/master/runtime.properties:16 — matched rule 'generic-api-key'
  • Secret: aws-access-token examples/config/master/runtime.properties:15 — matched rule 'aws-access-token'
  • Secret: aws-access-token examples/config/compute/runtime.properties:18 — matched rule 'aws-access-token'
  • Secret: generic-api-key examples/config/compute/runtime.properties:19 — matched rule 'generic-api-key'
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: ExpressionModule.java ↔ DruidOperatorTable.java processing/src/main/java/org/apache/druid/guice/ExpressionModule.java — `processing/src/main/java/org/apache/druid/guice/ExpressionModule.java` (context processing) and `sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidOperatorTable.java` (context sql) sit in DIFFERENT parts of the tree yet change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) — 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.
  • Boundary-crossing change coupling: TaskAction.java ↔ IndexerMetadataStorageCoordinator.java indexing-service/src/main/java/org/apache/druid/indexing/common/actions/TaskAction.java — `indexing-service/src/main/java/org/apache/druid/indexing/common/actions/TaskAction.java` (context indexing-service) and `server/src/main/java/org/apache/druid/indexing/overlord/IndexerMetadataStorageCoordinator.java` (context main) sit in DIFFERENT parts of the tree yet 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) — 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.
  • Boundary-crossing change coupling: TaskAction.java ↔ IndexerSQLMetadataStorageCoordinator.java indexing-service/src/main/java/org/apache/druid/indexing/common/actions/TaskAction.java — `indexing-service/src/main/java/org/apache/druid/indexing/common/actions/TaskAction.java` (context indexing-service) and `server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java` (context main) 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) — 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.
D13 · Secret Scanning · Leaked secret · ×1
  • Leaked secret: hardcoded-credential .github/scripts/setup_test_profiling_env.sh:44 — hardcoded-credential detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Warning — 1427 finding(s)
D3 · God Classes · TooManyMethods · ×90
  • TooManyMethods: SeekableStreamSupervisor indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:159 — TooManyMethods — 144 methods. 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: QueryContext processing/src/main/java/org/apache/druid/query/QueryContext.java:60 — TooManyMethods — 97 methods. 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: SeekableStreamIndexTaskRunner indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:150 — TooManyMethods — 83 methods. 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: IndexerSQLMetadataStorageCoordinator server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:103 — TooManyMethods — 83 methods. 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: ParallelIndexSupervisorTask indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:137 — TooManyMethods — 76 methods. 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: SqlSegmentsMetadataQuery server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataQuery.java:84 — TooManyMethods — 67 methods. 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: ControllerImpl multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:230 — TooManyMethods — 66 methods. 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: SQLMetadataConnector server/src/main/java/org/apache/druid/metadata/SQLMetadataConnector.java:70 — TooManyMethods — 66 methods. 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: DefaultQueryMetrics processing/src/main/java/org/apache/druid/query/DefaultQueryMetrics.java:43 — TooManyMethods — 62 methods. Most of these members implement query.QueryMetrics (53 of 60 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: SafeWritableBuffer processing/src/main/java/org/apache/druid/segment/data/SafeWritableBuffer.java:39 — TooManyMethods — 61 methods. 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: ApproximateHistogram extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java:36 — TooManyMethods — 59 methods. 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: IntervalTreeMap processing/src/main/java/org/apache/druid/timeline/IntervalTreeMap.java:70 — TooManyMethods — 59 methods. 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: HttpRemoteTaskRunner indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:126 — TooManyMethods — 58 methods. 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: GroupByQuery processing/src/main/java/org/apache/druid/query/groupby/GroupByQuery.java:89 — TooManyMethods — 58 methods. 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: DefaultSearchQueryMetrics processing/src/main/java/org/apache/druid/query/search/DefaultSearchQueryMetrics.java:35 — TooManyMethods — 58 methods. Most of these members implement query.QueryMetrics (54 of 56 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: PlannerContext sql/src/main/java/org/apache/druid/sql/calcite/planner/PlannerContext.java:84 — TooManyMethods — 57 methods. 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: BloomKFilter extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/BloomKFilter.java:62 — TooManyMethods — 55 methods. 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: DataSegment processing/src/main/java/org/apache/druid/timeline/DataSegment.java:59 — TooManyMethods — 54 methods. 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: CoordinatorBasicAuthorizerMetadataStorageUpdater extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authorization/db/updater/CoordinatorBasicAuthorizerMetadataStorageUpdater.java:75 — TooManyMethods — 53 methods. 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: IncrementalIndex processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java:112 — TooManyMethods — 52 methods. 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: ControllerQueryKernel multi-stage-query/src/main/java/org/apache/druid/msq/kernel/controller/ControllerQueryKernel.java:85 — TooManyMethods — 51 methods. 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: SegmentLocalCacheManager server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:84 — TooManyMethods — 51 methods. 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: StreamAppenderator server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java:119 — TooManyMethods — 51 methods. 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: TaskToolbox indexing-service/src/main/java/org/apache/druid/indexing/common/TaskToolbox.java:82 — TooManyMethods — 50 methods. 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: MultiStageQueryContext multi-stage-query/src/main/java/org/apache/druid/msq/util/MultiStageQueryContext.java:113 — TooManyMethods — 50 methods. 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.
  • + 65 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×88
  • FileTooLong: supervisor/SeekableStreamSupervisor.java indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:0 — FileTooLong — 3240 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: SeekableStreamSupervisor (159-5655). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: expr/Function.java processing/src/main/java/org/apache/druid/math/expr/Function.java:0 — FileTooLong — 2435 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: Function (75-4790). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: exec/ControllerImpl.java multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerImpl.java:0 — FileTooLong — 1859 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: metadata/IndexerSQLMetadataStorageCoordinator.java server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java:0 — FileTooLong — 1796 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: IndexerSQLMetadataStorageCoordinator (103-2905). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: seekablestream/SeekableStreamIndexTaskRunner.java indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:0 — FileTooLong — 1410 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: SeekableStreamIndexTaskRunner (150-2384). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: epinephelinae/RowBasedGrouperHelper.java processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/RowBasedGrouperHelper.java:0 — FileTooLong — 1398 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: RowBasedGrouperHelper (114-2230). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: loading/SegmentLocalCacheManager.java server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java:0 — FileTooLong — 1283 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SegmentLocalCacheManager (84-2354). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: parallel/ParallelIndexSupervisorTask.java indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:0 — FileTooLong — 1253 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ParallelIndexSupervisorTask (137-2017). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: metadata/SqlSegmentsMetadataQuery.java server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataQuery.java:0 — FileTooLong — 1172 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SqlSegmentsMetadataQuery (84-2083). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: task/IndexTask.java indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java:0 — FileTooLong — 1151 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: IndexTask (130-1705). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: task/CompactionTask.java indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:0 — FileTooLong — 1146 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: CompactionTask (146-1734). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: hrtr/HttpRemoteTaskRunner.java indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:0 — FileTooLong — 1146 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: HttpRemoteTaskRunner (126-1881). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: appenderator/StreamAppenderator.java server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java:0 — FileTooLong — 1144 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: StreamAppenderator (119-1889). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: nested/NestedFieldColumnIndexSupplier.java processing/src/main/java/org/apache/druid/segment/nested/NestedFieldColumnIndexSupplier.java:0 — FileTooLong — 1083 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: NestedFieldColumnIndexSupplier (91-1732). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: rel/DruidQuery.java sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java:0 — FileTooLong — 1056 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: DruidQuery (126-1741). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: overlord/TaskLockbox.java indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:0 — FileTooLong — 1029 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: TaskLockbox (88-1864). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: virtual/NestedFieldVirtualColumn.java processing/src/main/java/org/apache/druid/segment/virtual/NestedFieldVirtualColumn.java:0 — FileTooLong — 1007 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: NestedFieldVirtualColumn (117-1652). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: intset/ConciseSet.java processing/src/main/java/org/apache/druid/extendedset/intset/ConciseSet.java:0 — FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ConciseSet (54-2183). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: nested/CompressedNestedDataComplexColumn.java processing/src/main/java/org/apache/druid/segment/nested/CompressedNestedDataComplexColumn.java:0 — FileTooLong — 897 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: CompressedNestedDataComplexColumn (114-1369). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: segment/IndexMergerBase.java processing/src/main/java/org/apache/druid/segment/IndexMergerBase.java:0 — FileTooLong — 874 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: IndexMergerBase (76-1239). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: histogram/ApproximateHistogram.java extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java:0 — FileTooLong — 873 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ApproximateHistogram (36-1694). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: expr/ExprEval.java processing/src/main/java/org/apache/druid/math/expr/ExprEval.java:0 — FileTooLong — 864 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ExprEval (45-1546). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: guava/ParallelMergeCombiningSequence.java processing/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java:0 — FileTooLong — 858 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ParallelMergeCombiningSequence (62-1563). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: schema/SystemSchema.java sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:0 — FileTooLong — 850 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: SystemSchema (105-1387). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: segment/IndexIO.java processing/src/main/java/org/apache/druid/segment/IndexIO.java:0 — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: IndexIO (104-1235). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 63 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×43
  • Duplicated block (8 lines × 2) server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:250 — server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:250-258 | server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:304-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:190 — server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:190-197 | server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:224-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:190` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:645 — server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:645-652 | server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:691-698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:645` 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) server/src/main/java/org/apache/druid/server/initialization/jetty/ChatHandlerServerModule.java:72 — server/src/main/java/org/apache/druid/server/initialization/jetty/ChatHandlerServerModule.java:72-79 | server/src/main/java/org/apache/druid/server/initialization/jetty/CliIndexerServerModule.java:92-99 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (8 lines × 2) services/src/main/java/org/apache/druid/server/AsyncQueryForwardingServlet.java:784 — services/src/main/java/org/apache/druid/server/AsyncQueryForwardingServlet.java:784-791 | services/src/main/java/org/apache/druid/server/AsyncQueryForwardingServlet.java:873-880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `services/src/main/java/org/apache/druid/server/AsyncQueryForwardingServlet.java:784` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:413 — sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:413-420 | sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:449-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ArrayConcatSqlAggregator.java:78 — sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ArrayConcatSqlAggregator.java:78-85 | sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ArraySqlAggregator.java:80-88 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/ArrayConcatSqlAggregator.java:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:239 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:239-246 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:559-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:239` 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) sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java:112 — sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java:112-119 | sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlReplace.java:135-143 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java:129 — sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java:129-136 | sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlReplace.java:162-169 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java:129` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java:172 — sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java:172-179 | sql/src/main/java/org/apache/druid/sql/calcite/rel/PartialDruidQuery.java:154-161 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (8 lines × 2) processing/src/main/java/org/apache/druid/timeline/IntervalTreeMap.java:533 — processing/src/main/java/org/apache/druid/timeline/IntervalTreeMap.java:533-540 | processing/src/main/java/org/apache/druid/timeline/IntervalTreeMap.java:560-567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/timeline/IntervalTreeMap.java:533` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:4381 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:4381-4388 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:4394-4401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:4381` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:5565 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:5565-5572 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:5573-5580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:5565` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:307 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:307-314 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:324-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientAsyncImpl.java:307` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:917 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:917-924 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:956-963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:917` 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) indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:995 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:995-1002 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/BaseRestorableTaskRunner.java:147-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:995` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordDataSourcesResource.java:134 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordDataSourcesResource.java:134-141 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordDataSourcesResource.java:173-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordDataSourcesResource.java:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java:308 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java:308-315 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java:330-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java:308` 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) indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:488 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:488-495 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:644-651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java:488` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:185 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:185-192 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/ThreadingTaskRunner.java:170-178 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:222 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:222-229 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/ThreadingTaskRunner.java:202-209 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/PartialDimensionCardinalityTask.java:152 — indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/PartialDimensionCardinalityTask.java:152-159 | indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/PartialDimensionDistributionTask.java:200-207 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/PartialDimensionCardinalityTask.java:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:650 — indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:650-657 | indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:721-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java:650` 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) indexing-service/src/main/java/org/apache/druid/indexing/worker/shuffle/DeepStorageIntermediaryDataManager.java:74 — indexing-service/src/main/java/org/apache/druid/indexing/worker/shuffle/DeepStorageIntermediaryDataManager.java:74-81 | indexing-service/src/main/java/org/apache/druid/indexing/worker/shuffle/LocalIntermediaryDataManager.java:294-301 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • + 18 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×37
  • Duplicated block (9 lines × 2) server/src/main/java/org/apache/druid/server/ClientInfoResource.java:235 — server/src/main/java/org/apache/druid/server/ClientInfoResource.java:235-243 | server/src/main/java/org/apache/druid/server/ClientInfoResource.java:265-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/schema/InformationSchema.java:235 — sql/src/main/java/org/apache/druid/sql/calcite/schema/InformationSchema.java:235-243 | sql/src/main/java/org/apache/druid/sql/calcite/schema/InformationSchema.java:339-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/schema/InformationSchema.java:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BuiltinApproxCountDistinctSqlAggregator.java:94 — sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BuiltinApproxCountDistinctSqlAggregator.java:94-102 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchBaseSqlAggregator.java:115-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BuiltinApproxCountDistinctSqlAggregator.java:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java:212 — sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java:212-220 | sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestBySqlAggregator.java:84-92 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/CeilOperatorConversion.java:57 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/CeilOperatorConversion.java:57-65 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/FloorOperatorConversion.java:57-65 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/CeilOperatorConversion.java:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:416 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:416-424 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:547-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:416` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/QueryLookupOperatorConversion.java:75 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/QueryLookupOperatorConversion.java:75-83 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/RegexpExtractOperatorConversion.java:65-73 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/QueryLookupOperatorConversion.java:75` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) sql/src/main/java/org/apache/druid/sql/http/ArrayWriter.java:113 — sql/src/main/java/org/apache/druid/sql/http/ArrayWriter.java:113-121 | sql/src/main/java/org/apache/druid/sql/http/ArrayWriter.java:142-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/http/ArrayWriter.java:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:369 — processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:369-377 | processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:398-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:369` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:433 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:433-441 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:473-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:433` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java:228 — extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java:228-236 | extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java:321-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceAutoScaler.java:228` 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 (9 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:1511 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:1511-1519 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:1560-1568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:1511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/supervisor/RabbitStreamSupervisor.java:197 — extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/supervisor/RabbitStreamSupervisor.java:197-205 | extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:221-229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:452 — extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:452-460 | extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:561-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:452` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java:62 — extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java:62-70 | extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/ParquetExtensionsModule.java:67-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchMergeBufferAggregatorHelper.java:92 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchMergeBufferAggregatorHelper.java:92-100 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchBufferAggregatorHelper.java:85-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchMergeBufferAggregatorHelper.java:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSetBaseOperatorConversion.java:89 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSetBaseOperatorConversion.java:89-97 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/sql/ArrayOfDoublesSketchSqlAggregator.java:87-95 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildAggregator.java:98 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildAggregator.java:98-106 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildBufferAggregator.java:113-121 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildAggregator.java:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregatorFactory.java:365 — extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregatorFactory.java:365-373 | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramFoldingAggregatorFactory.java:176-184 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) extensions-core/stats/src/main/java/org/apache/druid/query/aggregation/teststats/ZtestPostAggregator.java:70 — extensions-core/stats/src/main/java/org/apache/druid/query/aggregation/teststats/ZtestPostAggregator.java:70-78 | processing/src/main/java/org/apache/druid/query/aggregation/JavaScriptAggregatorFactory.java:83-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/any/StringAnyBufferAggregator.java:96 — processing/src/main/java/org/apache/druid/query/aggregation/any/StringAnyBufferAggregator.java:96-104 | processing/src/main/java/org/apache/druid/query/aggregation/any/StringAnyVectorAggregator.java:141-149 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/query/aggregation/any/StringAnyBufferAggregator.java:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java:239 — processing/src/main/java/org/apache/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java:239-247 | processing/src/main/java/org/apache/druid/query/aggregation/hyperloglog/HyperUniquesAggregatorFactory.java:207-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/DoubleFirstAggregatorFactory.java:183 — processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/DoubleFirstAggregatorFactory.java:183-191 | processing/src/main/java/org/apache/druid/query/aggregation/firstlast/last/DoubleLastAggregatorFactory.java:177-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/DoubleFirstAggregatorFactory.java:183` 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 (9 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/FloatFirstAggregatorFactory.java:177 — processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/FloatFirstAggregatorFactory.java:177-185 | processing/src/main/java/org/apache/druid/query/aggregation/firstlast/last/FloatLastAggregatorFactory.java:175-183 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/FloatFirstAggregatorFactory.java:177` 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 (9 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/LongFirstAggregatorFactory.java:176 — processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/LongFirstAggregatorFactory.java:176-184 | processing/src/main/java/org/apache/druid/query/aggregation/firstlast/last/LongLastAggregatorFactory.java:174-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/LongFirstAggregatorFactory.java:176` 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.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×36
  • Duplicated block (6 lines × 2) server/src/main/java/org/apache/druid/server/coordinator/rules/CompositePartialLoadMatcher.java:161 — server/src/main/java/org/apache/druid/server/coordinator/rules/CompositePartialLoadMatcher.java:161-166 | server/src/main/java/org/apache/druid/server/coordinator/rules/ProjectionPartialLoadMatcher.java:70-75 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/coordinator/rules/CompositePartialLoadMatcher.java:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) server/src/main/java/org/apache/druid/server/http/BaseDynamicConfigSyncer.java:275 — server/src/main/java/org/apache/druid/server/http/BaseDynamicConfigSyncer.java:275-280 | indexing-service/src/main/java/org/apache/druid/indexing/compact/OverlordCompactionScheduler.java:508-513 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/http/BaseDynamicConfigSyncer.java:275` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) server/src/main/java/org/apache/druid/server/http/CoordinatorResource.java:71 — server/src/main/java/org/apache/druid/server/http/CoordinatorResource.java:71-76 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java:233-238 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java:468 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java:468-473 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java:553-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java:468` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/filtration/Ranges.java:82 — sql/src/main/java/org/apache/druid/sql/calcite/filtration/Ranges.java:82-87 | sql/src/main/java/org/apache/druid/sql/calcite/filtration/Ranges.java:103-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/filtration/Ranges.java:82` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:162 — sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:162-167 | sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:194-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidRexExecutor.java:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) sql/src/main/java/org/apache/druid/sql/http/CsvWriter.java:79 — sql/src/main/java/org/apache/druid/sql/http/CsvWriter.java:79-84 | sql/src/main/java/org/apache/druid/sql/http/CsvWriter.java:105-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/http/CsvWriter.java:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) sql/src/main/java/org/apache/druid/sql/http/SqlResource.java:103 — sql/src/main/java/org/apache/druid/sql/http/SqlResource.java:103-108 | indexing-service/src/main/java/org/apache/druid/indexing/input/DruidInputSource.java:216-221 — 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) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1677 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1677-1682 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1706-1711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1677` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:3920 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:3920-3925 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:4219-4225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:3920` 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 (6 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerProvisioningStrategy.java:207 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerProvisioningStrategy.java:207-212 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/SimpleWorkerProvisioningStrategy.java:152-157 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/PendingTaskBasedWorkerProvisioningStrategy.java:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:1441 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:1441-1446 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:1471-1476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java:1441` 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 (6 lines × 2) extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/KafkaSeekableStreamEndSequenceNumbers.java:158 — extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/KafkaSeekableStreamEndSequenceNumbers.java:158-164 | extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/KafkaSeekableStreamStartSequenceNumbers.java:189-194 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/KafkaSeekableStreamEndSequenceNumbers.java:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalInsertAction.java:322 — indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalInsertAction.java:322-327 | indexing-service/src/main/java/org/apache/druid/indexing/common/task/TaskLockHelper.java:236-241 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalInsertAction.java:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemasAvroBytesDecoder.java:117 — extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemasAvroBytesDecoder.java:117-122 | extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/SchemaRepoBasedAvroBytesDecoder.java:80-85 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/avro-extensions/src/main/java/org/apache/druid/data/input/avro/InlineSchemasAvroBytesDecoder.java:117` 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 (6 lines × 2) extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:174 — extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:174-179 | extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/data/input/kinesis/KinesisInputReader.java:111-116 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/output/GoogleExportStorageProvider.java:118 — extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/output/GoogleExportStorageProvider.java:118-123 | extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/output/S3ExportStorageProvider.java:167-172 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/output/GoogleStorageConnector.java:190 — extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/output/GoogleStorageConnector.java:190-195 | extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/output/S3StorageConnector.java:126-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/SendAllTimelineEventConverter.java:88 — extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/SendAllTimelineEventConverter.java:88-93 | extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverter.java:192-197 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (6 lines × 2) extensions-contrib/dropwizard-emitter/src/main/java/org/apache/druid/emitter/dropwizard/DropwizardEmitter.java:102 — extensions-contrib/dropwizard-emitter/src/main/java/org/apache/druid/emitter/dropwizard/DropwizardEmitter.java:102-107 | extensions-contrib/statsd-emitter/src/main/java/org/apache/druid/emitter/statsd/StatsDEmitter.java:117-123 — 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) extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/SendAllGraphiteEventConverter.java:101 — extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/SendAllGraphiteEventConverter.java:101-106 | extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java:214-219 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/SendAllGraphiteEventConverter.java:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/vector/LongHllSketchBuildVectorProcessor.java:61 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/vector/LongHllSketchBuildVectorProcessor.java:61-66 | processing/src/main/java/org/apache/druid/query/aggregation/cardinality/vector/LongCardinalityVectorProcessor.java:74-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/vector/LongHllSketchBuildVectorProcessor.java:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/kll/KllDoublesSketchToHistogramPostAggregator.java:108 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/kll/KllDoublesSketchToHistogramPostAggregator.java:108-113 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/DoublesSketchToHistogramPostAggregator.java:108-113 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/kll/KllDoublesSketchToHistogramPostAggregator.java:108` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildAggregator.java:115 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildAggregator.java:115-120 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildBufferAggregator.java:129-134 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchBuildAggregator.java:115` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregator.java:75 — extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregator.java:75-80 | processing/src/main/java/org/apache/druid/query/aggregation/mean/DoubleMeanVectorAggregator.java:74-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramVectorAggregator.java:75` 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.
  • + 11 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×33
  • Duplicated block (10 lines × 2) server/src/main/java/org/apache/druid/server/coordinator/InlineSchemaDataSourceCompactionConfig.java:113 — server/src/main/java/org/apache/druid/server/coordinator/InlineSchemaDataSourceCompactionConfig.java:113-122 | processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ConcurrentGrouper.java:188-197 — 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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (10 lines × 2) server/src/main/java/org/apache/druid/server/http/CoordinatorBrokerConfigsResource.java:103 — server/src/main/java/org/apache/druid/server/http/CoordinatorBrokerConfigsResource.java:103-112 | server/src/main/java/org/apache/druid/server/http/CoordinatorDynamicConfigsResource.java:101-110 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/http/CoordinatorBrokerConfigsResource.java:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:412 — server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:412-421 | server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:459-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:412` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java:94 — server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java:94-103 | server/src/main/java/org/apache/druid/server/initialization/AuthorizerMapperModule.java:124-134 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/initialization/AuthenticatorMapperModule.java:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) server/src/main/java/org/apache/druid/server/initialization/ServerConfig.java:98 — server/src/main/java/org/apache/druid/server/initialization/ServerConfig.java:98-107 | indexing-service/src/main/java/org/apache/druid/indexing/common/TaskToolbox.java:220-229 — 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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (10 lines × 2) server/src/main/java/org/apache/druid/server/log/FileRequestLogger.java:174 — server/src/main/java/org/apache/druid/server/log/FileRequestLogger.java:174-183 | indexing-service/src/main/java/org/apache/druid/indexing/common/tasklogs/FileTaskLogs.java:135-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/log/FileRequestLogger.java: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 (10 lines × 2) server/src/main/java/org/apache/druid/server/QueryLifecycle.java:275 — server/src/main/java/org/apache/druid/server/QueryLifecycle.java:275-284 | server/src/main/java/org/apache/druid/server/QueryLifecycle.java:313-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/QueryLifecycle.java:275` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:714 — sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:714-723 | sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:743-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:714` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:215 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:215-224 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:393-402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:215` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/TimeFormatOperatorConversion.java:68 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/TimeFormatOperatorConversion.java:68-77 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/TimeParseOperatorConversion.java:65-74 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/TimeFormatOperatorConversion.java:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:629 — sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:629-638 | sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:729-739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:629` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:660 — sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:660-669 | sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:716-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java:660` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:841 — processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:841-850 | processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:886-895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/timeline/partition/OvershadowableManager.java:841` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1959 — indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1959-1968 | indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1991-2000 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:1959` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/supervisor/RabbitStreamSupervisorReportPayload.java:72 — extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/supervisor/RabbitStreamSupervisorReportPayload.java:72-81 | extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisorReportPayload.java:79-88 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:1196 — indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:1196-1205 | indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java:928-937 — 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 (10 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/common/TaskToolbox.java:199 — indexing-service/src/main/java/org/apache/druid/indexing/common/TaskToolbox.java:199-208 | indexing-service/src/main/java/org/apache/druid/indexing/common/TaskToolboxFactory.java:185-194 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (10 lines × 2) extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:240 — extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:240-249 | extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/data/input/kinesis/KinesisInputReader.java:155-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/data/input/kafkainput/KafkaInputReader.java:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java:65 — extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java:65-74 | extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/input/HiveIcebergCatalog.java:119-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverter.java:143 — extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverter.java:143-153 | extensions-contrib/graphite-emitter/src/main/java/org/apache/druid/emitter/graphite/WhiteListBasedConverter.java:171-180 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-contrib/ambari-metrics-emitter/src/main/java/org/apache/druid/emitter/ambari/metrics/WhiteListBasedDruidToTimelineEventConverter.java:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) extensions-contrib/ddsketch/src/main/java/org/apache/druid/query/aggregation/ddsketch/DDSketchUtils.java:86 — extensions-contrib/ddsketch/src/main/java/org/apache/druid/query/aggregation/ddsketch/DDSketchUtils.java:86-95 | extensions-contrib/tdigestsketch/src/main/java/org/apache/druid/query/aggregation/tdigestsketch/TDigestSketchUtils.java:91-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-contrib/ddsketch/src/main/java/org/apache/druid/query/aggregation/ddsketch/DDSketchUtils.java:86` 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. 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchBaseSqlAggregator.java:84 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchBaseSqlAggregator.java:84-93 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchBaseSqlAggregator.java:82-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchBaseSqlAggregator.java:84` 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchObjectSqlAggregator.java:91 — extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchObjectSqlAggregator.java:91-101 | extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/sql/FixedBucketsHistogramQuantileSqlAggregator.java:94-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/quantiles/sql/DoublesSketchObjectSqlAggregator.java:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/StringFirstAggregatorFactory.java:143 — processing/src/main/java/org/apache/druid/query/aggregation/firstlast/first/StringFirstAggregatorFactory.java:143-152 | processing/src/main/java/org/apache/druid/query/aggregation/firstlast/last/StringLastAggregatorFactory.java:108-117 — 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 (10 lines × 2) processing/src/main/java/org/apache/druid/query/aggregation/simd/SimdDoubleMeanVectorAggregator.java:83 — processing/src/main/java/org/apache/druid/query/aggregation/simd/SimdDoubleMeanVectorAggregator.java:83-92 | processing/src/main/java/org/apache/druid/query/aggregation/simd/SimdDoubleSumVectorAggregator.java:83-92 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `processing/src/main/java/org/apache/druid/query/aggregation/simd/SimdDoubleMeanVectorAggregator.java:83` 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.
  • + 8 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×29
  • Duplicated block (7 lines × 2) server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:587 — server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:587-593 | server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:696-702 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/http/LookupCoordinatorResource.java:587` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) server/src/main/java/org/apache/druid/server/security/TLSUtils.java:185 — server/src/main/java/org/apache/druid/server/security/TLSUtils.java:185-191 | server/src/main/java/org/apache/druid/server/security/TLSUtils.java:201-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/src/main/java/org/apache/druid/server/security/TLSUtils.java:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:724 — sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:724-730 | sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java:794-800 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BitwiseSqlAggregator.java:121 — sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BitwiseSqlAggregator.java:121-127 | sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/StringSqlAggregator.java:102-108 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/BitwiseSqlAggregator.java: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 (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:228 — sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:228-234 | sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/NestedDataOperatorConversions.java:708-714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/filtration/BottomUpTransform.java:48 — sql/src/main/java/org/apache/druid/sql/calcite/filtration/BottomUpTransform.java:48-54 | sql/src/main/java/org/apache/druid/sql/calcite/filtration/RemoveRedundantIsTrue.java:48-54 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/filtration/BottomUpTransform.java:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/planner/IngestHandler.java:280 — sql/src/main/java/org/apache/druid/sql/calcite/planner/IngestHandler.java:280-286 | sql/src/main/java/org/apache/druid/sql/calcite/planner/IngestHandler.java:347-355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/planner/IngestHandler.java:280` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidCorrelateUnnestRel.java:228 — sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidCorrelateUnnestRel.java:228-234 | sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidCorrelateUnnestRel.java:259-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidCorrelateUnnestRule.java:143 — sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidCorrelateUnnestRule.java:143-149 | sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidJoinRule.java:188-194 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidCorrelateUnnestRule.java:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) indexing-service/src/main/java/org/apache/druid/indexing/overlord/GlobalTaskLockbox.java:326 — indexing-service/src/main/java/org/apache/druid/indexing/overlord/GlobalTaskLockbox.java:326-332 | indexing-service/src/main/java/org/apache/druid/indexing/overlord/GlobalTaskLockbox.java:352-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) extensions-contrib/aliyun-oss-extensions/src/main/java/org/apache/druid/storage/aliyun/OssDataSegmentMover.java:77 — extensions-contrib/aliyun-oss-extensions/src/main/java/org/apache/druid/storage/aliyun/OssDataSegmentMover.java:77-83 | extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentMover.java:74-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `extensions-contrib/aliyun-oss-extensions/src/main/java/org/apache/druid/storage/aliyun/OssDataSegmentMover.java:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) extensions-core/azure-extensions/src/main/java...

    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.