Public report — corantce, published 21 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this survey Filed cd_207469ecddad408ba2ddc43aa63f40f8 Filed 25 September 2026, 05:09 UTC Public

Finesoft/corantce

Measured 21 September 2026, 14:14 UTC

No baseline yet — first run
50% Weak
CriticalWeakAdequateStrongExemplary

Large · 140,996 LoC · rebuild ~1.1 person-years · weakest lens: Security (40%)

Findings by grade

16 critical 614 serious 27 minor 45 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
21 September 2026, 14:14 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

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

25/28dimensions tool-verifieddeterministic · confidence 1.0 · 3 LLM-assisted, advisory
644findings with an exact file:lineof 657 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
28/114dimensions across the health lenses140996 LoC — wide & deep
Chapters

Executive summary

This large, high-value asset carries a fragile standing with an overall health score of 50%. While the underlying code structure is robust, the system is exposed to significant operational and security risks that threaten delivery speed and reliability. The business value tied up here is substantial, requiring approximately 1.1 person-years to rebuild, which underscores the importance of protecting this investment through targeted remediation rather than wholesale replacement.

The most critical vulnerability lies in security exposure, where the system scores poorly against its size. With a low security rating, the organization faces heightened risk of data breaches and compliance failures. This is not merely a technical debt issue but a direct business liability that could result in costly outages or regulatory penalties. Addressing these gaps is the highest-leverage action to secure the asset’s long-term viability and protect the company’s reputation.

A secondary theme is the velocity tax imposed by maintenance challenges. Although the architecture is sound, the code quality in certain areas creates a drag on every change, costing an estimated 2–5% more effort than in clean code. This inefficiency compounds as the codebase grows, slowing down feature delivery and increasing the cost of ownership. Furthermore, outdated documentation and orphaned files create confusion, making it difficult for new team members to contribute effectively or for existing teams to navigate changes safely.

Despite these risks, the system’s strong architectural foundation and high code health in core areas provide a stable base for improvement. The best immediate step is to document significant design decisions to clarify intent and reduce future ambiguity. This low-effort action pays for itself quickly by preventing repeated mistakes and accelerating onboarding. Focusing on security hardening and decision documentation will yield the most significant return on investment, stabilizing the system without requiring a costly rebuild.

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.
Security 40% · 47% weightMaturity 43% · 26% weightReadiness 63% · 14% weightCode Health 86% · 8% weightArchitecture 97% · 4% weight

Raise Security 40 → 70 (the Healthy floor) ⇒ headline 50 → ~58.

Code composition — where the lines go
Tests 100%
Rebuild cost & value ~ Modeled — €54,000–€270,000
Cost to rebuild€54,000–€270,000 (0.5–1.7 person-years (900–2,854 h), ~1–3 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 50% 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 ~1.1 person-years of build effort (about ~€160,000 to rebuild). Its weakest lens is Security at 40% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — CQRS × 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 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Chars.java, Maps.java, Strings.java.
+7.7 pts · REDACTED effort · Knowledge Freshness
2
Resolve the 1 No ADRs found finding(s) in ADR Quality.
+7.1 pts · REDACTED effort · ADR Quality
3
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 each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
+9.5 pts · REDACTED effort · Architecture documentation

Diagnosis — what's actually going on

Value concentrated against a weak lens · REDACTED · Value at risk
This is a Large asset (~1.1 person-years to rebuild), and its weakest lens is Security at 40%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~1.1 person-years rebuild (140,996 LoC) · weakest lens: Security 40%
→ Direct remediation budget at Security first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · REDACTED · Leverage
Of everything flagged, the best return on effort is: 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 each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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 each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
A velocity tax on every change · REDACTED · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.3/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–5% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 7.3/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.
The top fix pays for itself · REDACTED · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 0.2–1.4 engineer-days every year, paid as drag on the ~4,266 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 8–169 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 2–5% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 1,052 line(s) changed over a 90-day window ⇒ ~4,266/year · D1/D2/D4 code quality: averaging 7.3/10 ⇒ a 2–5% drag on each change · top-ranked remediation: REDACTED effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 169 months.

Architecture — module dependency matrix

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

187 modules, 364 dependencies. 4 dependency cycles across 9 modules, marked above the diagonal.

Showing the 40 most-connected modules; 147 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 context.qualifier2 context.security3 kernel.event4 shared.ubiquity5 config.declarative6 modules.ddd7 shared.resource8 shared.retry9 context.concurrent10 modules.jms.metadata11 modules.query.mapping12 modules.servlet13 shared.exception14 shared.util15 org.corant16 context17 modules.bundle18 modules.datasource.shared19 modules.ddd.shared.message20 modules.jaxrs.resteasy21 modules.jms.shared22 modules.json.expression23 modules.query24 modules.security25 shared.conversion26 modules.ddd.shared.model27 modules.elastic.data28 modules.jms.shared.receive29 modules.jpa.shared30 modules.query.shared31 modules.query.shared.dynamic32 modules.ddd.shared.unitwork33 modules.jpa.hibernate.orm34 modules.query.shared.dynamic.freemarker35 modules.query.shared.dynamic.javascript36 modules.query.cassandra37 modules.query.elastic38 modules.query.jpql39 modules.query.mongodb40 modules.query.sql
1 context.qualifier
2 context.security
3 kernel.event
4 shared.ubiquity
5 config.declarative1
6 modules.ddd3
7 shared.resource1
8 shared.retry1
9 context.concurrent432
10 modules.jms.metadata11
11 modules.query.mapping1
12 modules.servlet11
13 shared.exception31
14 shared.util762
15 org.corant1
16 context21
17 modules.bundle513
18 modules.datasource.shared2312
19 modules.ddd.shared.message291
20 modules.jaxrs.resteasy211
21 modules.jms.shared2111
22 modules.json.expression21
23 modules.query1141
24 modules.security144
25 shared.conversion51
26 modules.ddd.shared.model222111
27 modules.elastic.data21111
28 modules.jms.shared.receive11112313
29 modules.jpa.shared314
30 modules.query.shared51126136
31 modules.query.shared.dynamic1510
32 modules.ddd.shared.unitwork126111
33 modules.jpa.hibernate.orm21112
34 modules.query.shared.dynamic.freemarker34321
35 modules.query.shared.dynamic.javascript4241
36 modules.query.cassandra149433
37 modules.query.elastic3419523
38 modules.query.jpql15114331
39 modules.query.mongodb2413523
40 modules.query.sql2261164331
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…ant.context.qualifier…rant.context.security…g.corant.kernel.event…orant.shared.ubiquity…nt.config.declarativeorg.corant.modules.ddd…orant.shared.resource…g.corant.shared.retry…nt.context.concurrent….modules.jms.metadata…modules.query.mapping…orant.modules.servlet…rant.shared.exceptionorg.corant.shared.utilorg.corantorg.corant.context…corant.modules.bundle…les.datasource.shared…es.ddd.shared.message…odules.jaxrs.resteasy…nt.modules.jms.shared…dules.json.expression….corant.modules.query…rant.modules.security…ant.shared.conversion…ules.ddd.shared.model….modules.elastic.data…es.jms.shared.receive…nt.modules.jpa.shared….modules.query.shared….query.shared.dynamic…s.ddd.shared.unitwork…les.jpa.hibernate.orm…ed.dynamic.freemarker…ed.dynamic.javascript…dules.query.cassandra…modules.query.elastic…nt.modules.query.jpql…modules.query.mongodb…ant.modules.query.sql…ant.context.qualifier1…rant.context.security2…g.corant.kernel.event3…orant.shared.ubiquity4…nt.config.declarative5org.corant.modules.ddd6…orant.shared.resource7…g.corant.shared.retry8…nt.context.concurrent9….modules.jms.metadata10…modules.query.mapping11…orant.modules.servlet12…rant.shared.exception13org.corant.shared.util14org.corant15org.corant.context16…corant.modules.bundle17…les.datasource.shared18…es.ddd.shared.message19…odules.jaxrs.resteasy20…nt.modules.jms.shared21…dules.json.expression22….corant.modules.query23…rant.modules.security24…ant.shared.conversion25…ules.ddd.shared.model26….modules.elastic.data27…es.jms.shared.receive28…nt.modules.jpa.shared29….modules.query.shared30….query.shared.dynamic31…s.ddd.shared.unitwork32…les.jpa.hibernate.orm33…ed.dynamic.freemarker34…ed.dynamic.javascript35…dules.query.cassandra36…modules.query.elastic37…nt.modules.query.jpql38…modules.query.mongodb39…ant.modules.query.sql4013114321111131762121513231229121121112111411445122211121111111123133145112613615101261112111234321424114943334195231511433124135232261164331+147 more modules (most-connected shown)

At a glance — Code Health · 86% · Strong ·

At a glance — Architecture · 97% · Exemplary ·

At a glance — Maturity · 43% · Weak · gated by D34, M2 ·

At a glance — Readiness · 63% · Adequate ·

At a glance — Security · 40% · Weak · gated by D29, D36 ·

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 — Injection23REDACTED / Critical

Roadmap

Begin by establishing architectural clarity through formal decision records and resolving the three most significant orphaned files to ensure knowledge freshness. Simultaneously, correct documentation inaccuracies by aligning the README with the actual single-project structure and adding a clear testing guide. Finally, formalize these architectural choices by creating the missing Architecture Decision Records to complete the documentation baseline.

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

Do thisHelpsEffortDimension
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Chars.java, Maps.java, Strings.java.+7.7 ptsREDACTEDKnowledge Freshness
Resolve the 1 No ADRs found finding(s) in ADR Quality.+7.1 ptsREDACTEDADR Quality
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 each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).+9.5 ptsREDACTEDArchitecture documentation
Resolve the 8 REDACTED finding(s) charged to Static Analysis (SAST) — the other 8 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.+4.5 ptsREDACTEDStatic Analysis (SAST)
Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists; README advertises a microservices architecture, but the repo is a single project with no service manifests.+8.1 ptsREDACTEDDocumentation accuracy
Add a 'Testing' section to the root README — how to run the test suite.+7.1 ptsREDACTEDDocumentation (README)
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness.+3.3 ptsREDACTEDKnowledge Freshness
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED.+3.1 ptsREDACTEDStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED1.6SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED3.6SlopStatic Analysis (SAST): REDACTED: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): REDACTED: REDACTED
corant-shared/src/main/java/org/corant/shared/util/Lists.java5.7MixedCognitive Complexity: Lists.distinct (cognitive 21)
REDACTED5.7MixedStatic Analysis (SAST): REDACTED: REDACTED
corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/ast/ASTComparisonNode.java6.0MixedExplicit Debt: FixmeComment
corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java6.0MixedExplicit Debt: FixmeComment
corant-config/src/main/java/org/corant/config/CorantConfigConversion.java6.0MixedExplicit Debt: TodoComment
corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistencePropertiesParser.java6.0MixedExplicit Debt: FixmeComment
corant-shared/src/main/java/org/corant/shared/util/Types.java6.0MixedExplicit Debt: TodoComment
corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java6.0MixedExplicit Debt: FixmeComment
corant-shared/src/main/java/org/corant/shared/conversion/converter/StringDateConverter.java6.0MixedExplicit Debt: FixmeComment
corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java6.0MixedExplicit Debt: FixmeComment
corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/AbstractTemplateMethodModelEx.java6.0MixedExplicit Debt: FixmeComment
corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java6.0MixedExplicit Debt: FixmeComment
corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java6.0MixedExplicit Debt: TodoComment
corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/converter/Bsons.java6.0MixedExplicit Debt: TodoComment
corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java6.0MixedExplicit Debt: TodoComment

How the grades work

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

Critical — 16

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 614

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 27

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

