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 @ 11:36 UTC Public
Code Health Audit

Alibaba/druid

40% Weak
CriticalWeakAdequateStrongExemplary
middle

Large · 271,805 LoC · rebuild ~2.9 person-years · weakest lens: Readiness (29%)

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

36/38dimensions tool-verifieddeterministic · confidence 1.0 · 2 LLM-assisted, advisory
2326findings with an exact file:lineof 2338 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
38/105dimensions across the health lenses271805 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.

alibaba/druid carries serious gaps (40%). 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 Architecture (99%) — the structure is clean and changes stay contained.

The area that most needs attention is Readiness (29%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Accessibility (34%) is the next concern — it raises ongoing delivery and operational cost.

Leadership focus, highest impact first: SAST step to CI running what this repository's stack ships (Security & performance tooling); tests that import the unreached modules (directly or through… (Test Coverage); 1 Leaked secret finding(s) (Secret Scanning).

For scale: Large (~271,805 production lines); rebuilding it from scratch would take roughly ~2.9 person-years (~1–6 engineers). Approximate, ±~30%.

It builds on a genuinely strong Architecture foundation (99%); 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.
Readiness 29% · 46% weightAccessibility 34% · 25% weightCode Health 55% · 14% weightMaturity 64% · 8% weightSecurity 70% · 4% weightArchitecture 99% · 2% weight

Raise Readiness 29 → 70 (the Healthy floor) ⇒ headline 40 → ~50.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

744 finding(s) are new versus the previous scan (2026-07-29) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · SQLASTOutputVisitor.visit (cyclomatic 66) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 59) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 50) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 49) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 46) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 43) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 43) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 41) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 41) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 35) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 35) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 34) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SchemaStatVisitor.visit (cyclomatic 30) core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 29) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 29) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 29) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 28) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 28) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 27) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 26) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 25) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 25) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 24) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 22) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 22) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 22) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 21) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 21) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 21) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 20) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 19) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 19) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 19) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 19) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 17) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 17) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D1 · SQLASTOutputVisitor.visit (cyclomatic 16) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D2 · SchemaStatVisitor.visit (cognitive 41) core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java
  • D2 · SQLASTOutputVisitor.visit (cognitive 22) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D2 · SQLASTOutputVisitor.visit (cognitive 20) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D2 · SQLASTOutputVisitor.visit (cognitive 17) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D2 · OdpsOutputVisitor.visit (cognitive 16) core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java
  • D4 · Duplicated block (22 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java
  • D4 · Duplicated block (22 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryLexer.java
  • D4 · Duplicated block (21 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java
  • D4 · Duplicated block (20 lines × 4) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmLexer.java
  • D4 · Duplicated block (20 lines × 4) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java
  • D4 · Duplicated block (20 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java
  • D4 · Duplicated block (20 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/parser/OscarLexer.java
  • D4 · Duplicated block (19 lines × 5) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryLexer.java
  • D4 · Duplicated block (19 lines × 4) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmLexer.java
  • D4 · Duplicated block (19 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java
  • D4 · Duplicated block (19 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java
  • D4 · Duplicated block (19 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java
  • D4 · Duplicated block (19 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleLexer.java
  • D4 · Duplicated block (18 lines × 5) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryLexer.java
  • D4 · Duplicated block (18 lines × 3) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLDeleteStatement.java
  • D4 · Duplicated block (18 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java
  • D4 · Duplicated block (18 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java
  • D4 · Duplicated block (18 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/sqlite/parser/SQLiteLexer.java
  • D4 · Duplicated block (18 lines × 2) core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java
  • D4 · Duplicated block (18 lines × 2) core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java
  • D4 · Duplicated block (17 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmSelectParser.java
  • D4 · Duplicated block (17 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java
  • D4 · Duplicated block (17 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java
  • D4 · Duplicated block (17 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java
  • D4 · Duplicated block (17 lines × 2) core/src/main/java/com/alibaba/druid/sql/parser/SQLStatementParser.java
  • D4 · Duplicated block (17 lines × 2) core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java
  • D4 · Duplicated block (16 lines × 5) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryLexer.java
  • D4 · Duplicated block (16 lines × 4) core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java
  • D4 · Duplicated block (16 lines × 3) core/src/main/java/com/alibaba/druid/sql/visitor/SQLEvalVisitorUtils.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/parser/OscarExprParser.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarStatementParser.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarStatementParser.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/parser/SQLParserUtils.java
  • D4 · Duplicated block (16 lines × 2) core/src/main/java/com/alibaba/druid/sql/parser/SQLSelectParser.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCheck.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleOutputVisitor.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleOutputVisitor.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleOutputVisitor.java
  • D4 · Duplicated block (15 lines × 3) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleOutputVisitor.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/h2/visitor/H2OutputVisitor.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleLexer.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java
  • D4 · Duplicated block (15 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €140,000–€710,000
Cost to rebuild€140,000–€710,000 (1.4–4.5 person-years (2,367–7,509 h), ~1–6 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 40% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

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

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × 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
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with ConfigTools.java.
+9.7 pts · Low effort · Secret Scanning
2
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
+10.6 pts · Medium effort · Security & performance tooling
3
Add tests that import the unreached modules (directly or through their public entry).
+10.6 pts · Medium effort · Test Coverage

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~2.9 person-years to rebuild), and its weakest lens is Readiness at 29%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~2.9 person-years rebuild (271,805 LoC) · weakest lens: Readiness 29%
→ Direct remediation budget at Readiness 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 1–3 engineer-days once. Not doing it costs about 2.3–14 engineer-days every year, paid as drag on the ~14,203 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–15 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 7–15% 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: 3,502 line(s) changed over a 90-day window ⇒ ~14,203/year · D1/D2/D4 code quality: averaging 5.4/10 ⇒ a 7–15% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 15 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.4/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 7–15% 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 5.4/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

223 modules, 873 dependencies — 15 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)com.alibaba.druid…druid.support.logging…aba.druid.filter.stat…l.dialect.db2.visitor…sql.dialect.hive.stmt…alect.oracle.ast.expr…ect.sqlserver.visitor….dialect.odps.visitor…ect.oracle.ast.clause…dialect.sqlserver.ast….sql.dialect.odps.ast…ialect.oracle.visitor…ql.dialect.oracle.ast…alect.oracle.ast.stmt…ct.postgresql.visitor…t.postgresql.ast.stmt….druid.sql.repository….dialect.hive.visitor….sql.dialect.hive.ast…baba.druid.sql.parser…aba.druid.sql.visitor…t.mysql.ast.statement…dialect.mysql.visitor…sql.dialect.mysql.ast…uid.sql.ast.statement…ba.druid.sql.ast.expr…alibaba.druid.sql.astcom.alibaba.druid.sql…dialect.oscar.visitor…ialect.presto.visitor…dialect.spark.visitorcom.alibaba.druid.util…alect.presto.ast.stmtcom.alibaba.druid.stat…baba.druid.proxy.jdbccom.alibaba.druid.wallcom.alibaba.druid.pool…libaba.druid.wall.spi….alibaba.druid.filter(global)1com.alibaba.druid2…druid.support.logging3…aba.druid.filter.stat4…l.dialect.db2.visitor5…sql.dialect.hive.stmt6…alect.oracle.ast.expr7…ect.sqlserver.visitor8….dialect.odps.visitor9…ect.oracle.ast.clause10…dialect.sqlserver.ast11….sql.dialect.odps.ast12…ialect.oracle.visitor13…ql.dialect.oracle.ast14…alect.oracle.ast.stmt15…ct.postgresql.visitor16…t.postgresql.ast.stmt17….druid.sql.repository18….dialect.hive.visitor19….sql.dialect.hive.ast20…baba.druid.sql.parser21…aba.druid.sql.visitor22…t.mysql.ast.statement23…dialect.mysql.visitor24…sql.dialect.mysql.ast25…uid.sql.ast.statement26…ba.druid.sql.ast.expr27…alibaba.druid.sql.ast28com.alibaba.druid.sql29…dialect.oscar.visitor30…ialect.presto.visitor31…dialect.spark.visitor32com.alibaba.druid.util33…alect.presto.ast.stmt34com.alibaba.druid.stat35…baba.druid.proxy.jdbc36com.alibaba.druid.wall37com.alibaba.druid.pool38…libaba.druid.wall.spi39….alibaba.druid.filter40211572216418113499146913391516181611179141175118183312054451411738348293771771825221114414966342249792121712587016202071623212233511121132131613472111414242111114511114587121121961138102112121229216771981231612515534771520811743320402353117101661127542531796516317199102521943171343114413355923101217125842151612122111113111212512117611371313371692523217551828111154168111113247751141344241388+183 more modules (most-connected shown)

At a glance — Code Health · 55% · Adequate · gated by D2, R1

At a glance — Architecture · 99% · Exemplary

At a glance — Maturity · 64% · Adequate · gated by M2

At a glance — Readiness · 29% · Weak · gated by R4, P3

At a glance — Security · 70% · Adequate · gated by D29, D36

At a glance — Accessibility · 34% · Weak · gated by AC1, AC3, 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 — Injection11High / Critical
A02:2021 — Cryptographic Failures1High / Critical

Roadmap

First, integrate a security static analysis step into the CI pipeline to fail the build on detected vulnerabilities. Next, increase test coverage by adding tests for all currently unreached production modules. Then, address the single leaked secret found in ConfigTools.java. After that, add a health check to the deployed service and ensure the deployed image tag remains immutable to facilitate easy rollbacks. Finally, maintain a changelog to record what is shipped in each release.

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

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with ConfigTools.java.+9.7 ptsLowSecret Scanning
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+10.6 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+10.6 ptsMediumTest Coverage
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.+9.7 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+9.7 ptsMediumRelease Hygiene
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+8.4 ptsMediumText alternatives
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+8.4 ptsMediumPage structure
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+8.4 ptsMediumKeyboard semantics

File quality

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

FileScoreBandWorst signal
core/src/main/java/com/alibaba/druid/filter/config/ConfigTools.java4.1MixedSecret Scanning: Leaked secret: high-entropy-secret
core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java4.8MixedCyclomatic Complexity: SQLServerStatementParser.parseStatementListDialect (cyclomatic 21)
core/src/main/java/com/alibaba/druid/support/http/ResourceServlet.java5.1MixedStatic Analysis (SAST): Medium: no-direct-response-writer
core/src/main/java/com/alibaba/druid/support/jakarta/ResourceServlet.java5.1MixedStatic Analysis (SAST): Medium: no-direct-response-writer
.github/workflows/ci.yaml5.1MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java5.5MixedCyclomatic Complexity: OdpsStatementParser.parseStatementListDialect (cyclomatic 104)
core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsSelectParser.java5.6MixedCyclomatic Complexity: OdpsSelectParser.query (cyclomatic 48)
druid-demo-petclinic/.github/workflows/maven-build.yml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsCreateTableParser.java5.9MixedCyclomatic Complexity: OdpsCreateTableParser.parseCreateTable (cyclomatic 152)
core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryStatementParser.java5.9MixedCyclomatic Complexity: BigQueryStatementParser.parseCreateFunction (cyclomatic 16)
core/src/main/java/com/alibaba/druid/sql/dialect/starrocks/parser/StarRocksCreateTableParser.java5.9MixedCognitive Complexity: StarRocksCreateTableParser.parseIndex (cognitive 21)
core/src/main/java/com/alibaba/druid/sql/visitor/ExportParameterVisitorUtils.java6.3MixedCyclomatic Complexity: ExportParameterVisitorUtils.exportParameter (cyclomatic 25)
core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKCreateTableParser.java6.3MixedCyclomatic Complexity: CKCreateTableParser.parseCreateTableRest (cyclomatic 20)
core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerSelectParser.java6.3MixedCognitive Complexity: SQLServerSelectParser.select (cognitive 37)
core/src/main/java/com/alibaba/druid/util/Utils.java6.4MixedStatic Analysis (SAST): Medium: use-of-md5
core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java7.0MixedCyclomatic Complexity: MySqlStatementParser.parseShow (cyclomatic 275)
core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java7.0MixedCyclomatic Complexity: SQLExprParser.primary (cyclomatic 202)
core/src/main/java/com/alibaba/druid/sql/parser/SQLSelectParser.java7.0MixedCyclomatic Complexity: SQLSelectParser.parseTableSourceRest (cyclomatic 161)
core/src/main/java/com/alibaba/druid/sql/parser/SQLParser.java7.0MixedCyclomatic Complexity: SQLParser.alias (cyclomatic 142)
core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java7.0MixedCyclomatic Complexity: Lexer.scanSQLType (cyclomatic 138)

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. 36 of 38 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 — 38 dimensions across the health lenses
D1D2D3D4D13D15D16D19D21D28D29D31D34D35D36D37AC1AC2AC3AC4AC5AC6AC7M1M2M3M4P1P3P4P6R1R10R2R3R4R7R9

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, 2326 of 2338 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 019fd6dc-3c99-70d0-b9a4-c4e2a12fb0dd.

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.
  • 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".
  • 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 Complexity5.0 / 10Weak✓ Tool-verified

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

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

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

509 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MySqlStatementParser.parseShow at 275. 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 JdbcUtils.getTypeName at 36 — they are counted neither in the figure above nor in this dimension's score.

SQLASTOutputVisitor.visit (cyclomatic 16) · ×7core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:8138
SQLASTOutputVisitor.visit (cyclomatic 19) · ×4core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:2058
SQLASTOutputVisitor.visit (cyclomatic 29) · ×3core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:3536
SQLASTOutputVisitor.visit (cyclomatic 22) · ×3core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:9213
SQLASTOutputVisitor.visit (cyclomatic 21) · ×3core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:6814

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

What to do

  1. Resolve the 7 SQLASTOutputVisitor.visit (cyclomatic 16) finding(s) in Cyclomatic Complexity — start with SQLASTOutputVisitor.java (7). — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 4 SQLASTOutputVisitor.visit (cyclomatic 19) finding(s) in Cyclomatic Complexity — start with SQLASTOutputVisitor.java (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 SQLASTOutputVisitor.visit (cyclomatic 29) finding(s) in Cyclomatic Complexity — start with SQLASTOutputVisitor.java (3). — One of this dimension's main actionable groups (3 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 Complexity2.5 / 10Critical✓ 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 2.5 / 10 · rule-coverage 100% · ceiling Prevented

857 method(s) exceeded the cognitive complexity threshold of 15; the worst was MySqlStatementParser.parseAlterSpecification at 676.

SQLASTOutputVisitor.visit (cognitive 16) · ×8core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:8993
SQLASTOutputVisitor.visit (cognitive 23) · ×5core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:7319
SQLASTOutputVisitor.visit (cognitive 19) · ×5core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:8396
MySqlOutputVisitor.visit (cognitive 18) · ×5core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:490
SQLASTOutputVisitor.visit (cognitive 22) · ×4core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:7403

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

What to do

  1. Resolve the 8 SQLASTOutputVisitor.visit (cognitive 16) finding(s) in Cognitive Complexity — start with SQLASTOutputVisitor.java (8). — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 5 SQLASTOutputVisitor.visit (cognitive 23) finding(s) in Cognitive Complexity — start with SQLASTOutputVisitor.java (5). — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 5 SQLASTOutputVisitor.visit (cognitive 19) finding(s) in Cognitive Complexity — start with SQLASTOutputVisitor.java (5). — One of this dimension's main actionable groups (5 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 Classes7.4 / 10Strong✓ Tool-verified

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

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

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

198 god class(es) detected.

TooManyMethods: FilterChainImpl · ×130core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:36
FileTooLong: parser/MySqlStatementParser.java · ×68core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:0

What to do

  1. Resolve the 130 TooManyMethods finding(s) in God Classes — start with FilterChainImpl.java, FilterAdapter.java, DruidAbstractDataSource.java. — One of this dimension's main actionable groups (130 warning-level).
  2. Resolve the 68 FileTooLong finding(s) in God Classes — start with MySqlStatementParser.java, SQLStatementParser.java, SQLExprParser.java. — One of this dimension's main actionable groups (68 warning-level).
  3. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication8.7 / 10Strong✓ 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 8.7 / 10 · rule-coverage 100% · ceiling Verified

717 duplicated block group(s) detected.

Duplicated block (10 lines × 2) · ×78core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1979
Duplicated block (11 lines × 2) · ×69core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3950
Duplicated block (12 lines × 2) · ×68core/src/main/java/com/alibaba/druid/pool/ha/HighAvailableDataSource.java:267
Duplicated block (9 lines × 2) · ×64core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:2155
Duplicated block (13 lines × 2) · ×59core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1329

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

What to do

  1. Resolve the 78 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with MySqlOutputVisitor.java (10), MySqlStatementParser.java (5), SQLExprParser.java (5). — One of this dimension's main actionable groups (78 warning-level).
  2. Resolve the 69 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with MySqlStatementParser.java (6), MySqlOutputVisitor.java (5), MySqlCreateTableParser.java (4). — One of this dimension's main actionable groups (69 warning-level).
  3. Resolve the 68 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with MySqlOutputVisitor.java (5), OscarOutputVisitor.java (5), SQLASTOutputVisitor.java (4). — One of this dimension's main actionable groups (68 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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: high-entropy-secretcore/src/main/java/com/alibaba/druid/filter/config/ConfigTools.java:38

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with ConfigTools.java. — 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 Hotspots7.9 / 10Strong✓ 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 7.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java (3×275=825); core/src/main/java/com/alibaba/druid/sql/parser/SQLSelectParser.java (2×161=322); core/src/main/java/com/alibaba/druid/sql/parser/SQLStatementParser.java (3×79=237)

Hotspot: core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java · ×9core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java

What to do

  1. Resolve the 9 Hotspot finding(s) in Churn × Complexity Hotspots — start with MySqlStatementParser.java, SQLSelectParser.java, SQLStatementParser.java. — One of this dimension's main actionable groups (9 warning-level).

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

D16 · Bus Factor9.8 / 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.8 / 10 · rule-coverage 100% · ceiling Documented

11 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is core/src/main/java/com/alibaba/druid/proxy/jdbc/ResultSetProxyImpl.java.

Off-boarding risk: anonymized user #1
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 / 10Exemplary◐ 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 Exemplary / 10 · rule-coverage 100% · ceiling Documented

Druid's documentation is clear and complete for a comprehensive database connection pool and SQL parser project: the README covers core features (JDBC pooling, SQL parser with AST, WallFilter security, Stat/StatViewServlet monitoring), Spring Boot starters for each supported Spring version, an integrated demo application showing how to run and view Druid stats, and a dedicated cluster admin guide. A deep architecture capability specs document maps out every capability in detail. The test infrastructure guide is also present, covering focused lanes, shared conventions, and evidence capture. Druid 的文档体系非常全面,包括详细的分步优化计划、架构说明、SQL防火墙指南、方言支持矩阵、监控统计指南、高可用数据源说明以及Filter机制指南。所有文档都基于1.2.28-SNAPSHOT版本,并且每个文档的标题和内容都列出了其完整的章节清单(如'阶段 1:引入方言注册机制'),保证了结构完整性。 Druid 的连接池文档是清晰且结构完整的,包含 README、配置指南、架构概览和设计说明四个层级。README 展示了 getConnection 和 destroy 多余连接的线程流程图,并标注了五个 Condition(notEmpty、maxActive、lowWater、highWater, idleTime),为读者理解机制提供了直观引导;中文配置指南全面,表格清晰地列出了必选参数、容量、检测和回收配置及其默认值与说明,还包含一个完整的 Java 代码配置示例;架构文档以结构化图展示四大子系统(Application Layer / DruidDataSource / Filter Chain / SQL Parser Engine)的协作关系,并指出核心类 `DruidDataSource` 和关键机制。四个文件内容均衡且相互补充,质量高。

The Test Infrastructure Guide mentions a recommended validation lane but does not state which tests fall under each lane (e.g. the LateralViewTest subset) or how to run the full gate.docs/TEST_INFRASTRUCTURE_GUIDE.md

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.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)10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)2.7 / 10Weak✓ 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 2.7 / 10 · rule-coverage 100% · ceiling Documented

11 finding(s): 0 critical, 6 high, 5 medium, 0 low.

High: github-actions-mutable-action-tag · ×6.github/workflows/ci.yaml:27detected by semgrep finding
Medium: ecb-cipher · ×5core/src/main/java/com/alibaba/druid/filter/config/ConfigTools.java:141detected by semgrep finding

What to do

  1. Resolve the 6 High finding(s) in Static Analysis (SAST) — start with ci.yaml (3), maven-build.yml (2), application.properties. — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 5 Medium finding(s) in Static Analysis (SAST) — start with ConfigTools.java (2), ResourceServlet.java (2), Utils.java. — One of this dimension's main actionable groups (5 warning-level).

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

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D34 · Knowledge Freshness7.4 / 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 7.4 / 10 · rule-coverage 100% · ceiling Documented

189 of 714 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java.

Orphaned knowledge · ×13core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java
Further orphaned files (smaller)

What to do

  1. Resolve the 13 Orphaned knowledge finding(s) in Knowledge Freshness — start with FilterChainImpl.java, MySqlUtils.java, CalciteMySqlNodeVisitor.java. — One of this dimension's main actionable groups (13 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.8 / 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.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: SQLServerStatementParser.java↔SQLServerASTVisitor.java 74%; OdpsCreateTableParser.java↔OdpsOutputVisitor.java 68%; SQLServerSelectParser.java↔SQLServerOutputVisitor.java 67%

Change coupling: SQLServerStatementParser.java ↔ SQLServerASTVisitor.java · ×10core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java

✓ On the Gold path — maintain.

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

Unpinned build actions
Workflow token permissions not restricted
No build provenance
No SBOM

What to do

  1. Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Workflow token permissions not restricted finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives2.7 / 10Weak✓ Tool-verified

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

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

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — error.html:6, welcome.html:10

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.2 / 10Adequate✓ 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.

  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. (×2) — login.html:55, login.html:53
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×4) — login.html:61, login.html:64, login.html:58, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×16) — sql-detail.html:23, sql-detail.html:23, inputField.html:11, …

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

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×9) — activeConnectionStackTrace.html:2, api.html:2, connectionInfo.html:2, …
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×10) — activeConnectionStackTrace.html:2, api.html:2, connectionInfo.html:2, …
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×3) — index.html:19, spring-detail.html:21, sql-detail.html:29
  • An empty <title> gives no page name in the tab, history or screen-reader page list. Put descriptive text in the <title>. — nopermit.html:2
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — sql-detail.html:21
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — sql-detail.html:21

What to do

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

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no 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. (×2) — header.html:2, header.html:2

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

  • `.navbar li:hover > a` sets color: #eeeeee on background-color: #6db33f — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — petclinic.css:7973

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 accessibility linting at author time and no automated accessibility check in tests or CI. Add your UI toolkit's own accessibility assertion to the test suite (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in the pipeline.

What to do

  • Enforce accessibility in the toolchain your project already uses: assert accessibility in your UI test suite with your toolkit's own matcher (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in CI so a regression blocks the merge.
M1 · Documentation (README)7.4 / 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 build/run (quick start) section to the root README — the first thing a newcomer needs.
  • 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 2 of 7 project(s) that lack one — worth up to 0.6 pts.
M2 · Architecture documentation2.0 / 10Critical✓ 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 tooling1.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step.

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ 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.

  • Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.

What to do

  • Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
R1 · Type Safety0.0 / 10Critical✓ 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.

  • 0 typed · 6 plain JS — the untyped files are core/src/main/resources/support/http/resources/js/common.js, core/src/main/resources/support/http/resources/js/doT.js, core/src/main/resources/support/http/resources/js/lang.js, druid-admin/src/main/resources/support/http/resources/js/common.js, druid-admin/src/main/resources/support/http/resources/js/doT.js, druid-admin/src/main/resources/support/http/resources/js/lang.js.

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication7.3 / 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.

  • core/src/main/resources/support/http/resources/js/doT.js:13 · druid-admin/src/main/resources/support/http/resources/js/doT.js:13 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — doT.js:13
  • druid-admin/src/main/resources/support/http/resources/js/common.js:53 · druid-admin/src/main/resources/support/http/resources/js/common.js:70 — 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. — common.js:53
  • core/src/main/resources/support/http/resources/js/common.js:52 · druid-admin/src/main/resources/support/http/resources/js/common.js:62 — 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. — common.js:52
  • core/src/main/resources/support/http/resources/js/common.js:127 · druid-admin/src/main/resources/support/http/resources/js/common.js:134 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — common.js:127
  • core/src/main/resources/support/http/resources/js/lang.js:313 · druid-admin/src/main/resources/support/http/resources/js/lang.js:316 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — lang.js:313
  • core/src/main/resources/support/http/resources/js/common.js:1 · druid-admin/src/main/resources/support/http/resources/js/common.js:1 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — common.js:1
  • core/src/main/resources/support/http/resources/js/lang.js:1 · druid-admin/src/main/resources/support/http/resources/js/lang.js:1 — 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. — lang.js:1
  • core/src/main/resources/support/http/resources/js/lang.js:255 · druid-admin/src/main/resources/support/http/resources/js/lang.js:256 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — lang.js:255

What to do

  • Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity10.0 / 10Exemplary✓ Tool-verified

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

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

  • Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×2) — doT.js:94, doT.js:87
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified

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

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

R4 · Test Coverage0.0 / 10Critical✓ Tool-verified

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

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

  • 0% of 6 production file(s) reachable from 0 test file(s) via the import graph

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R7 · Dead Code10.0 / 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.

R9 · Circular Imports10.0 / 10Exemplary✓ 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.

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 Health55%Adequate — gated by D2, R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture99%ExemplaryStrongest area.
Maturity64%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness29%Weak — gated by R4, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security70%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility34%Weak — gated by AC1, AC3, 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 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
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 — ~230485 lines of test source are present (.java) 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 a Gradle version catalogue), 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) 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 a Gradle version catalogue — 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.
  • D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
  • D38 OSV Dependency Vulnerabilities — Scanner failed to run — not a clean result
  • 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, 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) 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.
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 49 value object(s); a JPA/Axon/DDD domain-annotation stack (@Entity/@Aggregate/@Embeddable)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this 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.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • 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.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D33 (JS/npm Dependency Vulnerabilities)
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • 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.
  • 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 — 20 finding(s)
D34 · Knowledge Freshness · Orphaned knowledge · ×13
  • Orphaned knowledge core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.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 core/src/main/java/com/alibaba/druid/util/MySqlUtils.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 core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.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 core/src/main/java/com/alibaba/druid/support/http/stat/WebAppStat.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 core/src/main/java/com/alibaba/druid/sql/PagerUtils.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 core/src/main/java/com/alibaba/druid/wall/WallProvider.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 core/src/main/java/com/alibaba/druid/filter/encoding/EncodingConvertFilter.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 core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLJoinTableSource.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 core/src/main/java/com/alibaba/druid/support/http/stat/WebAppStatValue.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 druid-admin/src/main/java/com/alibaba/druid/admin/service/MonitorStatService.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 core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleRowNumToLimit.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 core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlSchemaStatVisitor.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 core/src/main/java/com/alibaba/druid/sql/dialect/presto/parser/PrestoStatementParser.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.
D29 · Static Analysis (SAST) · High · ×6
  • High: github-actions-mutable-action-tag .github/workflows/ci.yaml:27 — 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@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yaml:29 — 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@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yaml: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: codecov/codecov-action@<40-character SHA>`. This step references `codecov/codecov-action@v3.1.0`; resolve the SHA it points at today with `gh api repos/codecov/codecov-action/commits/v3.1.0 --jq .sha`. Note that `v3.1.0` is an exact release tag rather than a floating major: it is still mutable (a tag can be repointed), but by convention it moves only on a force-push, so pin the floating-major and branch references in this file first.
  • High: github-actions-mutable-action-tag druid-demo-petclinic/.github/workflows/maven-build.yml:21 — 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@v2`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v2 --jq .sha`.
  • High: github-actions-mutable-action-tag druid-demo-petclinic/.github/workflows/maven-build.yml:23 — 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@v2`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v2 --jq .sha`.
  • High: spring-actuator-fully-enabled druid-demo-petclinic/src/main/resources/application.properties:17 — Spring Boot Actuator is fully enabled. This exposes sensitive endpoints such as /actuator/env, /actuator/logfile, /actuator/heapdump and others. Unless you have Spring Security enabled or another means to protect these endpoints, this functionality is available without authentication, causing a significant security risk. 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.
D13 · Secret Scanning · Leaked secret · ×1
  • Leaked secret: high-entropy-secret core/src/main/java/com/alibaba/druid/filter/config/ConfigTools.java:38 — high-entropy-secret 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 — 2307 finding(s)
D3 · God Classes · TooManyMethods · ×130
  • TooManyMethods: FilterChainImpl core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:36 — TooManyMethods — 496 methods. Most of these members implement filter.FilterChain (295 of 300 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: FilterAdapter core/src/main/java/com/alibaba/druid/filter/FilterAdapter.java:38 — TooManyMethods — 489 methods. Most of these members implement filter.Filter (294 of 295 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: DruidAbstractDataSource core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:63 — TooManyMethods — 262 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: SQLStatementParser core/src/main/java/com/alibaba/druid/sql/parser/SQLStatementParser.java:49 — TooManyMethods — 246 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: MySqlOutputVisitor core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:41 — TooManyMethods — 225 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: ResultSetProxyImpl core/src/main/java/com/alibaba/druid/proxy/jdbc/ResultSetProxyImpl.java:33 — TooManyMethods — 219 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: SchemaStatVisitor core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java:42 — TooManyMethods — 207 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: SQLExprParser core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java:41 — TooManyMethods — 199 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: DruidPooledResultSet core/src/main/java/com/alibaba/druid/pool/DruidPooledResultSet.java:27 — TooManyMethods — 194 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: ResultSetBase core/src/main/java/com/alibaba/druid/util/jdbc/ResultSetBase.java:26 — TooManyMethods — 192 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: DatabaseMetaDataProxyImpl core/src/main/java/com/alibaba/druid/proxy/jdbc/DatabaseMetaDataProxyImpl.java:23 — TooManyMethods — 177 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: WallConfig core/src/main/java/com/alibaba/druid/wall/WallConfig.java:28 — TooManyMethods — 166 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: PGOutputVisitor core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java:44 — TooManyMethods — 163 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: WallFilter core/src/main/java/com/alibaba/druid/wall/WallFilter.java:44 — TooManyMethods — 161 methods. Most of these members implement filter.Filter (97 of 127 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: SQLCreateTableStatement core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateTableStatement.java:37 — TooManyMethods — 152 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: MySqlSchemaStatVisitor core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlSchemaStatVisitor.java:37 — TooManyMethods — 151 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: DruidDataSource core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:81 — 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: MySqlStatementParser core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:50 — TooManyMethods — 132 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: OracleOutputVisitor core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleOutputVisitor.java:46 — TooManyMethods — 130 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: WebAppStatValue core/src/main/java/com/alibaba/druid/support/http/stat/WebAppStatValue.java:26 — TooManyMethods — 129 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: SQLUtils core/src/main/java/com/alibaba/druid/sql/SQLUtils.java:95 — TooManyMethods — 128 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: SQLSelectQueryBlock core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:32 — TooManyMethods — 127 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: OscarOutputVisitor core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:40 — TooManyMethods — 124 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: Lexer core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java:41 — TooManyMethods — 120 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: DruidPooledCallableStatement core/src/main/java/com/alibaba/druid/pool/DruidPooledCallableStatement.java:29 — TooManyMethods — 117 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.
  • + 105 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×78
  • Duplicated block (10 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1979 — core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1979-1988 | core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1994-2003 — 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 `core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1979` 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) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java:46 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java:46-55 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLInListExpr.java:60-69 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java:46` 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) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLMethodInvokeExpr.java:107 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLMethodInvokeExpr.java:107-116 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLPropertyExpr.java:109-118 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLMethodInvokeExpr.java:107` 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) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLNumberExpr.java:137 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLNumberExpr.java:137-146 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLNumberExpr.java:150-159 — 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. 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) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:99 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:99-108 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampNTZExpr.java:99-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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:99` 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCharacterDataType.java:135 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCharacterDataType.java:135-144 | core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:364-373 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCharacterDataType.java:135` 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLLateralViewTableSource.java:129 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLLateralViewTableSource.java:129-138 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLValuesTableSource.java:99-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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLLateralViewTableSource.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 (10 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java:97 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java:97-106 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleSelectSubqueryTableSource.java:84-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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSubqueryTableSource.java:97` 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) core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:325 — core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:325-334 | core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:373-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:325` 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) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:337 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:337-346 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:2118-2127 — 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) core/src/main/java/com/alibaba/druid/sql/dialect/blink/parser/BlinkCreateTableParser.java:121 — core/src/main/java/com/alibaba/druid/sql/dialect/blink/parser/BlinkCreateTableParser.java:121-130 | core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:213-222 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/blink/parser/BlinkCreateTableParser.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. 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) core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKStatementParser.java:182 — core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKStatementParser.java:182-191 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSQLStatementParser.java:575-584 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKStatementParser.java:182` 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) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:173 — core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:173-182 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:765-774 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:173` 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) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:189 — core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:189-198 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:1288-1297 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:189` 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 (10 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:52 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:52-61 | core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:74-83 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:52` 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) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbStatementParser.java:90 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbStatementParser.java:90-99 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSQLStatementParser.java:144-153 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbStatementParser.java:90` 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) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbStatementParser.java:157 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbStatementParser.java:157-166 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4862-4871 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbStatementParser.java:157` 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) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:292 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:292-301 | core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:93-102 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:292` 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) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveExprParser.java:345 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveExprParser.java:345-354 | core/src/main/java/com/alibaba/druid/sql/dialect/spark/parser/SparkExprParser.java:235-244 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveExprParser.java:345` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:172 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:172-181 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:248-257 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:172` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:703 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:703-712 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:713-722 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:703` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:857 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:857-866 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:871-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.
  • Duplicated block (10 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2359 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2359-2368 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2450-2459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2371 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2371-2380 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2462-2471 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2371` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:376 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:376-386 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:394-403 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:376` 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.
  • + 53 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×69
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3950 — core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3950-3960 | core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3992-4002 — 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 `core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3950` 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 (11 lines × 2) core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3971 — core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3971-3981 | core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:4013-4023 — 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 `core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:3971` 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 (11 lines × 2) core/src/main/java/com/alibaba/druid/pool/PreparedStatementPool.java:119 — core/src/main/java/com/alibaba/druid/pool/PreparedStatementPool.java:119-129 | core/src/main/java/com/alibaba/druid/pool/PreparedStatementPool.java:150-160 — 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 `core/src/main/java/com/alibaba/druid/pool/PreparedStatementPool.java:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLBinaryOpExpr.java:344 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLBinaryOpExpr.java:344-354 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLBinaryOpExpr.java:357-367 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLBinaryOpExpr.java:344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:100 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:100-110 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampNTZExpr.java:84-94 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:100` 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 (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:121 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:121-131 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampNTZExpr.java:105-115 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:142 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:142-152 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampNTZExpr.java:126-136 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:142` 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 (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterViewStatement.java:237 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterViewStatement.java:237-247 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateViewStatement.java:283-293 — 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 (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterViewStatement.java:253 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterViewStatement.java:253-263 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateViewStatement.java:396-406 — 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 (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:156 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:156-166 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:229-239 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:744 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:744-754 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlSelectQueryBlock.java:252-262 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:744` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/SQLPivot.java:60 — core/src/main/java/com/alibaba/druid/sql/ast/SQLPivot.java:60-70 | core/src/main/java/com/alibaba/druid/sql/ast/SQLUnpivot.java:59-69 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/SQLPivot.java:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:492 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:492-502 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:9877-9889 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:492` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java:316 — core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java:316-326 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:2751-2761 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:107 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:107-117 | core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:237-247 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:329 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:329-339 | core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:152-162 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:329` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:277 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:277-287 | core/src/main/java/com/alibaba/druid/sql/dialect/presto/parser/PrestoStatementParser.java:394-404 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:277` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/impala/visitor/ImpalaOutputVisitor.java:99 — core/src/main/java/com/alibaba/druid/sql/dialect/impala/visitor/ImpalaOutputVisitor.java:99-109 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:3801-3811 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/impala/visitor/ImpalaOutputVisitor.java:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:370 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:370-380 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:418-428 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:370` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:390 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:390-400 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:440-452 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateTableStatement.java:390` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:304 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:304-315 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:325-335 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:304` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:770 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:770-780 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:787-797 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:770` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1049 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1049-1059 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1291-1301 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1049` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1475 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1475-1485 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1494-1504 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1475` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java:426 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java:426-436 | core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java:2624-2634 — 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.
  • + 44 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×68
  • FileTooLong: parser/MySqlStatementParser.java core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:0 — FileTooLong — 5735 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: parser/SQLStatementParser.java core/src/main/java/com/alibaba/druid/sql/parser/SQLStatementParser.java:0 — FileTooLong — 5465 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SQLStatementParser (49-7983). 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: parser/SQLExprParser.java core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java:0 — FileTooLong — 4815 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: visitor/MySqlOutputVisitor.java core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:0 — FileTooLong — 3746 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MySqlOutputVisitor (41-5722). 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: filter/FilterChainImpl.java core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:0 — FileTooLong — 3453 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: FilterChainImpl (36-5287). 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: pool/DruidDataSource.java core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:0 — FileTooLong — 2560 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: DruidDataSource (81-3991). 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: parser/Lexer.java core/src/main/java/com/alibaba/druid/sql/parser/Lexer.java:0 — FileTooLong — 2500 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Lexer (41-3524). 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: parser/OracleStatementParser.java core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleStatementParser.java:0 — FileTooLong — 2238 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: OracleStatementParser (37-3175). 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: visitor/SchemaStatVisitor.java core/src/main/java/com/alibaba/druid/sql/visitor/SchemaStatVisitor.java:0 — FileTooLong — 2074 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SchemaStatVisitor (42-3341). 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: visitor/PGOutputVisitor.java core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java:0 — FileTooLong — 2071 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: PGOutputVisitor (44-3126). 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: visitor/OracleOutputVisitor.java core/src/main/java/com/alibaba/druid/sql/dialect/oracle/visitor/OracleOutputVisitor.java:0 — FileTooLong — 1988 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: OracleOutputVisitor (46-3011). 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: parser/MySqlExprParser.java core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:0 — FileTooLong — 1919 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MySqlExprParser (41-2689). 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: filter/FilterAdapter.java core/src/main/java/com/alibaba/druid/filter/FilterAdapter.java:0 — FileTooLong — 1874 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: FilterAdapter (38-2891). 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: parser/SQLSelectParser.java core/src/main/java/com/alibaba/druid/sql/parser/SQLSelectParser.java:0 — FileTooLong — 1735 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SQLSelectParser (33-2554). 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: spi/WallVisitorUtils.java core/src/main/java/com/alibaba/druid/wall/spi/WallVisitorUtils.java:0 — FileTooLong — 1732 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: sql/SQLUtils.java core/src/main/java/com/alibaba/druid/sql/SQLUtils.java:0 — FileTooLong — 1588 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SQLUtils (95-2609). 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: parser/OracleExprParser.java core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:0 — FileTooLong — 1578 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: OracleExprParser (40-2184). 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: visitor/OscarOutputVisitor.java core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:0 — FileTooLong — 1566 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: OscarOutputVisitor (40-2397). 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: repository/SchemaResolveVisitorFactory.java core/src/main/java/com/alibaba/druid/sql/repository/SchemaResolveVisitorFactory.java:0 — FileTooLong — 1548 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: SchemaResolveVisitorFactory (53-2466). 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: util/MySqlUtils.java core/src/main/java/com/alibaba/druid/util/MySqlUtils.java:0 — FileTooLong — 1507 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MySqlUtils (36-1995). 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: pool/DruidAbstractDataSource.java core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:0 — FileTooLong — 1430 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DruidAbstractDataSource (63-2389). 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: visitor/SQLEvalVisitorUtils.java core/src/main/java/com/alibaba/druid/sql/visitor/SQLEvalVisitorUtils.java:0 — FileTooLong — 1361 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: SQLEvalVisitorUtils (47-2167). 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: calcite/CalciteMySqlNodeVisitor.java core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java:0 — FileTooLong — 1333 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: CalciteMySqlNodeVisitor (25-1844). 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: visitor/SQLASTVisitor.java core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTVisitor.java:0 — FileTooLong — 1282 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SQLASTVisitor (40-2925). 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: parser/OdpsStatementParser.java core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java:0 — FileTooLong — 1193 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: OdpsStatementParser (45-1755). 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.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×68
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/pool/ha/HighAvailableDataSource.java:267 — core/src/main/java/com/alibaba/druid/pool/ha/HighAvailableDataSource.java:267-278 | core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java:1221-1232 — 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 `core/src/main/java/com/alibaba/druid/pool/ha/HighAvailableDataSource.java:267` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java:681 — core/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java:681-692 | core/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java:819-830 — 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 `core/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java:681` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:181 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:181-192 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/ast/OdpsNewExpr.java:35-46 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:369 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:369-380 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLMethodInvokeExpr.java:402-413 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:369` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAliasedExpr.java:94 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAliasedExpr.java:94-105 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLTableSourceImpl.java:66-77 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAliasedExpr.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLCaseExpr.java:179 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLCaseExpr.java:179-190 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLCaseStatement.java:154-165 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLCaseExpr.java:179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLExtractExpr.java:106 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLExtractExpr.java:106-117 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLIntervalExpr.java:120-131 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLExtractExpr.java:106` 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 (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateDatabaseStatement.java:251 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateDatabaseStatement.java:251-262 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLDropDatabaseStatement.java:120-131 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateDatabaseStatement.java:251` 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 (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:762 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:762-773 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlSelectQueryBlock.java:263-274 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:762` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:792 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:792-803 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlSelectQueryBlock.java:295-306 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:792` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:222 — core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:222-233 | core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:270-281 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:72 — core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:72-83 | core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:113-124 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/athena/parser/AthenaCreateTableParser.java:137 — core/src/main/java/com/alibaba/druid/sql/dialect/athena/parser/AthenaCreateTableParser.java:137-148 | core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:114-125 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/athena/parser/AthenaCreateTableParser.java:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKExprParser.java:161 — core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKExprParser.java:161-173 | core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java:4637-4648 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKExprParser.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.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2SelectParser.java:80 — core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2SelectParser.java:80-91 | core/src/main/java/com/alibaba/druid/sql/parser/SQLSelectParser.java:493-504 — 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 (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2StatementParser.java:127 — core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2StatementParser.java:127-138 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSQLStatementParser.java:428-439 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2StatementParser.java:127` 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 (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:74 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:74-85 | core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:92-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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbCreateTableParser.java:138 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbCreateTableParser.java:138-149 | core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbCreateTableParser.java:237-248 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbCreateTableParser.java:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbExprParser.java:160 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbExprParser.java:160-171 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2287-2298 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbExprParser.java:160` 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 (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:421 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:421-432 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java:3085-3096 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:421` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:460 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:460-471 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:10694-10705 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:460` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveExprParser.java:87 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveExprParser.java:87-98 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsExprParser.java:791-802 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveExprParser.java:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java:350 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java:350-361 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleLexer.java:293-304 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveLexer.java:350` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hologres/parser/HologresCreateTableParser.java:34 — core/src/main/java/com/alibaba/druid/sql/dialect/hologres/parser/HologresCreateTableParser.java:34-45 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGCreateTableParser.java:46-57 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hologres/parser/HologresCreateTableParser.java:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:229 — core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:229-240 | core/src/main/java/com/alibaba/druid/sql/dialect/starrocks/parser/StarRocksCreateTableParser.java:211-222 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:229` 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.
  • + 43 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×64
  • Duplicated block (9 lines × 2) core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:2155 — core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:2155-2163 | core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:2215-2223 — 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 `core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:2155` 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 (9 lines × 2) core/src/main/java/com/alibaba/druid/filter/FilterEventAdapter.java:438 — core/src/main/java/com/alibaba/druid/filter/FilterEventAdapter.java:438-447 | core/src/main/java/com/alibaba/druid/filter/FilterEventAdapter.java:490-498 — 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 `core/src/main/java/com/alibaba/druid/filter/FilterEventAdapter.java:438` 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) core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:216 — core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:216-224 | core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:236-245 — 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 `core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:216` 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) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:289 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateExpr.java:289-297 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampNTZExpr.java:315-323 — 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLGeneratedTableSource.java:40 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLGeneratedTableSource.java:40-48 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnnestTableSource.java:112-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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLGeneratedTableSource.java:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnique.java:160 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnique.java:160-168 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlTableIndex.java:105-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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnique.java:160` 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) core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:213 — core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:213-221 | core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:259-268 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:213` 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) core/src/main/java/com/alibaba/druid/sql/dialect/athena/parser/AthenaCreateTableParser.java:85 — core/src/main/java/com/alibaba/druid/sql/dialect/athena/parser/AthenaCreateTableParser.java:85-94 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsCreateTableParser.java:90-98 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/athena/parser/AthenaCreateTableParser.java:85` 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) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryStatementParser.java:331 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryStatementParser.java:331-339 | core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java:563-574 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryStatementParser.java:331` 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) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:227 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:227-235 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:1261-1269 — 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) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmSelectParser.java:192 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmSelectParser.java:192-200 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSelectParser.java:223-231 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmSelectParser.java:192` 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 (9 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmStatementParser.java:234 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmStatementParser.java:234-242 | core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarStatementParser.java:467-475 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmStatementParser.java:234` 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) core/src/main/java/com/alibaba/druid/sql/dialect/doris/parser/DorisCreateTableParser.java:21 — core/src/main/java/com/alibaba/druid/sql/dialect/doris/parser/DorisCreateTableParser.java:21-29 | core/src/main/java/com/alibaba/druid/sql/dialect/starrocks/parser/StarRocksCreateTableParser.java:179-187 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/doris/parser/DorisCreateTableParser.java:21` 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) core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:113 — core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:113-121 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:11134-11142 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.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) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:386 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:386-394 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1254-1262 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2ExprParser.java:77 — core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2ExprParser.java:77-85 | core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerExprParser.java:224-232 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2ExprParser.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 (9 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:255 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:255-263 | core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:77-85 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:255` 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) core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:106 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:106-114 | core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:217-225 — 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. 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlAlterEventStatement.java:42 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlAlterEventStatement.java:42-50 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlCreateEventStatement.java:142-150 — 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:341 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:341-349 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:368-376 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:341` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:635 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:635-643 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:656-664 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:635` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1362 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1362-1370 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1395-1403 — 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1760 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1760-1768 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1850-1858 — 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2320 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2320-2328 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2411-2419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2320` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1093 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1093-1101 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1293-1301 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1093` 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.
  • + 39 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×59
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1329 — core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1329-1341 | core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1383-1396 — 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 `core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1329` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1360 — core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1360-1373 | core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1415-1427 — 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 `core/src/main/java/com/alibaba/druid/filter/FilterChainImpl.java:1360` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java:603 — core/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java:603-618 | core/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java:638-650 — 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 `core/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java:603` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java:136 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java:136-148 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLInListExpr.java:180-192 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateTimeExpr.java:116 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateTimeExpr.java:116-128 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimeExpr.java:128-140 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateTimeExpr.java:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterSequenceStatement.java:59 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterSequenceStatement.java:59-71 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateSequenceStatement.java:78-90 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterSequenceStatement.java:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateTableStatement.java:932 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateTableStatement.java:932-944 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateTableStatement.java:1141-1153 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLCreateTableStatement.java:932` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:288 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:288-300 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:2066-2078 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:404 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:404-416 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:7730-7742 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/visitor/BigQueryOutputVisitor.java:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2StatementParser.java:95 — core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2StatementParser.java:95-107 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSQLStatementParser.java:333-345 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2StatementParser.java:95` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmExprParser.java:168 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmExprParser.java:168-180 | core/src/main/java/com/alibaba/druid/sql/dialect/oscar/parser/OscarExprParser.java:220-232 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmExprParser.java:168` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:88 — core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:88-100 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java:225-237 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:343 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:343-355 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:3767-3779 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/visitor/GaussDbOutputVisitor.java:343` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:372 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:372-384 | core/src/main/java/com/alibaba/druid/sql/parser/SQLCreateTableParser.java:266-278 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:372` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:236 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:236-248 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java:76-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:369 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:369-381 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:8488-8500 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:369` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:463 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:463-475 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java:757-769 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:463` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:821 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:821-833 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsCreateTableParser.java:310-323 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:821` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:950 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:950-962 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:7543-7555 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:950` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1154 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:1154-1167 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:6006-6018 — 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:682 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:682-694 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:716-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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:682` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:993 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:993-1005 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1031-1043 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:993` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1099 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1099-1111 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1174-1186 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:1099` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5270 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5270-5282 | core/src/main/java/com/alibaba/druid/sql/parser/SQLStatementParser.java:5089-5101 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5270` 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 (13 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5608 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5608-5620 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5691-5703 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5608` 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.
  • + 34 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×49
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:509 — core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:509-516 | core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:535-542 — 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 `core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:509` 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) core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:850 — core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:850-858 | core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:881-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:3381 — core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:3381-3388 | core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:3397-3404 — 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 `core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:3381` 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) core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:260 — core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:260-268 | core/src/main/java/com/alibaba/druid/proxy/jdbc/DataSourceProxyImpl.java:270-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:322 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.java:322-329 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLMethodInvokeExpr.java:388-395 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLAggregateExpr.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.
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterTableAddIndex.java:46 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterTableAddIndex.java:46-53 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterTableAlterIndex.java:46-53 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterTableAddIndex.java:46` 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:177 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:177-184 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:249-256 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:177` 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnionQuery.java:252 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnionQuery.java:252-259 | core/src/main/java/com/alibaba/druid/sql/repository/SchemaResolveVisitorFactory.java:2430-2437 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnionQuery.java:252` 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnionQueryTableSource.java:76 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnionQueryTableSource.java:76-83 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlUpdateTableSource.java:60-67 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnionQueryTableSource.java:76` 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) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLValuesTableSource.java:129 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLValuesTableSource.java:129-137 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLWithSubqueryClause.java:157-164 — 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 (8 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:484 — core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:484-491 | core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java:504-511 — 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. 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) core/src/main/java/com/alibaba/druid/sql/ast/SQLIndexOptions.java:60 — core/src/main/java/com/alibaba/druid/sql/ast/SQLIndexOptions.java:60-67 | core/src/main/java/com/alibaba/druid/sql/ast/SQLIndexOptions.java:95-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/SQLOrderBy.java:67 — core/src/main/java/com/alibaba/druid/sql/ast/SQLOrderBy.java:67-74 | core/src/main/java/com/alibaba/druid/sql/ast/SQLZOrderBy.java:67-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.
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:84 — core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:84-91 | core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:108-115 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/TDDLHint.java:84` 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) core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:159 — core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:159-166 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:758-765 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/db2/parser/DB2ExprParser.java:159` 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) core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2StatementParser.java:95 — core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2StatementParser.java:95-102 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4818-4826 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2StatementParser.java:95` 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) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:420 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:420-428 | core/src/main/java/com/alibaba/druid/sql/dialect/sqlite/parser/SQLiteStatementParser.java:58-65 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:420` 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) core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:386 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/visitor/HiveOutputVisitor.java:386-393 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:6277-6284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:125 — core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:125-132 | core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:133-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/dialect/impala/parser/ImpalaCreateTableParser.java:125` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:218 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:218-225 | core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java:5936-5943 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:218` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2335 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2335-2342 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2426-2433 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2335` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:523 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:523-530 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:176-183 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:523` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8117 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8117-8124 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8131-8138 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8117` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:9174 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:9174-9181 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java:247-254 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:9174` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:851 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:851-858 | core/src/main/java/com/alibaba/druid/sql/dialect/presto/visitor/PrestoOutputVisitor.java:190-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:851` 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.
  • + 24 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×38
  • Duplicated block (7 lines × 2) core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:600 — core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:600-606 | core/src/main/java/com/alibaba/druid/filter/logging/LogFilter.java:798-804 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:854 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:854-860 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:964-971 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:854` 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUpdateStatement.java:393 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUpdateStatement.java:393-399 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/ast/stmt/OracleUpdateStatement.java:152-158 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUpdateStatement.java:393` 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryExprParser.java:80 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryExprParser.java:80-86 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsExprParser.java:812-818 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryExprParser.java:80` 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) core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryExprParser.java:321 — core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryExprParser.java:321-327 | core/src/main/java/com/alibaba/druid/sql/dialect/presto/parser/PrestoExprParser.java:96-102 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryExprParser.java:321` 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) core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKExprParser.java:93 — core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKExprParser.java:93-99 | core/src/main/java/com/alibaba/druid/sql/dialect/spark/parser/SparkExprParser.java:65-71 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/parser/CKExprParser.java:93` 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:72 — core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:72-78 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:3180-3186 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/doris/visitor/DorisOutputVisitor.java:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbExprParser.java:175 — core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbExprParser.java:175-181 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGExprParser.java:350-356 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/gaussdb/parser/GaussDbExprParser.java:175` 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2StatementParser.java:67 — core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2StatementParser.java:67-74 | core/src/main/java/com/alibaba/druid/sql/dialect/sqlite/parser/SQLiteStatementParser.java:93-99 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/h2/parser/H2StatementParser.java:67` 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) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:59 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:59-65 | core/src/main/java/com/alibaba/druid/sql/parser/SQLCreateTableParser.java:128-134 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveCreateTableParser.java:59` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlHintStatement.java:72 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlHintStatement.java:72-79 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlHintStatement.java:116-122 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlHintStatement.java:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:973 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:973-979 | core/src/main/java/com/alibaba/druid/sql/parser/SQLCreateTableParser.java:261-267 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlCreateTableParser.java:973` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2608 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2608-2614 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2634-2640 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlExprParser.java:2608` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:292 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:292-298 | core/src/main/java/com/alibaba/druid/sql/parser/SQLSelectParser.java:524-530 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java:292` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1637 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1637-1643 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8578-8584 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:1637` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4499 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4499-4505 | core/src/main/java/com/alibaba/druid/sql/dialect/presto/parser/PrestoStatementParser.java:497-503 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4499` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4972 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4972-4978 | core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java:425-431 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4972` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5151 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5151-5157 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8069-8076 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:5151` 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:7628 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:7628-7634 | core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarStatementParser.java:304-310 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:7628` 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) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:469 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:469-476 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:498-504 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:469` 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 (7 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java:362 — core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java:362-368 | core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java:1623-1629 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java:362` 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) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:400 — core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:400-406 | core/src/main/java/com/alibaba/druid/sql/parser/SQLExprParser.java:1177-1183 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:400` 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) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:687 — core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:687-693 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:1065-1071 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:687` 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) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:1190 — core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:1190-1196 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:1310-1316 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleExprParser.java:1190` 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) core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleStatementParser.java:1693 — core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleStatementParser.java:1693-1699 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleStatementParser.java:1709-1715 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleStatementParser.java:1693` 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.
  • + 13 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×28
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:1191 — core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:1191-1204 | core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:1220-1233 — 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 `core/src/main/java/com/alibaba/druid/pool/DruidDataSource.java:1191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:431 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:431-444 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:475-488 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:431` 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:539 — core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:539-552 | core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:557-570 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLTimestampExpr.java:539` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:824 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:824-837 | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:937-950 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLSelectQueryBlock.java:824` 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnique.java:178 — core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnique.java:178-191 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/ast/statement/MySqlTableIndex.java:123-136 — 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 `core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLUnique.java:178` 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java:331 — core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java:331-344 | core/src/main/java/com/alibaba/druid/sql/dialect/hologres/visitor/HologresOutputVisitor.java:41-54 — 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmExprParser.java:84 — core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmExprParser.java:84-97 | core/src/main/java/com/alibaba/druid/sql/dialect/oscar/parser/OscarExprParser.java:136-150 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/dm/parser/DmExprParser.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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:256 — core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:256-269 | core/src/main/java/com/alibaba/druid/sql/dialect/presto/parser/PrestoStatementParser.java:360-373 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/hive/parser/HiveStatementParser.java:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java:200 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java:200-213 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java:223-236 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlLexer.java:200` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4264 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4264-4277 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4337-4350 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:4264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8396 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8396-8409 | core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleStatementParser.java:73-87 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlStatementParser.java:8396` 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1371 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1371-1384 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1720-1733 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1371` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1810 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1810-1823 | core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1874-1887 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:1810` 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:3998 — core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:3998-4011 | core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java:10987-11000 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java:3998` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:378 — core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:378-391 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java:375-388 — before extracting anything, compare `core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java` and `core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 921 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:556 — core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:556-569 | core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/visitor/SQLServerOutputVisitor.java:516-529 — 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 `core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:556` 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 (14 lines × 2) core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:794 — core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:794-807 | core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java:1174-1187 — before extracting anything, compare `core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java` and `core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/visitor/PGOutputVisitor.java` as WHOLE FILES: this scan already matched 77 separate duplicated blocks between them, totalling at least 921 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/alibaba/druid/sql/dialect/oscar/visitor/OscarOutputVisitor.java:794` 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 cont...

    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.