Could not be resolved — 45

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 25 of 28 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — 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 — 28 dimensions across the health lenses
D1D2D3D4D9D10D11D13D15D17D19D20D21D28D29D34D35D36AX10AX5M1M2M3M4P1P3P4P6

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a0c451-4862-7681-84e2-8c3c2e48ea6e.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Dependency Hygiene ran out of its 5-minute budget before it had finished, so what it reports here is a floor rather than a complete count. The rows above are real and stand; what is not known is how many more there are. This is a limit of the analysis run, not a finding about this repository.
  • D14 License Compliance — evaluation did not complete — License Compliance not included (check did not complete) — excluded from the score.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (9 contributor(s) across 2518 commit(s) sampled, automation and bot accounts excluded). One of them holds 90% of the history; the other 8 hold 1.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: D22 has no public-API collector for any other ecosystem, and the remedy is to write one — no change to the scan image can close it.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (go.mod, a Gemfile's ruby directive, a Dockerfile) is simply not read here yet.
  • AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference — facts that live in .csproj references. This repository either commits no MSBuild project at all (its C# may still have been parsed as syntax-only projects, which carry no references between them) or its projects failed to load, so there was no graph to read. That is a gap in this analyzer's reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P1 CI/CD gates — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality 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. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • 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").
  • 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

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

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

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

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

38 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was AbstractASTComparisonNode.compare at 50. A further 3 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 Chars.foldToAscii at 1245 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: corant-shared/src/main/java/org/corant/shared/util/Chars.java (Chars.foldToAscii at 1245), corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSURIEscapeContentHandler.java (XSSURIEscapeContentHandler.apply at 27), corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSJSEscapeContentHandler.java (XSSJSEscapeContentHandler.apply at 22). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

GlobPatterns.toRegexPattern (cyclomatic 40) · ×2corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:483
AbstractASTComparisonNode.compare (cyclomatic 50)corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/ast/ASTComparisonNode.java:91
DefaultMathFunctionResolver.calculate (cyclomatic 45)corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultMathFunctionResolver.java:51
SimpleRequired.shouldVeto (cyclomatic 33)corant-shared/src/main/java/org/corant/shared/service/SimpleRequired.java:153
QueryParseHandler.handleScript (cyclomatic 28)corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:449

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

What to do

  1. Resolve the 2 GlobPatterns.toRegexPattern (cyclomatic 40) finding(s) in Cyclomatic Complexity — start with PathMatcher.java, GlobPatterns.java. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 AbstractASTComparisonNode.compare (cyclomatic 50) finding(s) in Cyclomatic Complexity — start with ASTComparisonNode.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 DefaultMathFunctionResolver.calculate (cyclomatic 45) finding(s) in Cyclomatic Complexity — start with DefaultMathFunctionResolver.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity5.9 / 10Adequate✓ Tool-verified

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

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

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

150 method(s) exceeded the cognitive complexity threshold of 15; the worst was DefaultMathFunctionResolver.calculate at 109.

GlobPatterns.toRegexPattern (cognitive 97) · ×2corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:483
DefaultMathFunctionResolver.calculate (cognitive 109)corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultMathFunctionResolver.java:51
PersistenceXmlParser.doParse (cognitive 88)REDACTED:73
Types.resolve (cognitive 77)corant-shared/src/main/java/org/corant/shared/util/Types.java:396
DefaultFetchQueryHandler.resolveFetchQueryCriteria (cognitive 70)corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/DefaultFetchQueryHandler.java:193

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

What to do

  1. Resolve the 2 GlobPatterns.toRegexPattern (cognitive 97) finding(s) in Cognitive Complexity — start with PathMatcher.java, GlobPatterns.java. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 DefaultMathFunctionResolver.calculate (cognitive 109) finding(s) in Cognitive Complexity — start with DefaultMathFunctionResolver.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 PersistenceXmlParser.doParse (cognitive 88) finding(s) in Cognitive Complexity — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.0 / 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: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Prevented

41 god class(es) detected.

TooManyMethods: Maps · ×25corant-shared/src/main/java/org/corant/shared/util/Maps.java:76
ClassTooLong: Chars · ×7corant-shared/src/main/java/org/corant/shared/util/Chars.java:26
FileTooLong: util/Chars.java · ×6corant-shared/src/main/java/org/corant/shared/util/Chars.java
MethodTooLong: Chars.foldToAscii · ×3corant-shared/src/main/java/org/corant/shared/util/Chars.java:86

What to do

  1. Resolve the 25 TooManyMethods finding(s) in God Classes — start with Maps.java, Conversions.java, JDBCTemplate.java. — One of this dimension's main actionable groups (25 warning-level).
  2. Resolve the 7 ClassTooLong finding(s) in God Classes — start with Chars.java, Strings.java, Mutable.java. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 FileTooLong finding(s) in God Classes — start with Chars.java, Strings.java, JDBCTemplate.java. — One of this dimension's main actionable groups (6 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.2 / 10Stronggated by 241 serious findings✓ Tool-verified

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

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

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

230 duplicated block group(s) detected. A further 11 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (6 lines × 2) · ×18corant-shared/src/main/java/org/corant/shared/conversion/converter/NumberLocalDateTimeConverter.java:66
Duplicated block (7 lines × 2) · ×16corant-shared/src/main/java/org/corant/shared/exception/GeneralRuntimeExceptionWrapper.java:82
Duplicated block (9 lines × 2) · ×13corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:183
Duplicated block (10 lines × 2) · ×12corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/IntArrayTemporalConverterFactory.java:82
Duplicated block (5 lines × 2) · ×11corant-shared/src/main/java/org/corant/shared/util/Lists.java:63

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

What to do

  1. Resolve the 18 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with SimplePermissions.java (2), NumberLocalDateTimeConverter.java, H2Dialect.java. — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 16 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with AuthenticationData.java (2), JDBCTemplate.java (2), GeneralRuntimeExceptionWrapper.java. — One of this dimension's main actionable groups (16 warning-level).
  3. Resolve the 13 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with MixedZhEnNGramTokenFilter.java, Compressors.java, AsymmetricCipherProvider.java. — One of this dimension's main actionable groups (13 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.

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

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

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

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

67 test methods: 67 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.6 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

0 skipped, 11 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 67 tests (1 harness-style project(s) excluded from the assertion penalty).

No assertions: testFunc · ×2corant-modules/corant-modules-json/src/test/java/org/corant/modules/json/expression/predicate/JsonExpressionTest.java:40
No direct assertions: test · ×9corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/HMACProviderTest.java:30

What to do

  1. Resolve the 9 No direct assertions finding(s) in Test Quality — start with JoseProviderTest.java (3), JCACipherProviderTest.java (2), HMACProviderTest.java. — One of this dimension's main actionable groups (9 recommendation-level).
  2. Resolve the 2 No assertions finding(s) in Test Quality — start with JsonExpressionTest.java, ClassesTest.java. — One of this dimension's main actionable groups (2 warning-level).
  3. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). Java/Kotlin (repository root, Maven): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

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

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

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

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

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

FixmeComment · ×80corant-config/src/main/java/org/corant/config/CorantConfigSource.java:60
TodoComment · ×52corant-config/src/main/java/org/corant/config/PropertyInjector.java:47
FixmeComment repeated across 19 filescorant-config/src/main/java/org/corant/config/declarative/DeclarativePattern.java:99
XxxCommentcorant-context/src/main/java/org/corant/context/qualifier/Qualifiers.java:42

What to do

  1. Resolve the 80 FixmeComment finding(s) in Explicit Debt — start with Qualifiers.java (3), QueryDeveloperKits.java (3), Configs.java (2). — One of this dimension's main actionable groups (80 warning-level).
  2. Resolve the 52 TodoComment finding(s) in Explicit Debt — start with CorantConfigValue.java (5), JettyWebServer.java (5), CorantConfig.java (4). — One of this dimension's main actionable groups (52 warning-level).
  3. Resolve the 1 FixmeComment repeated across 19 files finding(s) in Explicit Debt — start with DeclarativePattern.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityStrong◐ 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: Documented → Verified → Prevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

Corant's documentation is strong and well-structured: the README gives a clear overview of what it is (a microservice development stack with CDI MicroProfile) plus an architecture outline listing Corant projects (corant-boms, corant-parent, corant-devops, corant-shared, corant-config, corant-kernel, corant-context, corant-modules), and the corant-modules-keycloak README shows a concrete jms module configuration example. The project is described with an Apache 2 license badge and Codacy badges; Corant projects are listed by number in the outline (1-8) and the README's architecture sections are clipped mid-sentence before any usage or contributor guidance appears, so those cannot be flagged as missing.

Documentation: no installation or build instructions · ×2README.md

What to do

  1. Resolve the 2 Documentation finding(s) in Documentation Quality — start with README.md (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)1.9 / 10Critical✓ Tool-verified

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

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

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

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

23 finding(s): 0 critical, 16 high, 5 medium, 2 low. 8 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `mvnw` (lines 195–196) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 8 REDACTED finding(s) charged to Static Analysis (SAST) — the other 8 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (16 issue-level, 8 of them charged here).
  2. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

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

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

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

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

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

639 of 639 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is corant-shared/src/main/java/org/corant/shared/util/Chars.java. Counted over 639 of the 1388 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Most significant orphaned file · ×3corant-shared/src/main/java/org/corant/shared/util/Chars.java
Dormant codebase

What to do

  1. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with Chars.java, Maps.java, Strings.java. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: Lists.java↔Sets.java 71%

Change coupling: Lists.java ↔ Sets.javacorant-shared/src/main/java/org/corant/shared/util/Lists.java

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with Lists.java. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

Frontend & cross-cutting dimensions

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

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

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

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

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

What to do

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

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

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

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

  • Add a '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 114 of 115 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation0.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 numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

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 each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
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 accuracy6.0 / 10Adequate◐ 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.

  • README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
  • README advertises a microservices architecture, but the repo is a single project with no service manifests — searched for: `microservice`, `service-mesh`, `istio`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.

What to do

  • Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists; README advertises a microservices architecture, but the repo is a single project with no service manifests.
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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

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

What to do

  • Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

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.

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 Health86%StrongSolid.
Architecture97%ExemplaryStrongest area.
Maturity43%Weak — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness63%AdequateAcceptable, with room to improve.
Security40%Weak — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: 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.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 82 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • 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.
  • D12 Dependency Hygiene — Dependency Hygiene incomplete (time budget)
  • D14 License Compliance — License Compliance not included (check did not complete)
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • 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 — symbol resolution incomplete — navigability not assessed
  • D30 Dependency Vulnerabilities — osv: the scanner produced no output at all, so no dependency was actually scanned
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — osv: the scanner produced no output at all, so no dependency was actually scanned
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • 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 CS/VB/GO/SCALA/SWIFT/DART 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
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 196 value object(s); 6 domain event(s)
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 CQRS handler(s))
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • 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 — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • 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.
  • 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
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 16 finding(s)
D29 · Static Analysis (SAST) · REDACTED · ×16
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
Serious — 614 finding(s)
D17 · Explicit Debt · FixmeComment · ×80
  • FixmeComment corant-config/src/main/java/org/corant/config/CorantConfigSource.java:60 — // FIXME whether to wrap each call? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:76 — // FIXME 6.1. Built-in Converters — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/Configs.java:248 — // FIXME EMPTY? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/Configs.java:297 — // FIXME EMPTY? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/cdi/ConfigProducer.java:61 — // FIXME trim ?? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/cdi/ConfigExtension20.java:79 — // FIXME Is it necessary? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/cdi/ConfigExtension.java:74 — // FIXME Is it necessary? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-config/src/main/java/org/corant/config/declarative/DeclarativePattern.java:52 — // FIXME NO_DFLT_VALUE — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:319 — // FIXME use context service interface — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:369 — // FIXME check transaction manager CDI scope, now we assume it's application scope — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java:71 — // FIXME serialize the runnable task? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:89 — // FIXME serialize the runnable task? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/concurrent/provider/ContextSetupProviderImpl.java:63 — // FIXME the concurrency-ri doesn't handle additional information when executing task. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/concurrent/provider/ContextSetupProviderImpl.java:92 — // FIXME the concurrency-ri doesn't handle additional information when executing task. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/qualifier/TypeArgument.java:56 — // FIXME immutable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/qualifier/Qualifiers.java:127 — // FIXME whether to wrap each call — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/qualifier/Qualifiers.java:132 — // FIXME whether to wrap each call — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/qualifier/Qualifiers.java:137 — // FIXME whether to wrap each call — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-context/src/main/java/org/corant/context/required/StartupExtension.java:46 — // FIXME toString()?? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-kernel/src/main/java/org/corant/kernel/logging/LoggerFactory.java:65 — // FIXME openJDK weak reference — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/PropertyEnumerationSource.java:87 — // FIXME unmodifiable pass javac — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/DefaultMessageResolver.java:163 — // FIXME Use another ways to avoid the holder invalid or dirty — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/DefaultExceptionMessageResolver.java:49 — // FIXME Do we need to append category prefix to message keys? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/AbstractDataSourceExtension.java:111 — // FIXME use another ways. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment corant-modules/corant-modules-mongodb/src/main/java/org/corant/modules/mongodb/MongoClientExtension.java:230 — // FIXME use another ways. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 55 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×52
  • TodoComment corant-config/src/main/java/org/corant/config/PropertyInjector.java:47 — // TODO consider the bridge method "change" visibility of base class's methods ?? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-context/src/main/java/org/corant/context/proxy/ProxyUtils.java:100 — // TODO consider the bridge method "change" visibility of base class's methods ?? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-context/src/main/java/org/corant/context/proxy/ProxyInvocationHandler.java:46 — // TODO consider the bridge method "change" visibility of base class's methods ?? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigValue.java:55 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigValue.java:67 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigValue.java:80 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigValue.java:93 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigValue.java:104 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:338 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfig.java:94 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfig.java:125 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfig.java:163 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfig.java:181 — // TODO MP 2.0 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/CorantConfigExpander.java:76 — // TODO Use AST? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-shared/src/main/java/org/corant/shared/ubiquity/StringTemplate.java:140 — // TODO Use AST? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/cdi/ConfigExtension20.java:123 — // TODO FIXME validate config — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-config/src/main/java/org/corant/config/cdi/ConfigExtension.java:88 — // TODO FIXME validate config — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-context/src/main/java/org/corant/context/command/CommandExtension.java:121 — // TODO FIXME since we are using CDI, so the command handler bean may have qualifiers — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:180 — // TODO FIXME, since the ManagedScheduledExecutorService extends ManagedExecutorService — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:53 — // TODO Auto-generated constructor stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/PropertyEnumerationSource.java:142 — // TODO validate — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/service/AbstractElasticDocumentService.java:142 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/DefaultNarayanaConfigurator.java:67 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-modules/corant-modules-jcache/corant-modules-jcache-redisson/src/main/java/org/corant/modules/jcache/redisson/RedissonJCachingProvider.java:157 — // TODO implement support of store_by_reference — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceivingTask.java:248 — // TODO To be improved, when entering BROKEN mode, should exit from the executor. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 27 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×25
  • TooManyMethods: Maps corant-shared/src/main/java/org/corant/shared/util/Maps.java:76 — TooManyMethods — 99 methods. The bar is 30 methods; this is 69 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Conversions corant-shared/src/main/java/org/corant/shared/util/Conversions.java:60 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: JDBCTemplate corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:59 — TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Systems corant-shared/src/main/java/org/corant/shared/util/Systems.java:49 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PersistenceUnitInfoMetaData corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistenceUnitInfoMetaData.java:46 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Strings corant-shared/src/main/java/org/corant/shared/util/Strings.java:47 — TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MgQueryTemplate corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:64 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExtendedEntityManager corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/ExtendedEntityManager.java:41 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: XConnection corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/accessor/DomainJDBCAccess.java:186 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WrappedConnection corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/WrappedConnection.java:41 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Texts corant-shared/src/main/java/org/corant/shared/util/Texts.java:74 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExtendedJMSContext corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/context/ExtendedJMSContext.java:82 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Query corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/Query.java:45 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SqlQueryTemplate corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlQueryTemplate.java:86 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Preconditions corant-shared/src/main/java/org/corant/shared/util/Preconditions.java:40 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Corant corant-kernel/src/main/java/org/corant/Corant.java:147 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NamingContext corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:47 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WXPay corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/WXPay.java:19 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MessageReceivingSession corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingSession.java:44 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Randoms corant-shared/src/main/java/org/corant/shared/util/Randoms.java:35 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Assertions corant-shared/src/main/java/org/corant/shared/util/Assertions.java:33 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CorantWXNotifyXMLVO corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/CorantWXNotifyXMLVO.java:24 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Beans corant-context/src/main/java/org/corant/context/Beans.java:58 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ManagedExecutorConfig corant-context/src/main/java/org/corant/context/concurrent/ManagedExecutorConfig.java:38 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UndertowWebServerConfig corant-modules/corant-modules-webserver/corant-modules-webserver-undertow/src/main/java/org/corant/modules/webserver/undertow/UndertowWebServerConfig.java:30 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×18
  • Duplicated block (6 lines × 2) corant-shared/src/main/java/org/corant/shared/conversion/converter/NumberLocalDateTimeConverter.java:66 — corant-shared/src/main/java/org/corant/shared/conversion/converter/NumberLocalDateTimeConverter.java:66-71 | corant-shared/src/main/java/org/corant/shared/conversion/converter/NumberZonedDateTimeConverter.java:67-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/conversion/converter/NumberLocalDateTimeConverter.java:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/H2Dialect.java:62 — corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/H2Dialect.java:62-67 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/MySQLDialect.java:90-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/H2Dialect.java:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/AbstractTemplateMethodModelEx.java:107 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/AbstractTemplateMethodModelEx.java:107-112 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/AbstractTemplateMethodModelEx.java:116-121 — 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistencePropertiesParser.java:74 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistencePropertiesParser.java:74-79 | corant-modules/corant-modules-mongodb/src/main/java/org/corant/modules/mongodb/MongoClientConfig.java:161-166 — 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 `corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistencePropertiesParser.java:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:171 — REDACTED:171-176 | REDACTED:271-276 — 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 `REDACTED:171` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:95 — corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:95-100 | corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/JarPackager.java:77-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/HttpRanges.java:180 — corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/HttpRanges.java:180-185 | corant-shared/src/main/java/org/corant/shared/ubiquity/Tuple.java:584-589 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/SecuredContentFilter.java:66 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/SecuredContentFilter.java:66-71 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/SecuredHeaderFilter.java:68-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) corant-context/src/main/java/org/corant/context/proxy/ContextualMethodHandler.java:148 — corant-context/src/main/java/org/corant/context/proxy/ContextualMethodHandler.java:148-153 | corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthorizationFilterRegistrar.java:204-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:169 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:169-174 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngines.java:16-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) corant-context/src/main/java/org/corant/context/security/SecurityContext.java:98 — corant-context/src/main/java/org/corant/context/security/SecurityContext.java:98-103 | corant-shared/src/main/java/org/corant/shared/resource/Resource.java:153-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 `corant-context/src/main/java/org/corant/context/security/SecurityContext.java:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-rpc/corant-modules-rpc-feign/src/main/java/org/corant/modules/rpc/feign/FeignExtension.java:44 — corant-modules/corant-modules-rpc/corant-modules-rpc-feign/src/main/java/org/corant/modules/rpc/feign/FeignExtension.java:44-49 | corant-modules/corant-modules-websocket/src/main/java/org/corant/modules/websocket/WebSocketExtension.java:37-42 — 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 `corant-modules/corant-modules-rpc/corant-modules-rpc-feign/src/main/java/org/corant/modules/rpc/feign/FeignExtension.java:44` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/IdentifiablePermission.java:31 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/IdentifiablePermission.java:31-36 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/IdentifiableRole.java:31-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/IdentifiablePermission.java:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimplePermissions.java:53 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimplePermissions.java:53-59 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimpleRoles.java:53-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimplePermissions.java:45 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimplePermissions.java:45-51 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimpleRoles.java:46-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAService.java:95 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAService.java:95-100 | corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAService.java:164-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:170 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:170-175 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:262-267 — 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 `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `ann` to `EsKeyword` in one and `EsText` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:54 — corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:54-59 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/SquaredEuclideanDistance.java:55-60 — before extracting anything, compare `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java` and `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/SquaredEuclideanDistance.java` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×16
  • Duplicated block (7 lines × 2) corant-shared/src/main/java/org/corant/shared/exception/GeneralRuntimeExceptionWrapper.java:82 — corant-shared/src/main/java/org/corant/shared/exception/GeneralRuntimeExceptionWrapper.java:82-88 | corant-shared/src/main/java/org/corant/shared/exception/GeneralRuntimeExceptionWrapper.java:94-100 — 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) corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:34 — corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:34-40 | corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Subject.java:53-59 — before extracting anything, compare `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java` and `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Subject.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Subject.java:61` calls `getPrincipal` and `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:42` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:45 — corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:45-51 | corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Subject.java:66-72 — before extracting anything, compare `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java` and `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Subject.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Subject.java:61` calls `getPrincipal` and `corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/AuthenticationData.java:40` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/AbstractSqlNamedQueryService.java:104 — corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/AbstractSqlNamedQueryService.java:104-110 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/AbstractSqlNamedQueryService.java:142-148 — 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) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/Decimal128Utils.java:53 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/Decimal128Utils.java:53-59 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/Decimal128Utils.java:94-100 — 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 `corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/Decimal128Utils.java:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/AbstractElasticIndexingResolver.java:313 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/AbstractElasticIndexingResolver.java:313-319 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/AbstractElasticIndexingResolver.java:357-363 — 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 `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/AbstractElasticIndexingResolver.java:313` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:806 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:806-812 | corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:874-880 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:806` 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) corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/metadata/WebFilterMetaData.java:137 — corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/metadata/WebFilterMetaData.java:137-143 | corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/metadata/WebServletMetaData.java:127-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimplePermission.java:45 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimplePermission.java:45-51 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/SimpleRole.java:45-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:952 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:952-958 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/StreamableQueryRunner.java:103-109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthenticationFilter.java:122 — corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthenticationFilter.java:122-128 | corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTHttpAuthenticationMechanism.java:112-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-api/src/main/java/org/corant/modules/jms/send/MessageSender.java:33 — corant-modules/corant-modules-jms/corant-modules-jms-api/src/main/java/org/corant/modules/jms/send/MessageSender.java:33-39 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/send/DefaultMessageSender.java:81-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 `corant-modules/corant-modules-jms/corant-modules-jms-api/src/main/java/org/corant/modules/jms/send/MessageSender.java:33` 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) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:74 — corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:74-80 | corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/JarPackager.java:56-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/MpJWTAuthenticator.java:59 — corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/MpJWTAuthenticator.java:59-65 | corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/MpJWTAuthorizer.java:56-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:186 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:186-192 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:235-241 — 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 `corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:186` 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) corant-modules/corant-modules-mvc/src/main/java/org/corant/modules/mvc/FreemarkerServletProiver.java:37 — corant-modules/corant-modules-mvc/src/main/java/org/corant/modules/mvc/FreemarkerServletProiver.java:37-43 | corant-modules/corant-modules-mvc/src/main/java/org/corant/modules/mvc/FreemarkerServletProiver.java:51-57 — 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 `corant-modules/corant-modules-mvc/src/main/java/org/corant/modules/mvc/FreemarkerServletProiver.java:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×13
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:183 — corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:183-191 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:2165-2173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Compressors.java:165 — corant-shared/src/main/java/org/corant/shared/util/Compressors.java:165-173 | corant-shared/src/main/java/org/corant/shared/util/FileUtils.java:248-256 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Compressors.java:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/cipher/AsymmetricCipherProvider.java:69 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/cipher/AsymmetricCipherProvider.java:69-77 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/cipher/AsymmetricCipherProvider.java:92-100 — 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 `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/cipher/AsymmetricCipherProvider.java:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractCompilableScriptProcessor.java:89 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractCompilableScriptProcessor.java:89-97 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractCompilableScriptProcessor.java:116-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 `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractCompilableScriptProcessor.java:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractCompilableScriptProcessor.java:126` calls `put` and `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractCompilableScriptProcessor.java:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:115 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:115-123 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:500-508 — 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) corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/DefaultMailSender.java:64 — corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/DefaultMailSender.java:64-72 | corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/DefaultMailSender.java:82-90 — 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) REDACTED:194 — REDACTED:194-202 | REDACTED:320-328 — 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 `REDACTED:194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:329` calls `setInt` and `REDACTED:203` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/Jsons.java:174 — corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/Jsons.java:174-182 | corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/Jsons.java:208-216 — 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 `corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/Jsons.java:174` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 first that the copies are not typed on the same thing: the declarations holding them bind `type` to `TypeLiteral<T>` in one and `TypeReference<T>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:422 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:422-430 | corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:442-450 — 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 `corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:422` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:226 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:226-234 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:278-286 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:82 — corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:82-90 | corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java:82-90 — before extracting anything, compare `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java` and `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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) corant-modules/corant-modules-json/src/main/java/org/corant/modules/bson/codec/URIStringCodec.java:33 — corant-modules/corant-modules-json/src/main/java/org/corant/modules/bson/codec/URIStringCodec.java:33-41 | corant-modules/corant-modules-json/src/main/java/org/corant/modules/bson/codec/URLStringCodec.java:33-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) corant-config/src/main/java/org/corant/config/CorantConfig.java:180 — corant-config/src/main/java/org/corant/config/CorantConfig.java:180-189 | corant-config/src/main/java/org/corant/config/CorantConfigSource.java:77-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×12
  • Duplicated block (10 lines × 2) corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/IntArrayTemporalConverterFactory.java:82 — corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/IntArrayTemporalConverterFactory.java:82-91 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ListTemporalConverterFactory.java:85-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) corant-shared/src/main/java/org/corant/shared/util/FileUtils.java:399 — corant-shared/src/main/java/org/corant/shared/util/FileUtils.java:399-408 | corant-shared/src/main/java/org/corant/shared/util/FileUtils.java:516-525 — 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) corant-shared/src/main/java/org/corant/shared/util/Strings.java:1171 — corant-shared/src/main/java/org/corant/shared/util/Strings.java:1171-1180 | corant-shared/src/main/java/org/corant/shared/util/Strings.java:1271-1280 — 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) corant-modules/corant-modules-webserver/corant-modules-webserver-jetty/src/main/java/org/corant/modules/webserver/jetty/JettyWebServer.java:60 — corant-modules/corant-modules-webserver/corant-modules-webserver-jetty/src/main/java/org/corant/modules/webserver/jetty/JettyWebServer.java:60-69 | corant-modules/corant-modules-webserver/corant-modules-webserver-undertow/src/main/java/org/corant/modules/webserver/undertow/UndertowWebServer.java:123-132 — 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 `corant-modules/corant-modules-webserver/corant-modules-webserver-jetty/src/main/java/org/corant/modules/webserver/jetty/JettyWebServer.java:60` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:321 — REDACTED:321-330 | REDACTED:365-374 — 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 `REDACTED: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 (10 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:168 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:168-177 | corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:273-282 — 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 `corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:168` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingConnections.java:89 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingConnections.java:89-98 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingConnections.java:101-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingConnections.java:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:84 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:84-93 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:145-154 — 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 `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `ann` to `EsBoolean` in one and `EsIp` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/service/AbstractElasticDocumentService.java:93 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/service/AbstractElasticDocumentService.java:93-102 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/service/AbstractElasticDocumentService.java:119-128 — 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 `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/service/AbstractElasticDocumentService.java:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/Aggregates.java:135 — corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/Aggregates.java:135-144 | corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/Aggregates.java:148-157 — 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 `corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/Aggregates.java:135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `params` to `Map<Object, Object>` in one and `Object...` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:171 — corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:171-180 | corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:212-221 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:181` calls `getMojo`, `isWithJvmOpts`, `add` and `corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/DistPackager.java:222` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/javascript/JavaScriptProcessor.java:52 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/javascript/JavaScriptProcessor.java:52-61 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/kotlin/KotlinScriptProcessor.java:52-61 — before extracting anything, compare `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/javascript/JavaScriptProcessor.java` and `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/kotlin/KotlinScriptProcessor.java` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×11
  • Duplicated block (5 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Lists.java:63 — corant-shared/src/main/java/org/corant/shared/util/Lists.java:63-67 | corant-shared/src/main/java/org/corant/shared/util/Lists.java:102-106 — 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 `corant-shared/src/main/java/org/corant/shared/util/Lists.java:63` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Maps.java:1155 — corant-shared/src/main/java/org/corant/shared/util/Maps.java:1155-1159 | corant-shared/src/main/java/org/corant/shared/util/Maps.java:1170-1174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Primitives.java:201 — corant-shared/src/main/java/org/corant/shared/util/Primitives.java:201-205 | corant-shared/src/main/java/org/corant/shared/util/Primitives.java:320-324 — 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 `corant-shared/src/main/java/org/corant/shared/util/Primitives.java:201` 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 (5 lines × 2) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:218 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:218-222 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:235-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.
  • Duplicated block (5 lines × 2) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/EvaluationContext.java:66 — corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/EvaluationContext.java:66-71 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/jsonexpression/JsonExpressionScriptProcessor.java:392-396 — 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 (5 lines × 2) corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ByteArrayPrimitiveConverterFactory.java:86 — corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ByteArrayPrimitiveConverterFactory.java:86-90 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/PrimitiveByteArrayConverterFactory.java:69-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ByteArrayPrimitiveConverterFactory.java:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Launches.java:62 — corant-shared/src/main/java/org/corant/shared/util/Launches.java:62-66 | corant-shared/src/main/java/org/corant/shared/util/Launches.java:155-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.
  • Duplicated block (5 lines × 2) corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/AbstractEsNamedQueryService.java:115 — corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/AbstractEsNamedQueryService.java:115-119 | corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/AbstractEsNamedQueryService.java:136-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.
  • Duplicated block (5 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:652 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:652-656 | corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:969-973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:170 — corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:170-174 | corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java:157-161 — before extracting anything, compare `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java` and `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:80 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:80-84 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleFloatRange.java:96-100 — before extracting anything, compare `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java` and `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleFloatRange.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×10
  • Duplicated block (8 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Maps.java:1491 — corant-shared/src/main/java/org/corant/shared/util/Maps.java:1491-1498 | corant-shared/src/main/java/org/corant/shared/util/Maps.java:1501-1508 — 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 `corant-shared/src/main/java/org/corant/shared/util/Maps.java:1491` 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) corant-shared/src/main/java/org/corant/shared/util/StopWatch.java:158 — corant-shared/src/main/java/org/corant/shared/util/StopWatch.java:158-165 | corant-shared/src/main/java/org/corant/shared/util/StopWatch.java:174-181 — 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 `corant-shared/src/main/java/org/corant/shared/util/StopWatch.java:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `consumer` to `BiConsumer<TaskInfo, StopWatch>` in one and `Consumer<TaskInfo>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Strings.java:786 — corant-shared/src/main/java/org/corant/shared/util/Strings.java:786-793 | corant-shared/src/main/java/org/corant/shared/util/Strings.java:1351-1358 — 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) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractNamedQueryService.java:147 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractNamedQueryService.java:147-154 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/AbstractSqlNamedQueryService.java:76-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.
  • Duplicated block (8 lines × 2) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:317 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:317-324 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:338-345 — 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) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/AbstractCasNamedQueryService.java:67 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/AbstractCasNamedQueryService.java:67-74 | corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/AbstractCasNamedQueryService.java:104-111 — 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) corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/DefaultMailSender.java:89 — corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/DefaultMailSender.java:89-96 | corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/MailSenderTemplate.java:48-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-mail/src/main/java/org/corant/modules/mail/DefaultMailSender.java:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) corant-modules/corant-modules-jcache/corant-modules-jcache-caffeine/src/main/java/org/corant/modules/jcache/caffeine/CaffeineJCacheExtension.java:69 — corant-modules/corant-modules-jcache/corant-modules-jcache-caffeine/src/main/java/org/corant/modules/jcache/caffeine/CaffeineJCacheExtension.java:69-76 | corant-modules/corant-modules-jcache/corant-modules-jcache-redisson/src/main/java/org/corant/modules/jcache/redisson/RedissonJCacheExtension.java:34-41 — 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) corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-shared/src/main/java/org/corant/modules/jaxrs/shared/JaxrsExtension.java:71 — corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-shared/src/main/java/org/corant/modules/jaxrs/shared/JaxrsExtension.java:71-78 | corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-shared/src/main/java/org/corant/modules/jaxrs/shared/JaxrsExtension.java:88-95 — 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 `corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-shared/src/main/java/org/corant/modules/jaxrs/shared/JaxrsExtension.java:71` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/JTARLJPAUnitOfWork.java:84 — corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/JTARLJPAUnitOfWork.java:84-91 | corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/JTAXAJPAUnitOfWork.java:49-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/JTARLJPAUnitOfWork.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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×8
  • Duplicated block (15 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Chars.java:170 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:170-184 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1882-1896 — 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 `corant-shared/src/main/java/org/corant/shared/util/Chars.java:170` 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 (15 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Chars.java:1868 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:1868-1882 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1918-1932 — 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 `corant-shared/src/main/java/org/corant/shared/util/Chars.java:1868` 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 (15 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:449 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:449-463 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java:156-170 — 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 `corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java:139 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java:139-153 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java:268-282 — 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 `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java:139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java:186 — corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java:186-200 | corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java:219-233 — 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 `corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java:186` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:279 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:279-293 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:332-346 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:332` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:329` calls `checkCancelled` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:278` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:101 — corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:101-115 | corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java:93-107 — before extracting anything, compare `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java` and `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:116` calls `isZhTerm` and `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java:108` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerier.java:46 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerier.java:46-60 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/DefaultJpqlNamedQuerier.java:46-60 — before extracting anything, compare `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerier.java` and `corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/DefaultJpqlNamedQuerier.java` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerier.java:46` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×8
  • Duplicated block (14 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Chars.java:639 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:639-652 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1887-1900 — 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 (14 lines × 2) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:107 — corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:107-120 | corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:484-497 — 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 `corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.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 (14 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Texts.java:403 — corant-shared/src/main/java/org/corant/shared/util/Texts.java:403-416 | corant-shared/src/main/java/org/corant/shared/util/Texts.java:426-439 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:67 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:67-80 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlTemplateMethodModelEx.java:67-80 — before extracting anything, compare `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java` and `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlTemplateMethodModelEx.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:211 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:211-224 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:257-270 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:301 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:301-314 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:354-367 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) corant-context/src/main/java/org/corant/context/proxy/ProxyUtils.java:103 — corant-context/src/main/java/org/corant/context/proxy/ProxyUtils.java:103-116 | corant-context/src/main/java/org/corant/context/proxy/ProxyUtils.java:147-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 `corant-context/src/main/java/org/corant/context/proxy/ProxyUtils.java:103` 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) corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-orm/src/main/java/org/corant/modules/jpa/hibernate/orm/HibernateMySQL8Dialect.java:29 — corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-orm/src/main/java/org/corant/modules/jpa/hibernate/orm/HibernateMySQL8Dialect.java:29-42 | corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-orm/src/main/java/org/corant/modules/jpa/hibernate/orm/HibernateMySQLDialect.java:29-42 — before extracting anything, compare `corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-orm/src/main/java/org/corant/modules/jpa/hibernate/orm/HibernateMySQL8Dialect.java` and `corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-orm/src/main/java/org/corant/modules/jpa/hibernate/orm/HibernateMySQLDialect.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×8
  • Duplicated block (11 lines × 2) corant-config/src/main/java/org/corant/config/CorantConfigExpander.java:99 — corant-config/src/main/java/org/corant/config/CorantConfigExpander.java:99-109 | corant-shared/src/main/java/org/corant/shared/ubiquity/StringTemplate.java:161-171 — 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 `corant-config/src/main/java/org/corant/config/CorantConfigExpander.java:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 first that the copies are not typed on the same thing: the declarations holding them bind `provider` to `CorantConfigRawValueProvider` in one and `Function<String, Object>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Fields.java:152 — corant-shared/src/main/java/org/corant/shared/util/Fields.java:152-162 | corant-shared/src/main/java/org/corant/shared/util/Fields.java:170-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Fields.java:152` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) REDACTED:132 — REDACTED:132-142 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:540-550 — 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 `REDACTED:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java:58 — corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java:58-68 | corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainJDBCStore.java:59-69 — before extracting anything, compare `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java` and `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainJDBCStore.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java:58` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:658 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:658-668 | corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:979-989 — 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 `corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:658` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:109 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:109-119 | corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:153-163 — 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 `corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) corant-context/src/main/java/org/corant/context/Beans.java:299 — corant-context/src/main/java/org/corant/context/Beans.java:299-309 | corant-context/src/main/java/org/corant/context/Beans.java:595-605 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) corant-config/src/main/java/org/corant/config/Configs.java:245 — corant-config/src/main/java/org/corant/config/Configs.java:245-255 | corant-config/src/main/java/org/corant/config/Configs.java:294-304 — 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 `corant-config/src/main/java/org/corant/config/Configs.java:245` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D3 · God Classes · ClassTooLong · ×7
  • ClassTooLong: Chars corant-shared/src/main/java/org/corant/shared/util/Chars.java:26 — ClassTooLong — 2033 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 1633 over it, 5.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Strings corant-shared/src/main/java/org/corant/shared/util/Strings.java:47 — ClassTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 247 over it, 1.62× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Mutable corant-shared/src/main/java/org/corant/shared/ubiquity/Mutable.java:38 — ClassTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 174 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JDBCTemplate corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:59 — ClassTooLong — 558 significant lines (blank, comment-only and punctuation-only lines excluded), 82 methods. The bar is 400 significant lines; this is 158 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Texts corant-shared/src/main/java/org/corant/shared/util/Texts.java:74 — ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 99 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Maps corant-shared/src/main/java/org/corant/shared/util/Maps.java:76 — ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 99 methods. The bar is 400 significant lines; this is 89 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JPAQueries corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:63 — ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 19 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · FileTooLong · ×6
  • FileTooLong: util/Chars.java corant-shared/src/main/java/org/corant/shared/util/Chars.java — FileTooLong — 2037 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Chars (26-2261). The bar is 500 significant lines; this is 1537 over it, 4.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: util/Strings.java corant-shared/src/main/java/org/corant/shared/util/Strings.java — FileTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Strings (47-1777). The bar is 500 significant lines; this is 172 over it, 1.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: shared/JDBCTemplate.java corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java — FileTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: JDBCTemplate (59-960). The bar is 500 significant lines; this is 95 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ubiquity/Mutable.java corant-shared/src/main/java/org/corant/shared/ubiquity/Mutable.java — FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Mutable (38-1040). The bar is 500 significant lines; this is 90 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: util/Texts.java corant-shared/src/main/java/org/corant/shared/util/Texts.java — FileTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Texts (74-1129). The bar is 500 significant lines; this is 51 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: util/Maps.java corant-shared/src/main/java/org/corant/shared/util/Maps.java — FileTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: Maps (76-1626). The bar is 500 significant lines; this is 43 over it, 1.09× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×6
  • Duplicated block (13 lines × 2) corant-shared/src/main/java/org/corant/shared/resource/ThresholdingOutputStream.java:489 — corant-shared/src/main/java/org/corant/shared/resource/ThresholdingOutputStream.java:489-501 | corant-shared/src/main/java/org/corant/shared/resource/ThresholdingOutputStream.java:623-635 — 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 `corant-shared/src/main/java/org/corant/shared/resource/ThresholdingOutputStream.java:489` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/HttpRanges.java:165 — corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/HttpRanges.java:165-177 | corant-shared/src/main/java/org/corant/shared/ubiquity/Tuple.java:561-573 — 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 `corant-modules/corant-modules-servlet/src/main/java/org/corant/modules/servlet/HttpRanges.java:165` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:67 — corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:67-79 | corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java:67-79 — before extracting anything, compare `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java` and `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:87 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:87-99 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleFloatRange.java:103-115 — before extracting anything, compare `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java` and `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleFloatRange.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) corant-modules/corant-modules-aicv/corant-modules-aicv-yolo/src/main/java/org/corant/modules/aicv/yolo/Mats.java:55 — corant-modules/corant-modules-aicv/corant-modules-aicv-yolo/src/main/java/org/corant/modules/aicv/yolo/Mats.java:55-67 | corant-modules/corant-modules-aicv/corant-modules-aicv-yolo/src/main/java/org/corant/modules/aicv/yolo/Mats.java:72-84 — 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 `corant-modules/corant-modules-aicv/corant-modules-aicv-yolo/src/main/java/org/corant/modules/aicv/yolo/Mats.java:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `floats` to `FloatArrayList` in one and `List<Float>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:74 — corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:74-86 | corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java:56-68 — before extracting anything, compare `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java` and `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (5 members, 50+ identical tokens) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/DB2Dialect.java:53 — corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/DB2Dialect.java:53-64 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/H2Dialect.java:35-45 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/HSQLDialect.java:49-60 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/MySQLDialect.java:98-107 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/PostgreSQLDialect.java:51-61 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultAggregationHintHandler.java:113 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultAggregationHintHandler.java:113-129 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultBeanMapperHintHandler.java:108-128 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:148-177 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultMapReduceHintHandler.java:148-170 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultScriptMapperHintHandler.java:98-122 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:60 — corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:60-72 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:115-142 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:146-168 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:172-206 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:210-231 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:36 — corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:36-50 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/ChebychevDistance.java:39-53 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/CosineDistance.java:36-52 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/CustomizedDistance.java:31-47 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/SquaredEuclideanDistance.java:36-51 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/converter/JsonNumberNumberConverterFactory.java:39 — corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/converter/JsonNumberNumberConverterFactory.java:39-69 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ByteArrayPrimitiveConverterFactory.java:46-75 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ObjectEnumConverterFactory.java:83-97 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/PrimitiveByteArrayConverterFactory.java:37-63 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.java:71 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.java:71-80 | corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/cdi/EsNamedQueryServiceManager.java:69-78 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/cdi/JpqlNamedQueryServiceManager.java:67-75 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/cdi/MgNamedQueryServiceManager.java:71-80 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:363 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:363-381 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:384-418 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:420-442 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:444-504 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:276 — corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:276-297 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:299-321 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:323-356 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:400-430 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×4
  • Duplicated block (19 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:232 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:232-250 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/StreamableQueryRunner.java:125-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) REDACTED:266 — REDACTED:266-284 | REDACTED:399-417 — 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 `REDACTED:266` 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 (19 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:117 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:117-135 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:140-158 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:117` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:109 — corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:109-127 | corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java:109-127 — before extracting anything, compare `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java` and `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×4
  • Duplicated block (17 lines × 2) corant-modules/corant-modules-mongodb/src/main/java/org/corant/modules/mongodb/Mongos.java:148 — corant-modules/corant-modules-mongodb/src/main/java/org/corant/modules/mongodb/Mongos.java:148-164 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MongoDatabases.java:33-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:552 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:552-568 | corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueryBuilder.java:130-146 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17 lines × 2) corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:131 — corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java:131-147 | corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java:131-147 — before extracting anything, compare `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableListDeserializer.java` and `corant-modules/corant-modules-javafx/corant-modules-javafx-jackson/src/main/java/org/corant/modules/javafx/jackson/databind/FXObservableSetDeserializer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:90 — corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:90-106 | corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java:72-88 — before extracting anything, compare `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java` and `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java:40 — corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java:40-55 | corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainJDBCStore.java:40-55 — before extracting anything, compare `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java` and `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainJDBCStore.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/DomainDataSourceStore.java:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:533 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueries.java:533-548 | corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPAQueryBuilder.java:107-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:137 — corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:137-152 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:354-369 — 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 `corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:137` 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 (16 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:53 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:53-68 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleFloatRange.java:69-84 — before extracting anything, compare `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java` and `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleFloatRange.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/model/SimpleDateRange.java:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×4
  • Duplicated block (9 lines × 3) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:50 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:50-58 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgTemplateMethodModelEx.java:58-66 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlTemplateMethodModelEx.java:50-58 — before extracting anything, compare `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java` and `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlTemplateMethodModelEx.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerierResolver.java:62 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerierResolver.java:62-70 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/DefaultJpqlNamedQuerierResolver.java:54-62 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/DefaultSqlNamedQuerierResolver.java:70-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times.
  • Duplicated block (9 lines × 3) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:320 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:320-328 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractNamedQueryService.java:197-205 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlQueryTemplate.java:702-710 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. 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 × 3) corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-ogm/src/main/java/org/corant/modules/jpa/hibernate/ogm/type/LocalDateGridTypeDescriptor.java:31 — corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-ogm/src/main/java/org/corant/modules/jpa/hibernate/ogm/type/LocalDateGridTypeDescriptor.java:31-39 | corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-ogm/src/main/java/org/corant/modules/jpa/hibernate/ogm/type/LocalDateTimeGridTypeDescriptor.java:32-40 | corant-modules/corant-modules-jpa/corant-modules-jpa-hibernate-ogm/src/main/java/org/corant/modules/jpa/hibernate/ogm/type/ZonedDateTimeGridTypeDescriptor.java:32-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×4
  • Duplicated block (8–9 lines × 2) corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/LocaleUtils.java:51 — corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/LocaleUtils.java:51-59 | corant-shared/src/main/java/org/corant/shared/conversion/converter/StringLocaleConverter.java:72-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/LocaleUtils.java:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthenticationFilter.java:83 — corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthenticationFilter.java:83-91 | corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTHttpAuthenticationMechanism.java:81-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthenticationFilter.java:83` 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–9 lines × 2) corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:151 — corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:151-158 | corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:185-193 — 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 `corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:151` 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–9 lines × 2) corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:167 — corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:167-174 | corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:203-211 — 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 `corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:167` 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.
D3 · God Classes · MethodTooLong · ×3
  • MethodTooLong: Chars.foldToAscii corant-shared/src/main/java/org/corant/shared/util/Chars.java:86 — MethodTooLong — foldToAscii runs 1921 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1821 over it, 19.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DefaultMathFunctionResolver.calculate corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultMathFunctionResolver.java:51 — MethodTooLong — calculate runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlobPatterns.toRegexPattern corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:106 — MethodTooLong — toRegexPattern runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:157 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:157-168 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultScriptMapperHintHandler.java:105-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:157` 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) corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:224 — corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:224-235 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:254-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:224` 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) corant-modules/corant-modules-jms/corant-modules-jms-api/src/main/java/org/corant/modules/jms/metadata/MessageReplyMetaData.java:80 — corant-modules/corant-modules-jms/corant-modules-jms-api/src/main/java/org/corant/modules/jms/metadata/MessageReplyMetaData.java:80-91 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingMetaData.java:164-175 — 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 `corant-modules/corant-modules-jms/corant-modules-jms-api/src/main/java/org/corant/modules/jms/metadata/MessageReplyMetaData.java:80` 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:63 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:63-70 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/JpqlTemplateMethodModelEx.java:40-47 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlTemplateMethodModelEx.java:63-70 — before extracting anything, compare `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java` and `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/SqlTemplateMethodModelEx.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/CasTemplateMethodModelEx.java:63` 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 × 3) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/AbstractDataSourceExtension.java:72 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/AbstractDataSourceExtension.java:72-79 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/ElasticExtension.java:117-124 | corant-modules/corant-modules-jms/corant-modules-jms-artemis/src/main/java/org/corant/modules/jms/artemis/ArtemisJMSExtension.java:111-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/AbstractDataSourceExtension.java:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:45 — corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:45-54 | corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:62-70 | corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java:45-52 — before extracting anything, compare `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java` and `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedScheduledExecutorService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-context/src/main/java/org/corant/context/concurrent/executor/DefaultManagedExecutorService.java:45` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×3
  • Duplicated block (7 lines × 3) corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:145 — corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:145-151 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:362-368 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:468-474 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:145` 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 × 3) corant-context/src/main/java/org/corant/context/command/CommandExtension.java:139 — corant-context/src/main/java/org/corant/context/command/CommandExtension.java:139-145 | corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/AggregateReference.java:100-106 | corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/repository/AbstractTypedJPARepository.java:135-141 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `corant-context/src/main/java/org/corant/context/command/CommandExtension.java:139` 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 × 3) corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/WXPayRequest.java:127 — corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/WXPayRequest.java:127-133 | corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/WXPayRequest.java:135-141 | corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/WXPayRequest.java:143-149 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D1 · Cyclomatic Complexity · GlobPatterns.toRegexPattern (cyclomatic 40) · ×2
  • GlobPatterns.toRegexPattern (cyclomatic 40) corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:483 — GlobPatterns.toRegexPattern has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • GlobPatterns.toRegexPattern (cyclomatic 40) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:106 — GlobPatterns.toRegexPattern has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · No assertions · ×2
  • No assertions: testFunc corant-modules/corant-modules-json/src/test/java/org/corant/modules/json/expression/predicate/JsonExpressionTest.java:40 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testTraverseAllSuperClasses corant-shared/src/test/java/org/corant/shared/util/ClassesTest.java:70 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · GlobPatterns.toRegexPattern (cognitive 97) · ×2
  • GlobPatterns.toRegexPattern (cognitive 97) corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:483 — GlobPatterns.toRegexPattern has cognitive complexity 97 (threshold 15). Drivers by points: if/else 31 (85 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • GlobPatterns.toRegexPattern (cognitive 97) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:106 — GlobPatterns.toRegexPattern has cognitive complexity 97 (threshold 15). Drivers by points: if/else 31 (85 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×2
  • Duplicated block (22 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:324 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:324-345 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:947-968 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1177-1198 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:324` 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 (22 lines × 3) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:79 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:79-100 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:80-101 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:80-101 — before extracting anything, compare `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java` and `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:79` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×2
  • Duplicated block (21 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:243 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:243-263 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:645-665 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:787-807 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:243` 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 (21 lines × 3) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSHTMLEscapeContentHandler.java:48 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSHTMLEscapeContentHandler.java:48-68 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSJSEscapeContentHandler.java:82-102 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSURIEscapeContentHandler.java:96-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSHTMLEscapeContentHandler.java:48` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Chars.java:177 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:177-197 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:210-230 — 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 `corant-shared/src/main/java/org/corant/shared/util/Chars.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. 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 (21 lines × 2) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPQLHelper.java:54 — corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPQLHelper.java:54-74 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java:333-353 — 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 `corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/JPQLHelper.java:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×2
  • Duplicated block (16 lines × 5) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:151 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:151-166 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:152-167 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:159-174 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngineService.java:52-67 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngines.java:49-64 — before extracting anything, compare `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java` and `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 5) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:179 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:179-194 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:181-196 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:208-223 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngineService.java:77-92 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngines.java:72-87 — before extracting anything, compare `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java` and `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×2
  • Duplicated block (15–16 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:179 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:179-194 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:202-216 — 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 `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.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. 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 (15–16 lines × 2) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2005Dialect.java:225 — corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2005Dialect.java:225-239 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2005Dialect.java:243-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2005Dialect.java:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×2
  • Duplicated block (14 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:175 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:175-188 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:208-221 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:353-366 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:188 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:188-201 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:221-234 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:964-977 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:188` 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/marshaller/MapMessageMarshaller.java:63 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/marshaller/MapMessageMarshaller.java:63-74 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/marshaller/MapMessageMarshaller.java:80-90 — 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. 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–12 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:259 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:259-270 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:310-320 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 13) · ×2
  • Duplicated block (11 lines × 13) corant-shared/src/main/java/org/corant/shared/util/Chars.java:204 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:204-214 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:349-359 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:466-476 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:480-490 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:571-581 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:635-645 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:760-770 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:858-868 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1041-1051 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1142-1152 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1201-1211 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1298-1308 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1336-1346 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 × 13) corant-shared/src/main/java/org/corant/shared/util/Chars.java:345 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:345-355 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:972-982 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1659-1669 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1675-1685 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1691-1701 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1707-1717 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1723-1733 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1739-1749 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1755-1765 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1771-1781 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1787-1797 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1803-1813 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1819-1829 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/AbstractCasNamedQueryService.java:78 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/AbstractCasNamedQueryService.java:78-87 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/AbstractSqlNamedQueryService.java:115-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 `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/AbstractCasNamedQueryService.java:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10–11 lines × 2) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/JarPackager.java:86 — corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/JarPackager.java:86-95 | corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/JarPackager.java:100-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) REDACTED:143 — REDACTED:143-151 | REDACTED:196-203 | REDACTED:271-278 | REDACTED:404-411 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:143 — corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:143-150 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:225-232 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:255-262 | corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:360-367 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:304 — corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:304-310 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:405-410 — 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 `corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:405` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:410` calls `setValue`, `equalsIgnoreCase`, `isNotBlank` and `corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:310` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6–7 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/send/MessageSenderTemplate.java:157 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/send/MessageSenderTemplate.java:157-162 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/send/MessageSenderTemplate.java:241-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 `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/send/MessageSenderTemplate.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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:86 — corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:86-91 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:147-152 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:204-209 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `ann` to `EsBoolean` in one and `EsIp` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Lists.java:262 — corant-shared/src/main/java/org/corant/shared/util/Lists.java:262-267 | corant-shared/src/main/java/org/corant/shared/util/Maps.java:1139-1144 | corant-shared/src/main/java/org/corant/shared/util/Sets.java:97-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. 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 first that the copies are not typed on the same thing: the declarations holding them bind `objects` to `E...` in one and `Object...` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×2
  • Duplicated block (5 lines × 4) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:370 — corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:370-374 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:390-394 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:435-439 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/AbstractMgNamedQueryService.java:489-493 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/QueryStatistics.java:120 — corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/QueryStatistics.java:120-124 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/FetchQuery.java:175-179 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryHint.java:123-127 | corant-modules/corant-modules-security/corant-modules-security-api/src/main/java/org/corant/modules/security/Token.java:72-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. 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.
D1 · Cyclomatic Complexity · AbstractASTComparisonNode.compare (cyclomatic 50) · ×1
  • AbstractASTComparisonNode.compare (cyclomatic 50) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/ast/ASTComparisonNode.java:91 — AbstractASTComparisonNode.compare has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DefaultMathFunctionResolver.calculate (cyclomatic 45) · ×1
  • DefaultMathFunctionResolver.calculate (cyclomatic 45) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultMathFunctionResolver.java:51 — DefaultMathFunctionResolver.calculate has cyclomatic complexity 45 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · SimpleRequired.shouldVeto (cyclomatic 33) · ×1
  • SimpleRequired.shouldVeto (cyclomatic 33) corant-shared/src/main/java/org/corant/shared/service/SimpleRequired.java:153 — SimpleRequired.shouldVeto has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QueryParseHandler.handleScript (cyclomatic 28) · ×1
  • QueryParseHandler.handleScript (cyclomatic 28) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:449 — QueryParseHandler.handleScript has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Classes.isAssignable (cyclomatic 27) · ×1
  • Classes.isAssignable (cyclomatic 27) corant-shared/src/main/java/org/corant/shared/util/Classes.java:439 — Classes.isAssignable has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbstractInterceptor.getInterceptorAnnotation (cyclomatic 27) · ×1
  • AbstractInterceptor.getInterceptorAnnotation (cyclomatic 27) corant-context/src/main/java/org/corant/context/AbstractInterceptor.java:61 — AbstractInterceptor.getInterceptorAnnotation has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Bsons.toSimpleBsonValue (cyclomatic 26) · ×1
  • Bsons.toSimpleBsonValue (cyclomatic 26) corant-modules/corant-modules-json/src/main/java/org/corant/modules/bson/Bsons.java:248 — Bsons.toSimpleBsonValue has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Conversion.convertType (cyclomatic 25) · ×1
  • Conversion.convertType (cyclomatic 25) corant-shared/src/main/java/org/corant/shared/conversion/Conversion.java:543 — Conversion.convertType has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QueryMappingService.doInitialize (cyclomatic 25) · ×1
  • QueryMappingService.doInitialize (cyclomatic 25) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java:155 — QueryMappingService.doInitialize has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CorantConfigConversion.convert (cyclomatic 25) · ×1
  • CorantConfigConversion.convert (cyclomatic 25) corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:136 — CorantConfigConversion.convert has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QueryMapping.selfValidate (cyclomatic 24) · ×1
  • QueryMapping.selfValidate (cyclomatic 24) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryMapping.java:72 — QueryMapping.selfValidate has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PersistencePropertiesParser.doParse (cyclomatic 24) · ×1
  • PersistencePropertiesParser.doParse (cyclomatic 24) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistencePropertiesParser.java:68 — PersistencePropertiesParser.doParse has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MongoClientConfig.of (cyclomatic 23) · ×1
  • MongoClientConfig.of (cyclomatic 23) corant-modules/corant-modules-mongodb/src/main/java/org/corant/modules/mongodb/MongoClientConfig.java:156 — MongoClientConfig.of has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Conversion.convertTuple (cyclomatic 21) · ×1
  • Conversion.convertTuple (cyclomatic 21) corant-shared/src/main/java/org/corant/shared/conversion/Conversion.java:477 — Conversion.convertTuple has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentDispositions.parse (cyclomatic 21) · ×1
  • ContentDispositions.parse (cyclomatic 21) corant-shared/src/main/java/org/corant/shared/util/ContentDispositions.java:46 — ContentDispositions.parse has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdminEventSelector.test (cyclomatic 21) · ×1
  • AdminEventSelector.test (cyclomatic 21) corant-modules/corant-modules-keycloak/corant-modules-keycloak-event/src/main/java/org/corant/modules/keycloak/event/selector/AdminEventSelector.java:64 — AdminEventSelector.test has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Types.resolve (cyclomatic 20) · ×1
  • Types.resolve (cyclomatic 20) corant-shared/src/main/java/org/corant/shared/util/Types.java:396 — Types.resolve has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StringZonedDateTimeConverter.doConvert (cyclomatic 19) · ×1
  • StringZonedDateTimeConverter.doConvert (cyclomatic 19) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringZonedDateTimeConverter.java:69 — StringZonedDateTimeConverter.doConvert has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Classes.getComponentClass (cyclomatic 19) · ×1
  • Classes.getComponentClass (cyclomatic 19) corant-shared/src/main/java/org/corant/shared/util/Classes.java:257 — Classes.getComponentClass has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResultMapReduceHintHandler.resolveReduceField (cyclomatic 19) · ×1
  • ResultMapReduceHintHandler.resolveReduceField (cyclomatic 19) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultMapReduceHintHandler.java:244 — ResultMapReduceHintHandler.resolveReduceField has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Maps.iterateMapValue (cyclomatic 18) · ×1
  • Maps.iterateMapValue (cyclomatic 18) corant-shared/src/main/java/org/corant/shared/util/Maps.java:1519 — Maps.iterateMapValue has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlHelper.getPrepared (cyclomatic 18) · ×1
  • SqlHelper.getPrepared (cyclomatic 18) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java:128 — SqlHelper.getPrepared has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MgQueryTemplate.query (cyclomatic 18) · ×1
  • MgQueryTemplate.query (cyclomatic 18) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:473 — MgQueryTemplate.query has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PersistenceXmlParser.doParse (cyclomatic 18) · ×1
  • PersistenceXmlParser.doParse (cyclomatic 18) REDACTED:73 — PersistenceXmlParser.doParse has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StringDateConverter.doConvert (cyclomatic 17) · ×1
  • StringDateConverter.doConvert (cyclomatic 17) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringDateConverter.java:119 — StringDateConverter.doConvert has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultFetchQueryHandler.resolveFetchQueryCriteria (cyclomatic 17) · ×1
  • DefaultFetchQueryHandler.resolveFetchQueryCriteria (cyclomatic 17) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/DefaultFetchQueryHandler.java:193 — DefaultFetchQueryHandler.resolveFetchQueryCriteria has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QueryParseHandler.handleFetchQuery (cyclomatic 17) · ×1
  • QueryParseHandler.handleFetchQuery (cyclomatic 17) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:190 — QueryParseHandler.handleFetchQuery has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QueryParseHandler.startElement (cyclomatic 17) · ×1
  • QueryParseHandler.startElement (cyclomatic 17) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:142 — QueryParseHandler.startElement has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimpleMessageReceiver.initialize (cyclomatic 17) · ×1
  • SimpleMessageReceiver.initialize (cyclomatic 17) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:93 — SimpleMessageReceiver.initialize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DriverManagerDataSource.<init> (cyclomatic 17) · ×1
  • DriverManagerDataSource.<init> (cyclomatic 17) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/DriverManagerDataSource.java:65 — DriverManagerDataSource.<init> has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JDBCTemplate.processSqlAndParams (cyclomatic 17) · ×1
  • JDBCTemplate.processSqlAndParams (cyclomatic 17) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:421 — JDBCTemplate.processSqlAndParams has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StringInstantConverter.doConvert (cyclomatic 16) · ×1
  • StringInstantConverter.doConvert (cyclomatic 16) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringInstantConverter.java:69 — StringInstantConverter.doConvert has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StringLocalDateTimeConverter.doConvert (cyclomatic 16) · ×1
  • StringLocalDateTimeConverter.doConvert (cyclomatic 16) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringLocalDateTimeConverter.java:64 — StringLocalDateTimeConverter.doConvert has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Empties.isEmpty (cyclomatic 16) · ×1
  • Empties.isEmpty (cyclomatic 16) corant-shared/src/main/java/org/corant/shared/util/Empties.java:100 — Empties.isEmpty has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsonExpressionScriptProcessor.resolveInjectProjector (cyclomatic 16) · ×1
  • JsonExpressionScriptProcessor.resolveInjectProjector (cyclomatic 16) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/jsonexpression/JsonExpressionScriptProcessor.java:211 — JsonExpressionScriptProcessor.resolveInjectProjector has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Jsons.fromJsonNode (cyclomatic 16) · ×1
  • Jsons.fromJsonNode (cyclomatic 16) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/Jsons.java:428 — Jsons.fromJsonNode has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D17 · Explicit Debt · FixmeComment repeated across 19 files · ×1
  • FixmeComment repeated across 19 files corant-config/src/main/java/org/corant/config/declarative/DeclarativePattern.java:99 — The identical FixmeComment appears in 19 files (22 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 22 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// FIXME". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · XxxComment · ×1
  • XxxComment corant-context/src/main/java/org/corant/context/qualifier/Qualifiers.java:42 — // XXX Is it possible to use configuration? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · DefaultMathFunctionResolver.calculate (cognitive 109) · ×1
  • DefaultMathFunctionResolver.calculate (cognitive 109) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultMathFunctionResolver.java:51 — DefaultMathFunctionResolver.calculate has cognitive complexity 109 (threshold 15). Drivers by points: loops 21 (86 pts), match/switch 4 (13 pts), if/else 8 (9 pts), boolean chains 1 (nesting depth added 75). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PersistenceXmlParser.doParse (cognitive 88) · ×1
  • PersistenceXmlParser.doParse (cognitive 88) REDACTED:73 — PersistenceXmlParser.doParse has cognitive complexity 88 (threshold 15). Drivers by points: if/else 16 (74 pts), loops 2 (14 pts) (nesting depth added 70). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Types.resolve (cognitive 77) · ×1
  • Types.resolve (cognitive 77) corant-shared/src/main/java/org/corant/shared/util/Types.java:396 — Types.resolve has cognitive complexity 77 (threshold 15). Drivers by points: if/else 15 (54 pts), ternaries 3 (15 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DefaultFetchQueryHandler.resolveFetchQueryCriteria (cognitive 70) · ×1
  • DefaultFetchQueryHandler.resolveFetchQueryCriteria (cognitive 70) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/DefaultFetchQueryHandler.java:193 — DefaultFetchQueryHandler.resolveFetchQueryCriteria has cognitive complexity 70 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 3 (17 pts), error handling 1 (6 pts), ternaries 1 (5 pts) (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ContentDispositions.parse (cognitive 68) · ×1
  • ContentDispositions.parse (cognitive 68) corant-shared/src/main/java/org/corant/shared/util/ContentDispositions.java:46 — ContentDispositions.parse has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (33 pts), error handling 3 (27 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · QueryParseHandler.handleScript (cognitive 68) · ×1
  • QueryParseHandler.handleScript (cognitive 68) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:449 — QueryParseHandler.handleScript has cognitive complexity 68 (threshold 15). Drivers by points: if/else 20 (52 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ResultMapReduceHintHandler.resolveReduceField (cognitive 59) · ×1
  • ResultMapReduceHintHandler.resolveReduceField (cognitive 59) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultMapReduceHintHandler.java:244 — ResultMapReduceHintHandler.resolveReduceField has cognitive complexity 59 (threshold 15). Drivers by points: if/else 10 (37 pts), loops 3 (13 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · QueryParseHandler.handleFetchQuery (cognitive 56) · ×1
  • QueryParseHandler.handleFetchQuery (cognitive 56) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:190 — QueryParseHandler.handleFetchQuery has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 3 (35 pts), if/else 13 (18 pts), loops 1 (3 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbstractInterceptor.getInterceptorAnnotation (cognitive 54) · ×1
  • AbstractInterceptor.getInterceptorAnnotation (cognitive 54) corant-context/src/main/java/org/corant/context/AbstractInterceptor.java:61 — AbstractInterceptor.getInterceptorAnnotation has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 4 (11 pts), boolean chains 7 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractASTComparisonNode.compare (cognitive 53) · ×1
  • AbstractASTComparisonNode.compare (cognitive 53) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/ast/ASTComparisonNode.java:91 — AbstractASTComparisonNode.compare has cognitive complexity 53 (threshold 15). Drivers by points: if/else 26 (29 pts), boolean chains 24 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Empties.isEmpty (cognitive 50) · ×1
  • Empties.isEmpty (cognitive 50) corant-shared/src/main/java/org/corant/shared/util/Empties.java:100 — Empties.isEmpty has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (35 pts), error handling 1 (13 pts), boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractScriptProcessor.resolveAll (cognitive 49) · ×1
  • AbstractScriptProcessor.resolveAll (cognitive 49) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/ScriptProcessor.java:113 — AbstractScriptProcessor.resolveAll has cognitive complexity 49 (threshold 15). Drivers by points: if/else 5 (20 pts), error handling 3 (17 pts), loops 3 (9 pts), boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Classes.getComponentClass (cognitive 47) · ×1
  • Classes.getComponentClass (cognitive 47) corant-shared/src/main/java/org/corant/shared/util/Classes.java:257 — Classes.getComponentClass has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 4 (15 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonExpressionScriptProcessor.createInjectFuns (cognitive 46) · ×1
  • JsonExpressionScriptProcessor.createInjectFuns (cognitive 46) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/jsonexpression/JsonExpressionScriptProcessor.java:145 — JsonExpressionScriptProcessor.createInjectFuns has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 3 (7 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryParseHandler.handleQuery (cognitive 46) · ×1
  • QueryParseHandler.handleQuery (cognitive 46) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:323 — QueryParseHandler.handleQuery has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 3 (28 pts), if/else 11 (15 pts), loops 1 (3 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Conversion.convertTuple (cognitive 44) · ×1
  • Conversion.convertTuple (cognitive 44) corant-shared/src/main/java/org/corant/shared/conversion/Conversion.java:477 — Conversion.convertTuple has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 4 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · QueryMappingService.doInitialize (cognitive 44) · ×1
  • QueryMappingService.doInitialize (cognitive 44) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/QueryMappingService.java:155 — QueryMappingService.doInitialize has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 4 (11 pts), boolean chains 5 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryParseHandler.startElement (cognitive 44) · ×1
  • QueryParseHandler.startElement (cognitive 44) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:142 — QueryParseHandler.startElement has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (43 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SqlHelper.getPrepared (cognitive 43) · ×1
  • SqlHelper.getPrepared (cognitive 43) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java:128 — SqlHelper.getPrepared has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (14 pts), boolean chains 6 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Maps.iterateMapValue (cognitive 42) · ×1
  • Maps.iterateMapValue (cognitive 42) corant-shared/src/main/java/org/corant/shared/util/Maps.java:1519 — Maps.iterateMapValue has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (12 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · JDBCTemplate.processSqlAndParams (cognitive 42) · ×1
  • JDBCTemplate.processSqlAndParams (cognitive 42) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:421 — JDBCTemplate.processSqlAndParams has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (14 pts), boolean chains 5 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CorantConfigConversion.convert (cognitive 42) · ×1
  • CorantConfigConversion.convert (cognitive 42) corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:136 — CorantConfigConversion.convert has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (21 pts), ternaries 1 (10 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Classes.isAssignable (cognitive 41) · ×1
  • Classes.isAssignable (cognitive 41) corant-shared/src/main/java/org/corant/shared/util/Classes.java:439 — Classes.isAssignable has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 8 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Conversion.convertType (cognitive 40) · ×1
  • Conversion.convertType (cognitive 40) corant-shared/src/main/java/org/corant/shared/conversion/Conversion.java:543 — Conversion.convertType has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 7, error handling 2 (4 pts), loops 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WildcardMatcher.test (cognitive 40) · ×1
  • WildcardMatcher.test (cognitive 40) corant-shared/src/main/java/org/corant/shared/util/Strings.java:1681 — WildcardMatcher.test has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StringZonedDateTimeConverter.doConvert (cognitive 39) · ×1
  • StringZonedDateTimeConverter.doConvert (cognitive 39) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringZonedDateTimeConverter.java:69 — StringZonedDateTimeConverter.doConvert has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ObjectEnumConverterFactory.convert (cognitive 38) · ×1
  • ObjectEnumConverterFactory.convert (cognitive 38) corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ObjectEnumConverterFactory.java:44 — ObjectEnumConverterFactory.convert has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 1 (5 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MapTemporalConverterFactory.convertLocalDateTime (cognitive 37) · ×1
  • MapTemporalConverterFactory.convertLocalDateTime (cognitive 37) corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.java:71 — MapTemporalConverterFactory.convertLocalDateTime has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 4 (19 pts), if/else 8 (14 pts), boolean chains 4 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Maps.implantMapValue (cognitive 37) · ×1
  • Maps.implantMapValue (cognitive 37) corant-shared/src/main/java/org/corant/shared/util/Maps.java:1479 — Maps.implantMapValue has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (11 pts), boolean chains 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SqlStatements.canBeOptimized (cognitive 37) · ×1
  • SqlStatements.canBeOptimized (cognitive 37) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:228 — SqlStatements.canBeOptimized has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Conversion.convertMap (cognitive 36) · ×1
  • Conversion.convertMap (cognitive 36) corant-shared/src/main/java/org/corant/shared/conversion/Conversion.java:433 — Conversion.convertMap has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (9 pts), ternaries 2 (9 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimpleRequired.shouldVeto (cognitive 36) · ×1
  • SimpleRequired.shouldVeto (cognitive 36) corant-shared/src/main/java/org/corant/shared/service/SimpleRequired.java:153 — SimpleRequired.shouldVeto has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, ternaries 2 (6 pts), match/switch 2 (5 pts), loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SQLServer2005Dialect.locateQueryInCTEStatement (cognitive 36) · ×1
  • SQLServer2005Dialect.locateQueryInCTEStatement (cognitive 36) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2005Dialect.java:215 — SQLServer2005Dialect.locateQueryInCTEStatement has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 6, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SimpleMessageReceiver.initialize (cognitive 36) · ×1
  • SimpleMessageReceiver.initialize (cognitive 36) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:93 — SimpleMessageReceiver.initialize has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (22 pts), error handling 5 (12 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExperimentalConverters.loop (cognitive 35) · ×1
  • ExperimentalConverters.loop (cognitive 35) corant-shared/src/main/java/org/corant/shared/conversion/ExperimentalConverters.java:103 — ExperimentalConverters.loop has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonExpressionScriptProcessor.resolveInjectProjector (cognitive 35) · ×1
  • JsonExpressionScriptProcessor.resolveInjectProjector (cognitive 35) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/jsonexpression/JsonExpressionScriptProcessor.java:211 — JsonExpressionScriptProcessor.resolveInjectProjector has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (6 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DefaultSizeOfFunctionResolver.resolve (cognitive 34) · ×1
  • DefaultSizeOfFunctionResolver.resolve (cognitive 34) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultSizeOfFunctionResolver.java:39 — DefaultSizeOfFunctionResolver.resolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (23 pts), error handling 1 (9 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriverManagerDataSource.<init> (cognitive 34) · ×1
  • DriverManagerDataSource.<init> (cognitive 34) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/DriverManagerDataSource.java:65 — DriverManagerDataSource.<init> has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (20 pts), error handling 4 (12 pts), loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Maps.convertCollection (cognitive 33) · ×1
  • Maps.convertCollection (cognitive 33) corant-shared/src/main/java/org/corant/shared/util/Maps.java:1408 — Maps.convertCollection has cognitive complexity 33 (threshold 15). Drivers by points: loops 5 (25 pts), if/else 7, boolean chains 1 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ResultFieldConvertHintHandler.convertMapValue (cognitive 33) · ×1
  • ResultFieldConvertHintHandler.convertMapValue (cognitive 33) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:106 — ResultFieldConvertHintHandler.convertMapValue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryParseHandler.handleFetchQueryParameter (cognitive 33) · ×1
  • QueryParseHandler.handleFetchQueryParameter (cognitive 33) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:232 — QueryParseHandler.handleFetchQueryParameter has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WXPay.microPayWithPos (cognitive 33) · ×1
  • WXPay.microPayWithPos (cognitive 33) corant-modules/corant-modules-cloud/corant-modules-cloud-tencent/src/main/java/com/github/wxpay/sdk/WXPay.java:296 — WXPay.microPayWithPos has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DirectoryWatcher.run (cognitive 32) · ×1
  • DirectoryWatcher.run (cognitive 32) corant-shared/src/main/java/org/corant/shared/resource/watch/DirectoryWatcher.java:107 — DirectoryWatcher.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (20 pts), error handling 3 (8 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Types.equals (cognitive 32) · ×1
  • Types.equals (cognitive 32) corant-shared/src/main/java/org/corant/shared/util/Types.java:97 — Types.equals has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 3 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbstractTemplateMethodModelEx.isSimpleTypeObject (cognitive 32) · ×1
  • AbstractTemplateMethodModelEx.isSimpleTypeObject (cognitive 32) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/AbstractTemplateMethodModelEx.java:193 — AbstractTemplateMethodModelEx.isSimpleTypeObject has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (6 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MixedZhEnNGramTokenFilter.incrementToken (cognitive 32) · ×1
  • MixedZhEnNGramTokenFilter.incrementToken (cognitive 32) corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:100 — MixedZhEnNGramTokenFilter.incrementToken has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 2 (10 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StringInstantConverter.doConvert (cognitive 31) · ×1
  • StringInstantConverter.doConvert (cognitive 31) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringInstantConverter.java:69 — StringInstantConverter.doConvert has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassPathResourceLoader.getClassPathEntries (cognitive 31) · ×1
  • ClassPathResourceLoader.getClassPathEntries (cognitive 31) corant-shared/src/main/java/org/corant/shared/resource/ClassPathResourceLoader.java:137 — ClassPathResourceLoader.getClassPathEntries has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (8 pts), error handling 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractTemplateMethodModelEx.extractParamValue (cognitive 31) · ×1
  • AbstractTemplateMethodModelEx.extractParamValue (cognitive 31) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/AbstractTemplateMethodModelEx.java:94 — AbstractTemplateMethodModelEx.extractParamValue has cognitive complexity 31 (threshold 15). Drivers by points: loops 2 (15 pts), if/else 8, ternaries 1 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultCasQueryExecutor.paging (cognitive 31) · ×1
  • DefaultCasQueryExecutor.paging (cognitive 31) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasQueryExecutor.java:70 — DefaultCasQueryExecutor.paging has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (10 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SimpleParser.parseJsonArrayNode (cognitive 31) · ×1
  • SimpleParser.parseJsonArrayNode (cognitive 31) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java:170 — SimpleParser.parseJsonArrayNode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultMessageReplier.reply (cognitive 31) · ×1
  • DefaultMessageReplier.reply (cognitive 31) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReplier.java:46 — DefaultMessageReplier.reply has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 3 (11 pts), loops 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringLocalDateTimeConverter.doConvert (cognitive 30) · ×1
  • StringLocalDateTimeConverter.doConvert (cognitive 30) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringLocalDateTimeConverter.java:64 — StringLocalDateTimeConverter.doConvert has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SynchronousRetryer.doExecute (cognitive 30) · ×1
  • SynchronousRetryer.doExecute (cognitive 30) corant-shared/src/main/java/org/corant/shared/retry/SynchronousRetryer.java:70 — SynchronousRetryer.doExecute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (16 pts), error handling 4 (13 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractTypedJPARepository.onPostConstruct (cognitive 30) · ×1
  • AbstractTypedJPARepository.onPostConstruct (cognitive 30) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/repository/AbstractTypedJPARepository.java:126 — AbstractTypedJPARepository.onPostConstruct has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 2 (8 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AsynchronousRetryTask.run (cognitive 29) · ×1
  • AsynchronousRetryTask.run (cognitive 29) corant-shared/src/main/java/org/corant/shared/retry/AsynchronousRetryer.java:106 — AsynchronousRetryTask.run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), error handling 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Strings.split (cognitive 29) · ×1
  • Strings.split (cognitive 29) corant-shared/src/main/java/org/corant/shared/util/Strings.java:1350 — Strings.split has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MgTemplateMethodModelEx.exec (cognitive 28) · ×1
  • MgTemplateMethodModelEx.exec (cognitive 28) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgTemplateMethodModelEx.java:70 — MgTemplateMethodModelEx.exec has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (26 pts), error handling 1 (2 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Bsons.toSimpleBsonValue (cognitive 27) · ×1
  • Bsons.toSimpleBsonValue (cognitive 27) corant-modules/corant-modules-json/src/main/java/org/corant/modules/bson/Bsons.java:248 — Bsons.toSimpleBsonValue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, error handling 2 (3 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PersistencePropertiesParser.doParse (cognitive 27) · ×1
  • PersistencePropertiesParser.doParse (cognitive 27) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/metadata/PersistencePropertiesParser.java:68 — PersistencePropertiesParser.doParse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 3, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExtendedBiBinding.changed (cognitive 27) · ×1
  • ExtendedBiBinding.changed (cognitive 27) corant-modules/corant-modules-javafx/corant-modules-javafx-cdi/src/main/java/org/corant/modules/javafx/cdi/ExtendedBiBinding.java:62 — ExtendedBiBinding.changed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 2 (7 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqlStatements.reviseCountSqlFromItem (cognitive 27) · ×1
  • SqlStatements.reviseCountSqlFromItem (cognitive 27) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:323 — SqlStatements.reviseCountSqlFromItem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CorantDeclarativeScheduler.onPostCorantReadyEvent (cognitive 26) · ×1
  • CorantDeclarativeScheduler.onPostCorantReadyEvent (cognitive 26) corant-modules/corant-modules-quartz/corant-modules-quartz-embeddable/src/main/java/org/corant/modules/quartz/embeddable/CorantDeclarativeScheduler.java:127 — CorantDeclarativeScheduler.onPostCorantReadyEvent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultipartFormDataExtractor.getFieldsMatrix (cognitive 26) · ×1
  • MultipartFormDataExtractor.getFieldsMatrix (cognitive 26) corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-resteasy/src/main/java/org/corant/modules/jaxrs/resteasy/ResteasyResource.java:306 — MultipartFormDataExtractor.getFieldsMatrix has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (10 pts), error handling 1 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileUtils.updateUserDefinedAttributes (cognitive 25) · ×1
  • FileUtils.updateUserDefinedAttributes (cognitive 25) corant-shared/src/main/java/org/corant/shared/util/FileUtils.java:508 — FileUtils.updateUserDefinedAttributes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (7 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Primitives.wrapArray (cognitive 25) · ×1
  • Primitives.wrapArray (cognitive 25) corant-shared/src/main/java/org/corant/shared/util/Primitives.java:330 — Primitives.wrapArray has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (11 pts) (nesting depth added 13). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Strings.segment (cognitive 25) · ×1
  • Strings.segment (cognitive 25) corant-shared/src/main/java/org/corant/shared/util/Strings.java:1170 — Strings.segment has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CSVBufferedReader.readCSVLine (cognitive 25) · ×1
  • CSVBufferedReader.readCSVLine (cognitive 25) corant-shared/src/main/java/org/corant/shared/util/Texts.java:954 — CSVBufferedReader.readCSVLine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EsTemplateMethodModelEx.exec (cognitive 25) · ×1
  • EsTemplateMethodModelEx.exec (cognitive 25) corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/EsTemplateMethodModelEx.java:43 — EsTemplateMethodModelEx.exec has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (23 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · QueryParseHandler.endElement (cognitive 25) · ×1
  • QueryParseHandler.endElement (cognitive 25) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:96 — QueryParseHandler.endElement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MongoClientConfig.of (cognitive 25) · ×1
  • MongoClientConfig.of (cognitive 25) corant-modules/corant-modules-mongodb/src/main/java/org/corant/modules/mongodb/MongoClientConfig.java:156 — MongoClientConfig.of has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (18 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PojoInjector.<init> (cognitive 25) · ×1
  • PojoInjector.<init> (cognitive 25) corant-modules/corant-modules-jpa/corant-modules-jpa-shared/src/main/java/org/corant/modules/jpa/shared/TupleObjectConverterFactory.java:155 — PojoInjector.<init> has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Annotations.findAnnotation (cognitive 24) · ×1
  • Annotations.findAnnotation (cognitive 24) corant-shared/src/main/java/org/corant/shared/util/Annotations.java:49 — Annotations.findAnnotation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SqlHelper.generateIgnoreRanges (cognitive 24) · ×1
  • SqlHelper.generateIgnoreRanges (cognitive 24) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java:265 — SqlHelper.generateIgnoreRanges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ResultFieldConvertHintHandler.handle (cognitive 24) · ×1
  • ResultFieldConvertHintHandler.handle (cognitive 24) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:148 — ResultFieldConvertHintHandler.handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResultMapReduceHintHandler.resolveHint (cognitive 24) · ×1
  • ResultMapReduceHintHandler.resolveHint (cognitive 24) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultMapReduceHintHandler.java:185 — ResultMapReduceHintHandler.resolveHint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (6 pts), loops 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryMapping.selfValidate (cognitive 24) · ×1
  • QueryMapping.selfValidate (cognitive 24) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryMapping.java:72 — QueryMapping.selfValidate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HungLogger.run (cognitive 24) · ×1
  • HungLogger.run (cognitive 24) corant-context/src/main/java/org/corant/context/concurrent/executor/ExecutorServiceManager.java:170 — HungLogger.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConcurrentExtension.validate (cognitive 24) · ×1
  • ConcurrentExtension.validate (cognitive 24) corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:341 — ConcurrentExtension.validate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StringDateConverter.doConvert (cognitive 23) · ×1
  • StringDateConverter.doConvert (cognitive 23) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringDateConverter.java:119 — StringDateConverter.doConvert has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractDomainJDBCDriver.prepare (cognitive 23) · ×1
  • AbstractDomainJDBCDriver.prepare (cognitive 23) REDACTED:512 — AbstractDomainJDBCDriver.prepare has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (14 pts), if/else 4 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArtemisJMSExtension.buildConnectionFactory (cognitive 23) · ×1
  • ArtemisJMSExtension.buildConnectionFactory (cognitive 23) corant-modules/corant-modules-jms/corant-modules-jms-artemis/src/main/java/org/corant/modules/jms/artemis/ArtemisJMSExtension.java:120 — ArtemisJMSExtension.buildConnectionFactory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 1 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SqlStatements.reviseCountSqlSelectBody (cognitive 23) · ×1
  • SqlStatements.reviseCountSqlSelectBody (cognitive 23) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/SqlStatements.java:369 — SqlStatements.reviseCountSqlSelectBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DirectRunner.perform (cognitive 23) · ×1
  • DirectRunner.perform (cognitive 23) corant-kernel/src/main/java/org/corant/kernel/boot/DirectRunner.java:175 — DirectRunner.perform has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CorantConfigSources.of (cognitive 23) · ×1
  • CorantConfigSources.of (cognitive 23) corant-config/src/main/java/org/corant/config/CorantConfigSources.java:99 — CorantConfigSources.of has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringLocalDateConverter.doConvert (cognitive 22) · ×1
  • StringLocalDateConverter.doConvert (cognitive 22) corant-shared/src/main/java/org/corant/shared/conversion/converter/StringLocalDateConverter.java:62 — StringLocalDateConverter.doConvert has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (22 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigValueTemplateMethodModelEx.exec (cognitive 22) · ×1
  • ConfigValueTemplateMethodModelEx.exec (cognitive 22) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/freemarker/DynamicTemplateMethodModelEx.java:71 — ConfigValueTemplateMethodModelEx.exec has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (22 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Bsons.extended (cognitive 22) · ×1
  • Bsons.extended (cognitive 22) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/converter/Bsons.java:167 — Bsons.extended has cognitive complexity 22 (threshold 15). Drivers by points: loops 3 (15 pts), if/else 6 (7 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ASTNodeType.decideType (cognitive 22) · ×1
  • ASTNodeType.decideType (cognitive 22) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/ast/ASTNodeType.java:277 — ASTNodeType.decideType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NamingContext.lookup (cognitive 22) · ×1
  • NamingContext.lookup (cognitive 22) corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:460 — NamingContext.lookup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultMessageReceiver.initialize (cognitive 22) · ×1
  • DefaultMessageReceiver.initialize (cognitive 22) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:87 — DefaultMessageReceiver.initialize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResteasyResource.parseFormFields (cognitive 22) · ×1
  • ResteasyResource.parseFormFields (cognitive 22) corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-resteasy/src/main/java/org/corant/modules/jaxrs/resteasy/ResteasyResource.java:65 — ResteasyResource.parseFormFields has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractJPAUnitOfWork.register (cognitive 22) · ×1
  • AbstractJPAUnitOfWork.register (cognitive 22) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/AbstractJPAUnitOfWork.java:202 — AbstractJPAUnitOfWork.register has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (4 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ContentDispositions.tokenize (cognitive 21) · ×1
  • ContentDispositions.tokenize (cognitive 21) corant-shared/src/main/java/org/corant/shared/util/ContentDispositions.java:195 — ContentDispositions.tokenize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileUtils.extractJarFile (cognitive 21) · ×1
  • FileUtils.extractJarFile (cognitive 21) corant-shared/src/main/java/org/corant/shared/util/FileUtils.java:231 — FileUtils.extractJarFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lists.distinct (cognitive 21) · ×1
  • Lists.distinct (cognitive 21) corant-shared/src/main/java/org/corant/shared/util/Lists.java:166 — Lists.distinct has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Strings.split (cognitive 21) · ×1
  • Strings.split (cognitive 21) corant-shared/src/main/java/org/corant/shared/util/Strings.java:1270 — Strings.split has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResultAggregationHintHandler.resolveHint (cognitive 21) · ×1
  • ResultAggregationHintHandler.resolveHint (cognitive 21) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultAggregationHintHandler.java:158 — ResultAggregationHintHandler.resolveHint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractDomainJDBCDriver.write_state (cognitive 21) · ×1
  • AbstractDomainJDBCDriver.write_state (cognitive 21) REDACTED:427 — AbstractDomainJDBCDriver.write_state has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NarayanaRecoveryManagerService.initialize (cognitive 21) · ×1
  • NarayanaRecoveryManagerService.initialize (cognitive 21) corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/NarayanaRecoveryManagerService.java:52 — NarayanaRecoveryManagerService.initialize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XEnNGramTokenFilter.incrementToken (cognitive 21) · ×1
  • XEnNGramTokenFilter.incrementToken (cognitive 21) corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java:92 — XEnNGramTokenFilter.incrementToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResolverUtils.genFieldMapping (cognitive 21) · ×1
  • ResolverUtils.genFieldMapping (cognitive 21) corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/metadata/resolver/ResolverUtils.java:240 — ResolverUtils.genFieldMapping has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProxyInvocationHandler.invoke (cognitive 21) · ×1
  • ProxyInvocationHandler.invoke (cognitive 21) corant-context/src/main/java/org/corant/context/proxy/ProxyInvocationHandler.java:85 — ProxyInvocationHandler.invoke has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigSourceLoader.load (cognitive 21) · ×1
  • ConfigSourceLoader.load (cognitive 21) corant-config/src/main/java/org/corant/config/source/ConfigSourceLoader.java:76 — ConfigSourceLoader.load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapTemporalConverterFactory.convertLocalTime (cognitive 20) · ×1
  • MapTemporalConverterFactory.convertLocalTime (cognitive 20) corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.java:113 — MapTemporalConverterFactory.convertLocalTime has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Classes.traverseAllInterfaces (cognitive 20) · ×1
  • Classes.traverseAllInterfaces (cognitive 20) corant-shared/src/main/java/org/corant/shared/util/Classes.java:386 — Classes.traverseAllInterfaces has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (8 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Texts.readCSVFields (cognitive 20) · ×1
  • Texts.readCSVFields (cognitive 20) corant-shared/src/main/java/org/corant/shared/util/Texts.java:652 — Texts.readCSVFields has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (15 pts), if/else 2 (3 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Projector.apply (cognitive 20) · ×1
  • Projector.apply (cognitive 20) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/jsonexpression/JsonExpressionScriptProcessor.java:439 — Projector.apply has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (9 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · MpJWTAuthenticationFilter.filter (cognitive 20) · ×1
  • MpJWTAuthenticationFilter.filter (cognitive 20) corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/jaxrs/MpJWTAuthenticationFilter.java:79 — MpJWTAuthenticationFilter.filter has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 1 (3 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AbstractJWTSecurityContextManager.convert (cognitive 20) · ×1
  • AbstractJWTSecurityContextManager.convert (cognitive 20) corant-modules/corant-modules-microprofile/corant-modules-microprofile-jwt/src/main/java/org/corant/modules/microprofile/jwt/AbstractJWTSecurityContextManager.java:71 — AbstractJWTSecurityContextManager.convert has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 1 (6 pts), loops 1 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdminEventSelector.test (cognitive 20) · ×1
  • AdminEventSelector.test (cognitive 20) corant-modules/corant-modules-keycloak/corant-modules-keycloak-event/src/main/java/org/corant/modules/keycloak/event/selector/AdminEventSelector.java:64 — AdminEventSelector.test has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DefaultAggregateLifecycleManager.handle (cognitive 20) · ×1
  • DefaultAggregateLifecycleManager.handle (cognitive 20) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/DefaultAggregateLifecycleManager.java:65 — DefaultAggregateLifecycleManager.handle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Converters.lookup (cognitive 19) · ×1
  • Converters.lookup (cognitive 19) corant-shared/src/main/java/org/corant/shared/conversion/Converters.java:42 — Converters.lookup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lists.appendIfAbsent (cognitive 19) · ×1
  • Lists.appendIfAbsent (cognitive 19) corant-shared/src/main/java/org/corant/shared/util/Lists.java:98 — Lists.appendIfAbsent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathMatcher.decidePathMatcher (cognitive 19) · ×1
  • PathMatcher.decidePathMatcher (cognitive 19) corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:86 — PathMatcher.decidePathMatcher has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Strings.partition (cognitive 19) · ×1
  • Strings.partition (cognitive 19) corant-shared/src/main/java/org/corant/shared/util/Strings.java:785 — Strings.partition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractNamedQueryService.parallelFetch (cognitive 19) · ×1
  • AbstractNamedQueryService.parallelFetch (cognitive 19) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractNamedQueryService.java:244 — AbstractNamedQueryService.parallelFetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Annotations.findAnnotation (cognitive 18) · ×1
  • Annotations.findAnnotation (cognitive 18) corant-shared/src/main/java/org/corant/shared/util/Annotations.java:110 — Annotations.findAnnotation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryParseHandler.handleQueryHintParameter (cognitive 18) · ×1
  • QueryParseHandler.handleQueryHintParameter (cognitive 18) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:400 — QueryParseHandler.handleQueryHintParameter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractDomainJDBCDriver.currentState (cognitive 18) · ×1
  • AbstractDomainJDBCDriver.currentState (cognitive 18) REDACTED:188 — AbstractDomainJDBCDriver.currentState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 1 (2 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultObjectFunctionResolver.invokeMethod (cognitive 18) · ×1
  • DefaultObjectFunctionResolver.invokeMethod (cognitive 18) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/function/DefaultObjectFunctionResolver.java:140 — DefaultObjectFunctionResolver.invokeMethod has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 4 (5 pts), loops 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NamingContext.bind (cognitive 18) · ×1
  • NamingContext.bind (cognitive 18) corant-modules/corant-modules-jndi/src/main/java/org/corant/modules/jndi/NamingContext.java:399 — NamingContext.bind has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Trie.addChild (cognitive 18) · ×1
  • Trie.addChild (cognitive 18) corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/structure/Trie.java:64 — Trie.addChild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultAggregateAssistant.enqueueMessages (cognitive 18) · ×1
  • DefaultAggregateAssistant.enqueueMessages (cognitive 18) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/DefaultAggregateAssistant.java:80 — DefaultAggregateAssistant.enqueueMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Corant.shutdown (cognitive 18) · ×1
  • Corant.shutdown (cognitive 18) corant-kernel/src/main/java/org/corant/Corant.java:347 — Corant.shutdown has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommandHandlerResolver.resolve (cognitive 18) · ×1
  • CommandHandlerResolver.resolve (cognitive 18) corant-context/src/main/java/org/corant/context/command/CommandHandlerResolver.java:70 — CommandHandlerResolver.resolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConverterHunt.searchMatchedClass (cognitive 17) · ×1
  • ConverterHunt.searchMatchedClass (cognitive 17) corant-shared/src/main/java/org/corant/shared/conversion/ExperimentalConverters.java:288 — ConverterHunt.searchMatchedClass has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResultScriptMapperHintHandler.handle (cognitive 17) · ×1
  • ResultScriptMapperHintHandler.handle (cognitive 17) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultScriptMapperHintHandler.java:98 — ResultScriptMapperHintHandler.handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultFetchQueryHandler.handleFetchedResults (cognitive 17) · ×1
  • DefaultFetchQueryHandler.handleFetchedResults (cognitive 17) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/DefaultFetchQueryHandler.java:129 — DefaultFetchQueryHandler.handleFetchedResults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultFetchQueryHandler.resolveFetchQueryCriteriaValue (cognitive 17) · ×1
  • DefaultFetchQueryHandler.resolveFetchQueryCriteriaValue (cognitive 17) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/DefaultFetchQueryHandler.java:306 — DefaultFetchQueryHandler.resolveFetchQueryCriteriaValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MgQueryTemplate.query (cognitive 17) · ×1
  • MgQueryTemplate.query (cognitive 17) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/MgQueryTemplate.java:473 — MgQueryTemplate.query has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · StringBsonRegexConverter.doConvert (cognitive 17) · ×1
  • StringBsonRegexConverter.doConvert (cognitive 17) corant-modules/corant-modules-json/src/main/java/org/corant/modules/bson/converter/StringBsonRegexConverter.java:60 — StringBsonRegexConverter.doConvert has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AggregateReference.resolveType (cognitive 17) · ×1
  • AggregateReference.resolveType (cognitive 17) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/model/AggregateReference.java:92 — AggregateReference.resolveType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractJTAJPAUnitOfWork.fanoutEvolutions (cognitive 17) · ×1
  • AbstractJTAJPAUnitOfWork.fanoutEvolutions (cognitive 17) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/AbstractJTAJPAUnitOfWork.java:124 — AbstractJTAJPAUnitOfWork.fanoutEvolutions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JarLauncher.cleanWorkDir (cognitive 17) · ×1
  • JarLauncher.cleanWorkDir (cognitive 17) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/bin/JarLauncher.java:123 — JarLauncher.cleanWorkDir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CommandExtension.resolveCommandType (cognitive 17) · ×1
  • CommandExtension.resolveCommandType (cognitive 17) corant-context/src/main/java/org/corant/context/command/CommandExtension.java:133 — CommandExtension.resolveCommandType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigExtensionx.onProcessObserverMethod (cognitive 17) · ×1
  • ConfigExtensionx.onProcessObserverMethod (cognitive 17) corant-config/src/main/java/org/corant/config/cdi/ConfigExtensionx.java:162 — ConfigExtensionx.onProcessObserverMethod has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SQLServer2005Dialect.advanceOverCTEInnerQuery (cognitive 16) · ×1
  • SQLServer2005Dialect.advanceOverCTEInnerQuery (cognitive 16) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2005Dialect.java:96 — SQLServer2005Dialect.advanceOverCTEInnerQuery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractNamedQueryService.serialFetch (cognitive 16) · ×1
  • AbstractNamedQueryService.serialFetch (cognitive 16) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/AbstractNamedQueryService.java:342 — AbstractNamedQueryService.serialFetch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultMgNamedQuerier.init (cognitive 16) · ×1
  • DefaultMgNamedQuerier.init (cognitive 16) corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/DefaultMgNamedQuerier.java:96 — DefaultMgNamedQuerier.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JsonNumberNumberConverterFactory.create (cognitive 16) · ×1
  • JsonNumberNumberConverterFactory.create (cognitive 16) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/converter/JsonNumberNumberConverterFactory.java:38 — JsonNumberNumberConverterFactory.create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SimpleParser.createASTNodeFromJsonValue (cognitive 16) · ×1
  • SimpleParser.createASTNodeFromJsonValue (cognitive 16) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/SimpleParser.java:86 — SimpleParser.createASTNodeFromJsonValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PersistenceXmlParser.doParse (cognitive 16) · ×1
  • PersistenceXmlParser.doParse (cognitive 16) REDACTED:126 — PersistenceXmlParser.doParse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageReceivingMetaData.equals (cognitive 16) · ×1
  • MessageReceivingMetaData.equals (cognitive 16) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/MessageReceivingMetaData.java:148 — MessageReceivingMetaData.equals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WrappedMessage.mergeToQueue (cognitive 16) · ×1
  • WrappedMessage.mergeToQueue (cognitive 16) corant-modules/corant-modules-ddd/corant-modules-ddd-shared/src/main/java/org/corant/modules/ddd/shared/unitwork/WrappedMessage.java:58 — WrappedMessage.mergeToQueue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommandExtension.arrange (cognitive 16) · ×1
  • CommandExtension.arrange (cognitive 16) corant-context/src/main/java/org/corant/context/command/CommandExtension.java:70 — CommandExtension.arrange has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContextInstaller.install (cognitive 16) · ×1
  • ContextInstaller.install (cognitive 16) corant-context/src/main/java/org/corant/context/Contexts.java:186 — ContextInstaller.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 2, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConfigExtensionx.onProcessBean (cognitive 16) · ×1
  • ConfigExtensionx.onProcessBean (cognitive 16) corant-config/src/main/java/org/corant/config/cdi/ConfigExtensionx.java:134 — ConfigExtensionx.onProcessBean has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: Lists.java ↔ Sets.java corant-shared/src/main/java/org/corant/shared/util/Lists.java — `corant-shared/src/main/java/org/corant/shared/util/Lists.java` and `corant-shared/src/main/java/org/corant/shared/util/Sets.java` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `f6862f22` No message; `3a8d3e45` No message; `6e598e22` No message — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSJSEscapeContentHandler.java:29 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSJSEscapeContentHandler.java:29-102 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSURIEscapeContentHandler.java:29-116 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:149 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:149-166 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:177-194 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:150-167 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:179-196 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:157-174 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:206-223 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngineService.java:50-67 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngineService.java:75-92 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngines.java:47-64 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngines.java:70-87 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) REDACTED:135 — REDACTED:135-179 | REDACTED:188-256 | REDACTED:264-290 | REDACTED:312-353 | REDACTED:357-394 | REDACTED:397-424 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (117 lines × 2) · ×1
  • Duplicated block (117 lines × 2) corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:122 — corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:122-238 | corant-shared/src/main/java/org/corant/shared/util/PathMatcher.java:499-615 — 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 `corant-devops/corant-devops-maven/corant-devops-maven-plugin/src/main/java/org/corant/devops/maven/plugin/packaging/GlobPatterns.java:122` 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.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:123 — corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:123-160 | corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java:110-147 — before extracting anything, compare `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java` and `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/XEnNGramTokenFilter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-elastic/corant-modules-elastic-plugin/src/main/java/org/elasticsearch/index/analysis/MixedZhEnNGramTokenFilter.java:123` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–26 lines × 3) · ×1
  • Duplicated block (25–26 lines × 3) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSHTMLEscapeContentHandler.java:30 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSHTMLEscapeContentHandler.java:30-54 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSJSEscapeContentHandler.java:30-55 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSURIEscapeContentHandler.java:30-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/filter/XSSHTMLEscapeContentHandler.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:424 — corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:424-447 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/dynamic/SqlHelper.java:131-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-datasource/corant-modules-datasource-shared/src/main/java/org/corant/modules/datasource/shared/JDBCTemplate.java:424` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (23 lines × 4) · ×1
  • Duplicated block (23 lines × 4) corant-shared/src/main/java/org/corant/shared/util/Chars.java:233 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:233-255 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:777-799 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:990-1012 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1303-1325 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:124 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:124-146 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:125-147 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:125-147 — before extracting anything, compare `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java` and `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:147 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:147-169 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:175-197 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (22 lines × 23) · ×1
  • Duplicated block (22 lines × 23) corant-shared/src/main/java/org/corant/shared/util/Chars.java:122 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:122-143 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:238-259 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:269-290 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:308-329 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:388-409 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:501-522 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:537-558 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:594-615 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:672-693 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:714-735 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:782-803 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:817-838 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:902-923 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:995-1016 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1060-1081 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1105-1126 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1161-1182 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1250-1271 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1308-1329 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1347-1368 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1402-1423 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1441-1462 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1837-1858 — all 23 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:122` 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.
D4 · Code Duplication · Duplicated block (20 lines × 15) · ×1
  • Duplicated block (20 lines × 15) corant-shared/src/main/java/org/corant/shared/util/Chars.java:133 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:133-152 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:365-384 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:399-418 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:580-599 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:605-624 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:704-723 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:725-744 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:828-847 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:867-886 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:913-932 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1050-1069 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1071-1090 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1116-1135 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1224-1243 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1261-1280 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 24) · ×1
  • Duplicated block (19 lines × 24) corant-shared/src/main/java/org/corant/shared/util/Chars.java:116 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:116-134 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:159-177 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:302-320 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:322-340 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:382-400 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:425-443 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:495-513 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:550-568 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:588-606 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:614-632 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:708-726 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:731-749 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:811-829 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:833-851 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:896-914 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:945-963 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1054-1072 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1078-1096 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1121-1139 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1175-1193 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1244-1262 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1281-1299 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1414-1432 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1455-1473 — all 24 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 20) · ×1
  • Duplicated block (19 lines × 20) corant-shared/src/main/java/org/corant/shared/util/Chars.java:132 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:132-150 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:318-336 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:364-382 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:398-416 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:492-510 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:547-565 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:579-597 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:604-622 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:703-721 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:724-742 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:827-845 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:866-884 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:912-930 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1049-1067 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1070-1088 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1115-1133 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1171-1189 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1223-1241 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1260-1278 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1451-1469 — all 20 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 15) · ×1
  • Duplicated block (19 lines × 15) corant-shared/src/main/java/org/corant/shared/util/Chars.java:117 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:117-135 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:303-321 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:323-341 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:383-401 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:496-514 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:589-607 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:709-727 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:812-830 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:897-915 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:946-964 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1055-1073 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1156-1174 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1176-1194 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1245-1263 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1397-1415 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:117` 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.
D4 · Code Duplication · Duplicated block (18 lines × 14) · ×1
  • Duplicated block (18 lines × 14) corant-shared/src/main/java/org/corant/shared/util/Chars.java:161 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:161-178 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:281-298 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:427-444 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:513-530 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:552-569 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:616-633 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:684-701 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:733-750 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:835-852 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1080-1097 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1123-1140 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1283-1300 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1416-1433 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1457-1474 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 9) · ×1
  • Duplicated block (18 lines × 9) corant-shared/src/main/java/org/corant/shared/util/Chars.java:300 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:300-317 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:364-381 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:492-509 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:579-596 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:703-720 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:809-826 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:866-883 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1049-1066 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1223-1240 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:450 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:450-467 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1478-1495 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1855-1872 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:450` 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) corant-shared/src/main/java/org/corant/shared/util/Chars.java:1019 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:1019-1036 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1471-1488 — 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.
D4 · Code Duplication · Duplicated block (17 lines × 13) · ×1
  • Duplicated block (17 lines × 13) corant-shared/src/main/java/org/corant/shared/util/Chars.java:299 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:299-315 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:363-379 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:491-507 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:578-594 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:702-718 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:808-824 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:865-881 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1048-1064 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1098-1114 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1153-1169 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1222-1238 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1394-1410 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1434-1450 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 11) · ×1
  • Duplicated block (17 lines × 11) corant-shared/src/main/java/org/corant/shared/util/Chars.java:231 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:231-247 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:487-503 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:574-590 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:775-791 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:861-877 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:988-1004 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1044-1060 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1149-1165 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1218-1234 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1301-1317 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1339-1355 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:642 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:642-658 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1023-1039 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1475-1491 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 16) · ×1
  • Duplicated block (16 lines × 16) corant-shared/src/main/java/org/corant/shared/util/Chars.java:163 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:163-178 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:283-298 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:429-444 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:515-530 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:554-569 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:618-633 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:686-701 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:735-750 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:837-852 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1007-1022 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1082-1097 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1125-1140 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1285-1300 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1359-1374 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1418-1433 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1459-1474 — all 16 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:163` 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.
D4 · Code Duplication · Duplicated block (16 lines × 15) · ×1
  • Duplicated block (16 lines × 15) corant-shared/src/main/java/org/corant/shared/util/Chars.java:559 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:559-574 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:623-638 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:740-755 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:842-857 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1130-1145 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1324-1339 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1486-1501 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1505-1520 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1524-1539 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1543-1558 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1562-1577 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1581-1596 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1600-1615 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1619-1634 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1638-1653 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:559` 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.
D4 · Code Duplication · Duplicated block (15 lines × 20) · ×1
  • Duplicated block (15 lines × 20) corant-shared/src/main/java/org/corant/shared/util/Chars.java:165 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:165-179 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:250-264 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:285-299 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:431-445 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:517-531 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:556-570 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:620-634 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:652-666 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:688-702 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:737-751 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:794-808 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:839-853 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1009-1023 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1084-1098 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1127-1141 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1287-1301 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1321-1335 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1361-1375 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1420-1434 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1461-1475 — all 20 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 16) · ×1
  • Duplicated block (15 lines × 16) corant-shared/src/main/java/org/corant/shared/util/Chars.java:167 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:167-181 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:558-572 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:622-636 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:739-753 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:841-855 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1129-1143 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1323-1337 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1485-1499 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1504-1518 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1523-1537 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1542-1556 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1561-1575 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1580-1594 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1599-1613 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1618-1632 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1637-1651 — all 16 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:167` 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.
D4 · Code Duplication · Duplicated block (15 lines × 13) · ×1
  • Duplicated block (15 lines × 13) corant-shared/src/main/java/org/corant/shared/util/Chars.java:256 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:256-270 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:291-305 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:437-451 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:523-537 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:658-672 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:694-708 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:800-814 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1015-1029 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1090-1104 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1367-1381 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1386-1400 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1426-1440 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1467-1481 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 10) · ×1
  • Duplicated block (15 lines × 10) corant-shared/src/main/java/org/corant/shared/util/Chars.java:455 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:455-469 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1483-1497 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1502-1516 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1521-1535 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1540-1554 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1559-1573 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1578-1592 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1597-1611 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1616-1630 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1635-1649 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:1941 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:1941-1955 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1958-1972 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1986-2000 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:243 — corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:243-257 | corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java:295-308 — before extracting anything, compare `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java` and `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/SimpleMessageReceiver.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jms/corant-modules-jms-shared/src/main/java/org/corant/modules/jms/shared/receive/DefaultMessageReceiver.java:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 18) · ×1
  • Duplicated block (14 lines × 18) corant-shared/src/main/java/org/corant/shared/util/Chars.java:260 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:260-273 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:295-308 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:441-454 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:527-540 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:662-675 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:698-711 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:804-817 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1094-1107 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1390-1403 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1430-1443 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1497-1510 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1516-1529 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1535-1548 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1554-1567 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1573-1586 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1592-1605 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1611-1624 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1630-1643 — all 18 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 16) · ×1
  • Duplicated block (14 lines × 16) corant-shared/src/main/java/org/corant/shared/util/Chars.java:254 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:254-267 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:289-302 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:435-448 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:459-472 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:521-534 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:656-669 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:692-705 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:798-811 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1013-1026 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1034-1047 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1088-1101 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1291-1304 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1365-1378 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1384-1397 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1424-1437 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1465-1478 — all 16 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:254` 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.
D4 · Code Duplication · Duplicated block (14 lines × 10) · ×1
  • Duplicated block (14 lines × 10) corant-shared/src/main/java/org/corant/shared/util/Chars.java:1667 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:1667-1680 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1683-1696 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1699-1712 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1715-1728 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1731-1744 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1747-1760 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1763-1776 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1779-1792 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1795-1808 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1811-1824 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:182 — corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:182-195 | corant-shared/src/main/java/org/corant/shared/conversion/Conversion.java:591-603 — 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 `corant-config/src/main/java/org/corant/config/CorantConfigConversion.java:182` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) corant-modules/corant-modules-datasource/corant-modules-datasource-agroal/src/main/java/org/corant/modules/datasource/agroal/patch/MyNarayanaTransactionIntegration.java:158 — corant-modules/corant-modules-datasource/corant-modules-datasource-agroal/src/main/java/org/corant/modules/datasource/agroal/patch/MyNarayanaTransactionIntegration.java:158-171 | corant-modules/corant-modules-jta/corant-modules-jta-shared/src/main/java/org/corant/modules/jta/shared/TransactionIntegrator.java:230-241 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) corant-shared/src/main/java/org/corant/shared/util/Chars.java:1019 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:1019-1031 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1471-1483 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1649-1661 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:140 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:140-152 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:160-171 — 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 `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/Keys.java:140` 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.
D4 · Code Duplication · Duplicated block (12 lines × 18) · ×1
  • Duplicated block (12 lines × 18) corant-shared/src/main/java/org/corant/shared/util/Chars.java:199 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:199-210 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:470-481 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:566-577 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:630-641 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:755-766 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:853-864 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1137-1148 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1196-1207 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1331-1342 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1493-1504 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1512-1523 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1531-1542 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1550-1561 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1569-1580 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1588-1599 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1607-1618 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1626-1637 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1645-1656 — all 18 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 12) · ×1
  • Duplicated block (12 lines × 12) corant-shared/src/main/java/org/corant/shared/util/Chars.java:343 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:343-354 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:970-981 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1673-1684 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1689-1700 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1705-1716 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1721-1732 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1737-1748 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1753-1764 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1769-1780 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1785-1796 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1801-1812 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1817-1828 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 9) · ×1
  • Duplicated block (12 lines × 9) corant-shared/src/main/java/org/corant/shared/util/Chars.java:205 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:205-216 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:350-361 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:572-583 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:636-647 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:859-870 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1042-1053 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1202-1213 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1299-1310 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1337-1348 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:205` 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.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) corant-shared/src/main/java/org/corant/shared/util/Chars.java:194 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:194-205 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:227-238 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:961-972 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:980-991 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1191-1202 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 21) · ×1
  • Duplicated block (11 lines × 21) corant-shared/src/main/java/org/corant/shared/util/Chars.java:201 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:201-211 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:346-356 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:472-482 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:568-578 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:632-642 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:757-767 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:855-865 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1139-1149 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1198-1208 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1333-1343 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1660-1670 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1676-1686 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1692-1702 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1708-1718 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1724-1734 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1740-1750 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1756-1766 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1772-1782 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1788-1798 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1804-1814 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1820-1830 — all 21 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:201` 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.
D4 · Code Duplication · Duplicated block (11 lines × 14) · ×1
  • Duplicated block (11 lines × 14) corant-shared/src/main/java/org/corant/shared/util/Chars.java:193 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:193-203 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:226-236 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:342-352 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:969-979 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1672-1682 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1688-1698 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1704-1714 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1720-1730 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1736-1746 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1752-1762 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1768-1778 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1784-1794 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1800-1810 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1816-1826 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 11) · ×1
  • Duplicated block (11 lines × 11) corant-shared/src/main/java/org/corant/shared/util/Chars.java:186 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:186-196 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:219-229 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:484-494 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:747-757 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:764-774 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:849-859 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:985-995 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1146-1156 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1215-1225 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1933-1943 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1978-1988 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 10) · ×1
  • Duplicated block (11 lines × 10) corant-shared/src/main/java/org/corant/shared/util/Chars.java:973 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:973-983 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1495-1505 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1514-1524 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1533-1543 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1552-1562 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1571-1581 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1590-1600 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1609-1619 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1628-1638 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1647-1657 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:973` 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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) corant-shared/src/main/java/org/corant/shared/util/Chars.java:183 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:183-193 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:196-206 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:216-226 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:982-992 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1193-1203 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1212-1222 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:183` 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/converter/JsonNumberNumberConverterFactory.java:60 — corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/converter/JsonNumberNumberConverterFactory.java:60-69 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ByteArrayPrimitiveConverterFactory.java:65-75 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/ObjectEnumConverterFactory.java:88-97 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/PrimitiveByteArrayConverterFactory.java:54-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/converter/JsonNumberNumberConverterFactory.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `defaultValue` to `Object` in one and `byte[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10 lines × 23) · ×1
  • Duplicated block (10 lines × 23) corant-shared/src/main/java/org/corant/shared/util/Chars.java:203 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:203-212 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:348-357 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:465-474 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:570-579 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:634-643 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:759-768 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:857-866 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1040-1049 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1141-1150 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1200-1209 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1297-1306 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1335-1344 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1662-1671 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1678-1687 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1694-1703 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1710-1719 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1726-1735 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1742-1751 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1758-1767 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1774-1783 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1790-1799 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1806-1815 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1822-1831 — all 23 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 11) · ×1
  • Duplicated block (10 lines × 11) corant-shared/src/main/java/org/corant/shared/util/Chars.java:185 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:185-194 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:198-207 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:218-227 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:469-478 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:483-492 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:750-759 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:852-861 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:984-993 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1145-1154 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1195-1204 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1214-1223 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 9) · ×1
  • Duplicated block (10 lines × 9) corant-shared/src/main/java/org/corant/shared/util/Chars.java:184 — corant-shared/src/main/java/org/corant/shared/util/Chars.java:184-193 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:197-206 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:217-226 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:749-758 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:766-775 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:851-860 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:983-992 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1194-1203 | corant-shared/src/main/java/org/corant/shared/util/Chars.java:1213-1222 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/util/Chars.java:184` 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) REDACTED:182 — REDACTED:182-190 | REDACTED:217-226 — 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 `REDACTED:182` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 10) · ×1
  • Duplicated block (9 lines × 10) corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:150 — corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:150-158 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:178-186 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:151-159 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java:180-188 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:158-166 | corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngines.java:207-215 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngineService.java:51-59 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngineService.java:76-84 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngines.java:48-56 | corant-modules/corant-modules-lang/corant-modules-lang-kotlin/src/main/java/org/corant/modules/lang/kotlin/KotlinScriptEngines.java:71-79 — before extracting anything, compare `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java` and `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/NashornScriptEngineService.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-lang/corant-modules-lang-javascript/src/main/java/org/corant/modules/lang/javascript/GraalJSScriptEngineService.java:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–9 lines × 5) · ×1
  • Duplicated block (3–9 lines × 5) corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:61 — corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:61-63 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:118-126 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:147-149 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:175-183 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:211-213 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:215` calls `resolveSelectSize` and `corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/AbstractJpqlNamedQueryService.java:65` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 5) · ×1
  • Duplicated block (7–8 lines × 5) corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultAggregationHintHandler.java:119 — corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultAggregationHintHandler.java:119-126 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultBeanMapperHintHandler.java:113-119 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultFieldConvertHintHandler.java:159-166 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultMapReduceHintHandler.java:157-164 | corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultScriptMapperHintHandler.java:107-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-shared/src/main/java/org/corant/modules/query/shared/spi/ResultAggregationHintHandler.java:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2008Dialect.java:37 — corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2008Dialect.java:37-43 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2012Dialect.java:113-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/SQLServer2008Dialect.java:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:154 — corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:154-159 | corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:170-175 | corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:188-194 | corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:206-212 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-context/src/main/java/org/corant/context/concurrent/ConcurrentExtension.java:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–7 lines × 5) · ×1
  • Duplicated block (3–7 lines × 5) corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/DB2Dialect.java:58 — corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/DB2Dialect.java:58-64 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/H2Dialect.java:39-45 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/HSQLDialect.java:50-53 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/MySQLDialect.java:99-101 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/PostgreSQLDialect.java:55-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/DB2Dialect.java:58` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/DB2Dialect.java:55` calls `shallowIndexOfPattern`, `indexOf` and `corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/dialect/HSQLDialect.java:50` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (4–7 lines × 5) · ×1
  • Duplicated block (4–7 lines × 5) corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:37 — corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:37-43 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/ChebychevDistance.java:44-47 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/CosineDistance.java:41-44 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/CustomizedDistance.java:34-40 | corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/SquaredEuclideanDistance.java:37-43 — before extracting anything, compare `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java` and `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/SquaredEuclideanDistance.java` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/BlockDistance.java:43` calls `getValue` and `corant-modules/corant-modules-dsa/src/main/java/org/corant/modules/dsa/cluster/distance/ChebychevDistance.java:47` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–6 lines × 4) · ×1
  • Duplicated block (5–6 lines × 4) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.java:72 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.java:72-77 | corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/cdi/EsNamedQueryServiceManager.java:70-75 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/cdi/JpqlNamedQueryServiceManager.java:68-72 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/cdi/MgNamedQueryServiceManager.java:72-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:279 — corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:279-284 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:302-307 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:326-331 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:403-408 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:410` calls `setValue`, `equalsIgnoreCase`, `isNotBlank` and `corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/mapping/QueryParseHandler.java:286` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.java:80 — corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.java:80-83 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.java:88-92 | corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.java:96-100 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/conversion/converter/factory/MapTemporalConverterFactory.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) corant-kernel/src/main/java/org/corant/kernel/event/PostContainerReadyEvent.java:39 — corant-kernel/src/main/java/org/corant/kernel/event/PostContainerReadyEvent.java:39-48 | corant-kernel/src/main/java/org/corant/kernel/event/PostCorantReadyAsyncEvent.java:37-46 | corant-kernel/src/main/java/org/corant/kernel/event/PostCorantReadyEvent.java:37-46 — before extracting anything, compare `corant-kernel/src/main/java/org/corant/kernel/event/PostContainerReadyEvent.java` and `corant-kernel/src/main/java/org/corant/kernel/event/PostCorantReadyAsyncEvent.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 6) · ×1
  • Duplicated block (18 lines × 6) corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/NoSuchBundleException.java:28 — corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/NoSuchBundleException.java:28-45 | corant-modules/corant-modules-bundle/src/main/java/org/corant/modules/bundle/NoSuchMessageException.java:28-45 | corant-modules/corant-modules-elastic/corant-modules-elastic-data/src/main/java/org/corant/modules/elastic/data/ElasticException.java:34-70 | corant-modules/corant-modules-json/src/main/java/org/corant/modules/json/expression/ParseException.java:28-45 | corant-modules/corant-modules-query/corant-modules-query-api/src/main/java/org/corant/modules/query/QueryRuntimeException.java:31-67 | corant-shared/src/main/java/org/corant/shared/conversion/ConversionException.java:28-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/driver/DomainMSSqlDriver.java:1 — corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/driver/DomainMSSqlDriver.java:1-45 | corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/driver/DomainOracleDriver.java:1-52 — before extracting anything, compare `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/driver/DomainMSSqlDriver.java` and `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/driver/DomainOracleDriver.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-jta/corant-modules-jta-narayana/src/main/java/org/corant/modules/jta/narayana/objectstore/driver/DomainMSSqlDriver.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/jose/algorithm/ContentEncryptionAlgorithm.java:40 — corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/jose/algorithm/ContentEncryptionAlgorithm.java:40-66 | corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/jose/algorithm/KeyManagementAlgorithm.java:54-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `corant-modules/corant-modules-security/corant-modules-security-shared/src/main/java/org/corant/modules/security/shared/crypto/jose/algorithm/ContentEncryptionAlgorithm.java:40` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerierResolver.java:109 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/DefaultCasNamedQuerierResolver.java:109-114 | corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/DefaultEsNamedQuerierResolver.java:78-83 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/DefaultJpqlNamedQuerierResolver.java:95-100 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/DefaultMgNamedQuerierResolver.java:78-83 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/DefaultSqlNamedQuerierResolver.java:113-118 — before extracting anything, compare `corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/DefaultEsNamedQuerierResolver.java` and `corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/DefaultMgNamedQuerierResolver.java` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) corant-modules/corant-modules-cloud/corant-modules-cloud-alibaba/src/main/java/org/corant/modules/cloud/alibaba/oss/OSSStorageService.java:168 — corant-modules/corant-modules-cloud/corant-modules-cloud-alibaba/src/main/java/org/corant/modules/cloud/alibaba/oss/OSSStorageService.java:168-173 | corant-modules/corant-modules-jaxrs/corant-modules-jaxrs-resteasy/src/main/java/org/corant/modules/jaxrs/resteasy/ResteasyResource.java:195-200 | corant-shared/src/main/java/org/corant/shared/resource/ByteArrayResource.java:81-86 | corant-shared/src/main/java/org/corant/shared/resource/InputStreamResource.java:111-116 | corant-shared/src/main/java/org/corant/shared/resource/PathResource.java:115-120 | corant-shared/src/main/java/org/corant/shared/resource/TemporaryResource.java:126-131 | corant-shared/src/main/java/org/corant/shared/resource/URLResource.java:135-140 | corant-shared/src/main/java/org/corant/shared/resource/WritableResource.java:48-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 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 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `corant-shared/src/main/java/org/corant/shared/resource/WritableResource.java:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `corant-shared/src/main/java/org/corant/shared/resource/ByteArrayResource.java:88` calls `withLocation`, `ByteArrayResource` and `corant-modules/corant-modules-cloud/corant-modules-cloud-alibaba/src/main/java/org/corant/modules/cloud/alibaba/oss/OSSStorageService.java:174` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.java:95 — corant-modules/corant-modules-query/corant-modules-query-cassandra/src/main/java/org/corant/modules/query/cassandra/cdi/CasNamedQueryServiceManager.java:95-104 | corant-modules/corant-modules-query/corant-modules-query-elastic/src/main/java/org/corant/modules/query/elastic/cdi/EsNamedQueryServiceManager.java:93-102 | corant-modules/corant-modules-query/corant-modules-query-jpql/src/main/java/org/corant/modules/query/jpql/cdi/JpqlNamedQueryServiceManager.java:90-99 | corant-modules/corant-modules-query/corant-modules-query-mongodb/src/main/java/org/corant/modules/query/mongodb/cdi/MgNamedQueryServiceManager.java:95-104 | corant-modules/corant-modules-query/corant-modules-query-sql/src/main/java/org/corant/modules/query/sql/cdi/SqlNamedQueryServiceManager.java:132-141 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. 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.
Minor — 27 finding(s)
D10 · Test Quality · No direct assertions · ×9
  • No direct assertions: test corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/HMACProviderTest.java:30 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: test corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/HashProviderTest.java:36 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testASymmetric corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/JCACipherProviderTest.java:49 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testSymmetric corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/JCACipherProviderTest.java:63 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testEncryptAndDecrypt corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/JoseProviderTest.java:44 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testSignAndParse corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/JoseProviderTest.java:62 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testSignEncryptAndDecrypt corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/JoseProviderTest.java:77 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: test corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/PBKFD2ProviderTest.java:36 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: test corant-modules/corant-modules-security/corant-modules-security-shared/src/test/java/org/corant/modules/security/shared/crypto/SignatureProviderTest.java:31 — No conventional assertion call was detected, and 9 of 10 tests in `corant-modules-security-shared` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file corant-shared/src/main/java/org/corant/shared/util/Chars.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file corant-shared/src/main/java/org/corant/shared/util/Maps.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file corant-shared/src/main/java/org/corant/shared/util/Strings.java — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no installation or build instructions README.md — The README states JDK 11+ is required but does not give Maven build instructions or a setup guide for the project. Add a short 'Getting started' section covering how to run the project with Maven, specifying JDK version and any prerequisites.
  • Documentation: no usage examples README.md — The architecture outline lists Corant projects but there is no usage example showing how to create or run a JAX-RS component. Add a 'Getting started' section that walks through creating and running an application, referencing the corant-boms project.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift — README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
  • README/code drift — README advertises a microservices architecture, but the repo is a single project with no service manifests — searched for: `microservice`, `service-mesh`, `istio`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 639 of 639 significant files have no living knowledge — the codebase as a whole is dormant, not 639 separate risks. Counted over 639 of the 1388 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-206ee777f183499683f13b940d20772b/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-206ee777f183499683f13b940d20772b/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .23artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0—

Run 01a0c451-4862-7681-84e2-8c3c2e48ea6e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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