Public report — rocketmq, published 6 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
1235findings with an exact file:lineof 1252 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
26/101dimensions across the health lenses221411 LoC — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
apache/rocketmq is sound in substance but carries real gaps (55%). It is not in crisis, but the issues below raise the cost of changing it — friction its consumers ultimately inherit.
It is strongest in Domain Modelling (100%) — the domain model is expressive and well-guarded. Architecture (99%) is solid too.
The area that most needs attention is Security (38%) — exposure to security and compliance incidents is elevated. Readiness (59%) is the next concern — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade.
Leadership focus, highest impact first: 34 High finding(s) (Static Analysis (SAST)); Nothing pauses a release for a human (Deployment & Rollback); Keep a changelog (e.g. Keep-a-Changelog) recording what shipped… (Release Hygiene).
For scale: Large (~221,411 production lines); rebuilding it from scratch would take roughly ~3.0 person-years (~1–6 engineers). Approximate, ±~30%.
It builds on a genuinely strong Domain Modelling foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth 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.
0.8× (at 55% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~3.0 person-years of build effort (about ~€440,000 to rebuild). Its weakest lens is Security at 38% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain High (×1.4) — CQRS, domain model × a 0.8× 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 34 High finding(s) in Static Analysis (SAST) — start with snapshot-automation.yml (16), codeql_analysis.yml (5), maven.yaml (4).
Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~3.0 person-years to rebuild), and its weakest lens is Security at 38%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Security first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 2.6–15.7 engineer-days every year, paid as drag on the ~38,325 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 2–46 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 3–6% 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: 9,450 line(s) changed over a 90-day window ⇒ ~38,325/year · D1/D2/D4 code quality: averaging 6.9/10 ⇒ a 3–6% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 46 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 34 High finding(s) in Static Analysis (SAST) — start with snapshot-automation.yml (16), codeql_analysis.yml (5), maven.yaml (4). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 34 High finding(s) in Static Analysis (SAST) — start with snapshot-automation.yml (16), codeql_analysis.yml (5), maven.yaml (4).
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.9/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 3–6% 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 6.9/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
293 modules, 1282 dependencies — 10 dependency cycles, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
40
High / Critical
A02:2021 — Cryptographic Failures
2
High / Critical
Roadmap
Begin by resolving the 34 high-severity static analysis findings, prioritizing the automation and code quality configuration files. Next, implement a draft release gate to prevent bad builds from reaching users, and maintain a clear changelog to track each release. Finally, address the single secret found in the repository history and add build provenance to ensure supply-chain integrity.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 34 High finding(s) in Static Analysis (SAST) — start with snapshot-automation.yml (16), codeql_analysis.yml (5), maven.yaml (4).
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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. 24 of 26 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.5 — 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 — 26 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1235 of 1252 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
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.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
143 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was BrokerController.shutdownBasicService at 66. A further 5 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 AdminBrokerProcessor.processRequest at 76 — they are counted neither in the figure above nor in this dimension's score.
+ 138 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 BrokerController.shutdownBasicService (cyclomatic 66) finding(s) in Cyclomatic Complexity — start with BrokerController.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PopMessageProcessor.processRequest (cyclomatic 61) finding(s) in Cyclomatic Complexity — start with PopMessageProcessor.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 ComparisonExpression.__compare (cyclomatic 54) finding(s) in Cyclomatic Complexity — start with ComparisonExpression.java. — One of this dimension's main actionable groups (1 warning-level).
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.
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.
+ 361 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 DefaultMessageStore.getMessage (cognitive 168) finding(s) in Cognitive Complexity — start with DefaultMessageStore.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PopReviveService.consumeReviveMessage (cognitive 132) finding(s) in Cognitive Complexity — start with PopReviveService.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 MQAdminImpl.queryMessage (cognitive 132) finding(s) in Cognitive Complexity — start with MQAdminImpl.java. — One of this dimension's main actionable groups (1 warning-level).
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.
Do you agree with this assessment?
D3 · God Classes8.1 / 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.
Resolve the 74 TooManyMethods finding(s) in God Classes — start with MessageStoreConfig.java (2), ClientConfig.java (2), BrokerConfig.java. — One of this dimension's main actionable groups (74 warning-level).
Resolve the 44 FileTooLong finding(s) in God Classes — start with MQClientAPIImpl.java, AdminBrokerProcessor.java, DefaultMessageStore.java. — One of this dimension's main actionable groups (44 warning-level).
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.
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.
+ 42 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 71 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ConsumerOffsetManagerV2.java (3), AdminBrokerProcessor.java (3), MQClientAPIImpl.java (3). — One of this dimension's main actionable groups (71 warning-level).
Resolve the 68 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with AdminBrokerProcessor.java (4), CommitLog.java (4), ConsumeMessageConcurrentlyService.java (3). — One of this dimension's main actionable groups (68 warning-level).
Resolve the 57 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with AdminBrokerProcessor.java (3), ConsumerOffsetManagerV2.java (2), BrokerOuterAPI.java (2). — One of this dimension's main actionable groups (57 warning-level).
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.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: 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.
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
56 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is store/src/main/java/org/apache/rocketmq/store/rocksdb/MessageRocksDBStorage.java.
Off-boarding risk: anonymized user #1 · ×5
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
RocketMQ's documentation is clear and complete for its intended audience — a developer-facing guide covering operation FAQs (mqadmin error recovery, version-inconsistent consumer behavior, historical-message consumption policy), example references, quorum-write replication mode, message-trace cluster deployment, producer/consumer best practices, broker role/flushDiskType/configuration, and a dedicated Flaky Test Detection Plan. The README files alone give the strongest coverage of operation topics (FAQs, examples, trace, producer, consumer) while architecture docs are sparse but well-structured for readers who want deeper system-level understanding. RocketMQ's documentation is clear and complete for a distributed messaging project. The READMEs cover the main features (message ordering, filter, reliability, at-least-once, backtracking consumption, transactional message) with detailed subsections, plus FAQ covering installation, consumer restart behavior, failed-message querying, exactly-once guarantees, broker addition, and configuration limits. A dedicated OpenMessaging example shows how to access RocketMQ via the Open Messaging framework's OMSProducer model. The content is well-organized by feature theme and each document body clips at a fixed boundary marker (e.g., '…(clipped here by the scanner for evaluation; clipping is not a defect of the document — never report an unshown section as missing') without omitting any outline-named sections. (9 of 25 sampled documents could not be assessed: 1 of 3 evaluation groups failed.)
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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
Secret: generic-api-key.bazelrc:68detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed
✓ On the Gold path — maintain.
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
High: github-actions-mutable-action-tag · ×34.github/workflows/bazel.yml:23detected by semgrep finding
Medium: use-of-md5 · ×6common/src/main/java/org/apache/rocketmq/common/consistenthash/ConsistentHashRouter.java:118detected by semgrep finding
What to do
Resolve the 34 High finding(s) in Static Analysis (SAST) — start with snapshot-automation.yml (16), codeql_analysis.yml (5), maven.yaml (4). — One of this dimension's main actionable groups (34 issue-level).
Resolve the 6 Medium finding(s) in Static Analysis (SAST) — start with MessageStoreUtil.java (2), ConsistentHashRouter.java, BinaryUtil.java. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
416 of 851 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java.
Resolve the 18 Orphaned knowledge finding(s) in Knowledge Freshness — start with CompactionLog.java, ReplicasInfoManager.java, DefaultMQPushConsumer.java. — One of this dimension's main actionable groups (18 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.
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.
Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PR-triggered workflow without a permissions block finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Other · Domain Modelling — Whether entities protect their state (private/init-only setters) instead of exposing public setters that bypass invariants. Softened when a rehydration framework (Marten/EF) is present.
Method: Roslyn (DDD-gated): public setters on entities detected; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.
Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.
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 15 of 17 project(s) that lack one — worth up to 1.8 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
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
What to do
Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists.
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.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Not included — 75 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
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~107128 lines of test source are present (.java) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Maven POM), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.java, .py) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Maven POM — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
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.
D38 OSV Dependency Vulnerabilities — Scanner failed to run — not a clean result
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .java, .py, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.java) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this check looks for (4 CQRS handler(s))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
GD1 Unfinished & placeholder code — no source files
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
High: github-actions-mutable-action-tag .github/workflows/bazel.yml:23— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/bazel.yml:25— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/cache@<40-character SHA>`. This step references `actions/cache@v4`; resolve the SHA it points at today with `gh api repos/actions/cache/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/codeql_analysis.yml:20— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/codeql_analysis.yml:22— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/cache@<40-character SHA>`. This step references `actions/cache@v3`; resolve the SHA it points at today with `gh api repos/actions/cache/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/codeql_analysis.yml:30— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: github/codeql-action/init@<40-character SHA>`. This step references `github/codeql-action/init@v2`; resolve the SHA it points at today with `gh api repos/github/codeql-action/commits/v2 --jq .sha`. `github/codeql-action/init` is hosted INSIDE the `github/codeql-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `github/codeql-action/init` path in `uses:` and query only `github/codeql-action`.
High: github-actions-mutable-action-tag .github/workflows/codeql_analysis.yml:34— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: github/codeql-action/autobuild@<40-character SHA>`. This step references `github/codeql-action/autobuild@v2`; resolve the SHA it points at today with `gh api repos/github/codeql-action/commits/v2 --jq .sha`. `github/codeql-action/autobuild` is hosted INSIDE the `github/codeql-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `github/codeql-action/autobuild` path in `uses:` and query only `github/codeql-action`.
High: github-actions-mutable-action-tag .github/workflows/codeql_analysis.yml:36— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: github/codeql-action/analyze@<40-character SHA>`. This step references `github/codeql-action/analyze@v2`; resolve the SHA it points at today with `gh api repos/github/codeql-action/commits/v2 --jq .sha`. `github/codeql-action/analyze` is hosted INSIDE the `github/codeql-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `github/codeql-action/analyze` path in `uses:` and query only `github/codeql-action`.
High: github-actions-mutable-action-tag .github/workflows/coverage.yml:16— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@master`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/master --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/coverage.yml:18— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/coverage.yml:26— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: codecov/codecov-action@<40-character SHA>`. This step references `codecov/codecov-action@v3`; resolve the SHA it points at today with `gh api repos/codecov/codecov-action/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/license-checker.yaml:33— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/license-checker.yaml:35— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: apache/skywalking-eyes@<40-character SHA>`. This step references `apache/skywalking-eyes@v0.2.0`; resolve the SHA it points at today with `gh api repos/apache/skywalking-eyes/commits/v0.2.0 --jq .sha`. Note that `v0.2.0` is an exact release tag rather than a floating major: it is still mutable (a tag can be repointed), but by convention it moves only on a force-push, so pin the floating-major and branch references in this file first.
High: github-actions-mutable-action-tag .github/workflows/maven.yaml:24— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v2`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v2 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/maven.yaml:26— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/maven.yaml:44— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/maven.yaml:52— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/misspell_check.yml:16— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:46— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:52— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:58— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:62— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:72— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:89— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v3`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:94— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/download-artifact@<40-character SHA>`. This step references `actions/download-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/download-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/snapshot-automation.yml:100— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: docker/login-action@<40-character SHA>`. This step references `docker/login-action@v2`; resolve the SHA it points at today with `gh api repos/docker/login-action/commits/v2 --jq .sha`.
Orphaned knowledge store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge remoting/src/main/java/org/apache/rocketmq/remoting/protocol/statictopic/TopicQueueMappingUtils.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/impl/admin/MqClientAdminImpl.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge store/src/main/java/org/apache/rocketmq/store/StoreStatsService.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge store/src/main/java/org/apache/rocketmq/store/ConsumeQueueExt.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminUtils.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueTable.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Boundary-crossing change coupling: PositiveAtomicCounter.java ↔ DefaultMQProducerImpl.java broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java— `broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java` (context broker) and `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java` (context main) sit in DIFFERENT parts of the tree yet change together 91% of the time (10 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see.
Boundary-crossing change coupling: PositiveAtomicCounter.java ↔ DefaultMQProducer.java broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java— `broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java` (context broker) and `client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java` (context main) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see.
Boundary-crossing change coupling: PositiveAtomicCounter.java ↔ MQProducer.java broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java— `broker/src/main/java/org/apache/rocketmq/broker/util/PositiveAtomicCounter.java` (context broker) and `client/src/main/java/org/apache/rocketmq/client/producer/MQProducer.java` (context main) sit in DIFFERENT parts of the tree yet change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see.
Boundary-crossing change coupling: MQClientAPIImpl.java ↔ MQAdminExt.java client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java— `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java` (context main) and `tools/src/main/java/org/apache/rocketmq/tools/admin/MQAdminExt.java` (context tools) sit in DIFFERENT parts of the tree yet change together 53% of the time (75 of the 142 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see.
Boundary-crossing change coupling: MQClientAPIImpl.java ↔ DefaultMQAdminExt.java client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java— `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java` (context main) and `tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExt.java` (context tools) sit in DIFFERENT parts of the tree yet change together 51% of the time (78 of the 154 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see.
TooManyMethods: BrokerConfig common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java:28— TooManyMethods — 492 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MessageStoreConfig store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java:27— TooManyMethods — 451 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ProxyConfig proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java:41— TooManyMethods — 322 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BrokerController broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:196— TooManyMethods — 188 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMessageStore store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:125— TooManyMethods — 176 methods. Most of these members implement store.MessageStore (117 of 167 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: MQClientAPIImpl client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:275— TooManyMethods — 159 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMQAdminExt tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExt.java:83— TooManyMethods — 153 methods. Most of these members implement admin.MQAdminExt (112 of 126 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: DefaultMQAdminExtImpl tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:130— TooManyMethods — 151 methods. Most of these members implement admin.MQAdminExt (112 of 127 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: AbstractPluginMessageStore store/src/main/java/org/apache/rocketmq/store/plugin/AbstractPluginMessageStore.java:68— TooManyMethods — 121 methods. Most of these members implement store.MessageStore (112 of 114 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: DefaultMQProducer client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:70— TooManyMethods — 120 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMQPushConsumer client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java:64— TooManyMethods — 102 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AdminBrokerProcessor broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:248— TooManyMethods — 101 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMQProducerImpl client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:101— TooManyMethods — 98 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMQPushConsumerImpl client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:97— TooManyMethods — 88 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TimerMessageStore store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:79— TooManyMethods — 87 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultLitePullConsumer client/src/main/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumer.java:47— TooManyMethods — 86 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MessageStoreConfig tieredstore/src/main/java/org/apache/rocketmq/tieredstore/MessageStoreConfig.java:24— TooManyMethods — 82 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultLitePullConsumerImpl client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:79— TooManyMethods — 81 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClientConfig client/src/main/java/org/apache/rocketmq/client/ClientConfig.java:37— TooManyMethods — 78 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMappedFile store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:64— TooManyMethods — 73 methods. Most of these members implement logfile.MappedFile (41 of 60 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: CommitLog store/src/main/java/org/apache/rocketmq/store/CommitLog.java:77— TooManyMethods — 72 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultMQPullConsumerImpl client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:74— TooManyMethods — 70 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MQClientInstance client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:96— TooManyMethods — 69 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BrokerStatsManager store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:45— TooManyMethods — 67 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BrokerOuterAPI broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:162— TooManyMethods — 66 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (7 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:80— auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:80-86 | auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:106-112 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.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.
Duplicated block (7 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:144— auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:144-150 | auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:183-189 — 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) auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:85— auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:85-91 | auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:113-119 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:122— auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:122-128 | auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:140-146 — 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) broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:232— broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:232-238 | broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:283-289 — 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 `broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:232` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java:89— broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java:89-95 | broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataPullRequestHoldService.java:73-79 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/coldctr/ColdDataCgCtrService.java:89` 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) broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:72— broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:72-78 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:119-125 — 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) broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:125— broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:125-131 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.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) broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:231— broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:231-237 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:252-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:184— broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:184-190 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:254-260 — 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 `broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:184` 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) broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:208— broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:208-214 | broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:280-286 — 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 `broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:208` 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) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1601— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1601-1607 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java:131-137 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1601` 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) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerRocksdbStore.java:73— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerRocksdbStore.java:73-80 | common/src/main/java/org/apache/rocketmq/common/config/AbstractRocksDBStorage.java:158-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:156— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:156-162 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:854-861 — 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 `broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:156` 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) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:689— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:689-696 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:115-121 — 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) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:856— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:856-862 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1842-1851 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:856` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1877— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1877-1883 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2432-2438 — 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 (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3076— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3076-3082 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/DefaultTransactionalMessageCheckListener.java:73-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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3076` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:133— broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:133-139 | broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:168-174 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:139— broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:139-145 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:160-166 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:860— broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:860-866 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.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.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:325— broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:325-332 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:362-368 — 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 (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:242— broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:242-248 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:130-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:259— broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:259-265 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/TransactionalMessageBridge.java:153-159 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.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. 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) broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:110— broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:110-116 | broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:155-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:110` 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) auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:67— auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:67-75 | auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:81-89 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authentication/manager/AuthenticationMetadataManagerImpl.java:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java:170— broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java:170-178 | broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java:192-201 — 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 `broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.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.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:52— broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:52-60 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:46-54 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/config/v2/SubscriptionGroupManagerV2.java:88— broker/src/main/java/org/apache/rocketmq/broker/config/v2/SubscriptionGroupManagerV2.java:88-96 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/TopicConfigManagerV2.java:100-109 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/config/v2/SubscriptionGroupManagerV2.java:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:170— broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:170-178 | broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:276-284 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.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.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:500— broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:500-508 | broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:510-518 — 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 `broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:500` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:387— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:387-395 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1499-1507 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:387` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:933— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:933-941 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2981-2989 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:933` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:642— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:642-650 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:170-178 — 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 `broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:642` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1185— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1185-1193 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2170-2178 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1920— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1920-1929 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2094-2102 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1920` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2077— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2077-2087 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2777-2785 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2077` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3396— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3396-3404 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3423-3431 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3396` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:332— broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:332-340 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:429-437 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:332` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:459— broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:459-467 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:612-621 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:459` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:311— broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:311-319 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:301-309 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:302— broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:302-310 | tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportMetadataCommand.java:65-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:252— remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:252-260 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:304-312 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:39— remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:39-47 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:62-70 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:39` 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) client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:133— client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:133-141 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:161-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. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:133` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:73— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:73-81 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:77-85 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (9 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:403— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:403-411 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:416-424 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:403` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:420— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:420-428 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:521-529 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:420` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:536— client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:536-544 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:560-568 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:536` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:756— client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:756-764 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:797-805 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:756` 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) auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:442— auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:442-449 | auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:484-491 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/DefaultAuthorizationContextBuilder.java:442` 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) auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:131— auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:131-138 | auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:149-156 — 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 `auth/src/main/java/org/apache/rocketmq/auth/migration/AuthMigrator.java:131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:55— broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:55-62 | broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:137-144 — 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 `broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:241— broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:241-248 | broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:292-299 — 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 `broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:241` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:196— broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:196-203 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:210-217 — 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 `broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:196` 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) broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:240— broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:240-247 | broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:261-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:463— broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:463-470 | broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:152-159 — 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) broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:405— broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:405-412 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:461-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1240— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1240-1247 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:789-796 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1240` 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) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1278— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1278-1286 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2094-2101 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1278` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:248— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:248-255 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:762-769 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:395— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:395-402 | broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:414-421 — 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 `broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:146— broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:146-153 | broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:125-132 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:249— broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:249-256 | broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:363-370 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:594— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:594-602 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:673-680 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:594` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:615— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:615-622 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:696-703 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3302— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3302-3309 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3326-3333 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3302` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:117— broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:117-124 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:180-187 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:148— broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:148-155 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:195-202 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:300— broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:300-308 | broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:371-378 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:300` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:701— broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:701-708 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:755-763 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:413— broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:413-420 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:440-447 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:119— broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:119-126 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:723-730 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (8 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:242— remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:242-249 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:294-301 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java:242` 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) remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:210— remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:210-217 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:337-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 (6 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:128— auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:128-133 | auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:135-140 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:164— broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:164-169 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:179-184 — 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 `broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:164` 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) broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:453— broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:453-458 | broker/src/main/java/org/apache/rocketmq/broker/offset/LmqConsumerOffsetManager.java:140-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/config/v2/ConsumerOffsetManagerV2.java:453` 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) broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:74— broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:74-79 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:90-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 `broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.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) broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:327— broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:327-332 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:747-752 — 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 `broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:327` 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) broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:342— broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:342-347 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:309-314 — 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 `broker/src/main/java/org/apache/rocketmq/broker/failover/EscapeBridge.java:342` 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) broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:355— broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:355-360 | broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:402-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:355` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:204— broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:204-209 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:214-219 — 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 `broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:204` 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) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1357— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1357-1362 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3443-3448 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:661— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:661-667 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:159-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:661` 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) broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:701— broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:701-709 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java:126-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/pop/PopConsumerService.java:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:137— broker/src/main/java/org/apache/rocketmq/broker/processor/AckMessageProcessor.java:137-142 | broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:116-121 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. 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 (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:581— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:581-586 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:742-747 — 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) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1663— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1663-1668 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1701-1706 — 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) broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:325— broker/src/main/java/org/apache/rocketmq/broker/processor/ChangeInvisibleTimeProcessor.java:325-330 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:940-945 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:523— broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:523-528 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:546-551 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:523` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:301— broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:301-306 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:489-494 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (6 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java:235— broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java:235-240 | broker/src/main/java/org/apache/rocketmq/broker/transaction/AbstractTransactionalMessageCheckListener.java:62-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/transaction/rocksdb/TransactionalMessageRocksDBService.java:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java:324— remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java:324-329 | remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java:338-343 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.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.
Duplicated block (6 lines × 2) client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:50— client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:50-55 | client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:83-88 — 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 `client/src/main/java/org/apache/rocketmq/acl/common/AclSigner.java:50` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:380— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:380-385 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:295-300 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:380` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:413— client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:413-418 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:1408-1414 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:413` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:160— client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:160-165 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:202-208 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:559— client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:559-564 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:592-598 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:559` 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) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1162— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1162-1167 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:276-281 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
FileTooLong: impl/MQClientAPIImpl.java client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:0— FileTooLong — 2872 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: MQClientAPIImpl (275-3898). 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: processor/AdminBrokerProcessor.java broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:0— FileTooLong — 2728 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AdminBrokerProcessor (248-3656). 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: store/DefaultMessageStore.java store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:0— FileTooLong — 2055 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DefaultMessageStore (125-3286). 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: broker/BrokerController.java broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:0— FileTooLong — 1817 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: BrokerController (196-2825). 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: store/CommitLog.java store/src/main/java/org/apache/rocketmq/store/CommitLog.java:0— FileTooLong — 1606 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: CommitLog (77-2580). 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: admin/DefaultMQAdminExtImpl.java tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:0— FileTooLong — 1488 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQAdminExtImpl (130-2108). 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: timer/TimerMessageStore.java store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:0— FileTooLong — 1440 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: TimerMessageStore (79-2121). 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: producer/DefaultMQProducerImpl.java client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:0— FileTooLong — 1304 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DefaultMQProducerImpl (101-1895). 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: common/BrokerConfig.java common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java:0— FileTooLong — 1254 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: BrokerConfig (28-2557). 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: config/MessageStoreConfig.java store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java:0— FileTooLong — 1195 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MessageStoreConfig (27-2392). 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: out/BrokerOuterAPI.java broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:0— FileTooLong — 1166 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: BrokerOuterAPI (162-1633). 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: consumer/DefaultMQPushConsumerImpl.java client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java:0— FileTooLong — 1069 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultMQPushConsumerImpl (97-1601). 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: factory/MQClientInstance.java client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:0— FileTooLong — 1004 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: MQClientInstance (96-1540). 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: config/ProxyConfig.java proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java:0— FileTooLong — 864 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ProxyConfig (41-1621). 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: netty/NettyRemotingClient.java remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:0— FileTooLong — 841 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: NettyRemotingClient (98-1222). 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: consumer/DefaultLitePullConsumerImpl.java client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:0— FileTooLong — 836 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: DefaultLitePullConsumerImpl (79-1321). 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: routeinfo/RouteInfoManager.java namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:0— FileTooLong — 836 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: RouteInfoManager (68-1114). 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: store/ConsumeQueue.java store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:0— FileTooLong — 830 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ConsumeQueue (48-1284). 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: processor/PopMessageProcessor.java broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:0— FileTooLong — 816 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: PopMessageProcessor (102-1127). 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: queue/BatchConsumeQueue.java store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:0— FileTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: BatchConsumeQueue (46-1209). 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: kv/CompactionLog.java store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:0— FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: CompactionLog (71-1149). 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: dledger/DLedgerCommitLog.java store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:0— FileTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DLedgerCommitLog (62-1135). 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: logfile/DefaultMappedFile.java store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:0— FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DefaultMappedFile (64-1122). 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: admin/DefaultMQAdminExt.java tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExt.java:0— FileTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: DefaultMQAdminExt (83-1044). 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: processor/PullMessageProcessor.java broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java:0— FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: PullMessageProcessor (83-917). 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.
Duplicated block (10 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:85— auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:85-94 | auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:118-127 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authorization/manager/AuthorizationMetadataManagerImpl.java:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:146— broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:146-155 | broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:164-173 — 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 `broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:146` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:112— broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:112-121 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:222-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:112` 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) broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:438— broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:438-447 | broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:458-467 — 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 `broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:122— broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:122-131 | broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:142-151 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.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.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:398— broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:398-407 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:197-206 — 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 `broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:398` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:355— broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:355-364 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:416-425 — 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 `broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:355` 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) broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:366— broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:366-375 | broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:427-436 — 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 `broker/src/main/java/org/apache/rocketmq/broker/metrics/ConsumerLagCalculator.java:366` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1308— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1308-1317 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2068-2077 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:572— broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:572-581 | broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:599-608 — 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 `broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:572` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3246— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3246-3255 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3278-3287 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:3246` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:313— broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:313-323 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:419-428 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:167— broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java:167-176 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:341-350 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.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.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:389— broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:389-398 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:559-568 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:389` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:260— broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:260-269 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerStartup.java:377-386 — 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 `broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java:260` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:440— remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:440-449 | remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:489-498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java:440` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:49— remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:49-58 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:72-81 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:467— client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:467-476 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:622-631 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:467` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:100— client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:100-109 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalancePushImpl.java:182-191 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceLitePullImpl.java:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:660— client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:660-670 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:740-749 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:660` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:687— client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:687-696 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:773-782 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:687` 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) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:701— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:701-710 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1351-1360 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1691— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1691-1700 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1722-1731 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1691` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1748— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1748-1757 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1792-1801 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1748` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3157— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3157-3166 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3526-3535 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3157` 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) broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:64— broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:64-74 | broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:147-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 `broker/src/main/java/org/apache/rocketmq/broker/client/rebalance/RebalanceLockManager.java:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:432— broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:432-442 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java:770-780 — 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 `broker/src/main/java/org/apache/rocketmq/broker/subscription/SubscriptionGroupManager.java:432` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:194— broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:194-204 | broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:316-326 — 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 `broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingCleanService.java:194` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionForRetryMessageFilter.java:85— broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionForRetryMessageFilter.java:85-95 | broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionMessageFilter.java:148-158 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/filter/ExpressionForRetryMessageFilter.java:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java:125— broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java:125-135 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java:367-377 — 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 `broker/src/main/java/org/apache/rocketmq/broker/latency/BrokerFastFailure.java:125` 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) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:815— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:815-825 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3107-3117 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:815` 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) broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:102— broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:102-112 | broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:158-168 — 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 `broker/src/main/java/org/apache/rocketmq/broker/pop/orderly/QueueLevelConsumerManager.java:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1080— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1080-1090 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:270-281 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1080` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:419— broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:419-430 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:584-594 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:419` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:476— broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:476-486 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:629-640 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:476` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:121— broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:121-131 | broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:167-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/QueryMessageProcessor.java:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1982— broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1982-1992 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:85-95 — 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 `broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1982` 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 (11 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:235— remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:235-245 | remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:251-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:235` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:123— remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/PullMessageRequestHeader.java:123-133 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageResponseHeader.java:62-72 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:106— client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:106-116 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:87-97 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:106` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:71— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:71-81 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:71-81 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (11 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:1062— client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:1062-1072 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:252-262 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java:1062` 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) client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:530— client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:530-540 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:566-576 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:530` 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) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1746— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1746-1756 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1956-1966 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1746` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1909— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1909-1919 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1931-1941 — 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 (11 lines × 2) client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:80— client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:80-90 | client/src/main/java/org/apache/rocketmq/client/producer/ProduceAccumulator.java:127-137 — 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 (11 lines × 2) controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java:202— controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java:202-212 | controller/src/main/java/org/apache/rocketmq/controller/impl/JRaftControllerStateMachine.java:204-214 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `controller/src/main/java/org/apache/rocketmq/controller/impl/DLedgerController.java:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) example/src/main/java/org/apache/rocketmq/example/operation/Consumer.java:99— example/src/main/java/org/apache/rocketmq/example/operation/Consumer.java:99-109 | example/src/main/java/org/apache/rocketmq/example/operation/Producer.java:97-107 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `example/src/main/java/org/apache/rocketmq/example/operation/Consumer.java:99` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:42— example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:42-52 | example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssignWithSubExpression.java:49-59 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:170— proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:170-180 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.java:205-215 — 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 `proxy/src/main/java/org/apache/rocketmq/proxy/remoting/channel/RemotingChannel.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.
Duplicated block (5 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java:63— broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java:63-67 | broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.java:78-82 — 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 `broker/src/main/java/org/apache/rocketmq/broker/lite/RocksDBLiteLifecycleManager.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 (5 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java:217— broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java:217-221 | broker/src/main/java/org/apache/rocketmq/broker/transaction/queue/DefaultTransactionalMessageCheckListener.java:65-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note 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 (5 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:126— broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:126-130 | broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:255-259 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/DefaultPullMessageResultHandler.java:126` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:302— broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:302-306 | broker/src/main/java/org/apache/rocketmq/broker/processor/RecallMessageProcessor.java:163-168 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:86— broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:86-90 | broker/src/main/java/org/apache/rocketmq/broker/processor/PollingInfoProcessor.java:61-65 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:86` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:674— broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:674-678 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java:730-734 — 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) broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:313— broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:313-317 | broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java:609-613 — 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) broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1283— broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1283-1287 | broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:1290-1294 — 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) remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java:70— remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java:70-75 | client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:1212-1216 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/rpc/ClientMetadata.java:70` 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 (5 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:809— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:809-813 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:846-850 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:809` 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) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1151— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1151-1155 | proxy/src/main/java/org/apache/rocketmq/proxy/service/message/LocalMessageService.java:257-261 — 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) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3268— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3268-3274 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3311-3315 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3268` 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) client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java:59— client/src/main/java/org/apache/rocketmq/client/trace/hook/EndTransactionOpenTracingHookImpl.java:59-63 | client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageOpenTracingHookImpl.java:59-63 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (5 lines × 2) common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java:69— common/src/main/java/org/apache/rocketmq/common/message/MessageQueue.java:69-73 | common/src/main/java/org/apache/rocketmq/common/message/MessageQueueForC.java:62-66 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (5 lines × 2) controller/src/main/java/org/apache/rocketmq/controller/impl/event/ListEventSerializer.java:56— controller/src/main/java/org/apache/rocketmq/controller/impl/event/ListEventSerializer.java:56-60 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/ReplicasInfoManager.java:611-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 `controller/src/main/java/org/apache/rocketmq/controller/impl/event/ListEventSerializer.java:56` 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) controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:78— controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:78-82 | controller/src/main/java/org/apache/rocketmq/controller/impl/manager/RaftReplicasInfoManager.java:116-120 — 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 `controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/DefaultBrokerHeartbeatManager.java:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (5 lines × 2) example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:93— example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:93-97 | example/src/main/java/org/apache/rocketmq/example/simple/PopConsumer.java:57-61 — 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 `example/src/main/java/org/apache/rocketmq/example/lmq/LMQPushPopConsumer.java:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:33— example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:33-37 | example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssignWithSubExpression.java:35-39 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `example/src/main/java/org/apache/rocketmq/example/simple/LitePullConsumerAssign.java:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (5 lines × 2) filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:548— filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:548-552 | filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:562-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `filter/src/main/java/org/apache/rocketmq/filter/expression/ComparisonExpression.java:548` 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) proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java:190— proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java:190-194 | proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/producer/SendMessageActivity.java:374-378 — 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 `proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/AckMessageActivity.java:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:395— store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:395-399 | store/src/main/java/org/apache/rocketmq/store/ha/DefaultHAService.java:234-238 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java:395` 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) store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:970— store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:970-974 | store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:999-1003 — 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 `store/src/main/java/org/apache/rocketmq/store/logfile/DefaultMappedFile.java:970` 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) store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java:338— store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java:338-342 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:776-780 — 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) store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:265— store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:265-269 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1267-1271 — 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 `store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:265` 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) store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:483— store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:483-487 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:804-809 — 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 `store/src/main/java/org/apache/rocketmq/store/timer/rocksdb/TimerMessageRocksDBStore.java:483` 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) auth/src/main/java/org/apache/rocketmq/auth/authentication/context/AuthenticationContext.java:49— auth/src/main/java/org/apache/rocketmq/auth/authentication/context/AuthenticationContext.java:49-60 | auth/src/main/java/org/apache/rocketmq/auth/authorization/context/AuthorizationContext.java:33-44 — 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 `auth/src/main/java/org/apache/rocketmq/auth/authentication/context/AuthenticationContext.java:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/authentication/factory/AuthenticationFactory.java:140— auth/src/main/java/org/apache/rocketmq/auth/authentication/factory/AuthenticationFactory.java:140-151 | auth/src/main/java/org/apache/rocketmq/auth/authorization/factory/AuthorizationFactory.java:143-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 `auth/src/main/java/org/apache/rocketmq/auth/authentication/factory/AuthenticationFactory.java:140` 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) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1061— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1061-1072 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1100-1112 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1061` 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 (12 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1026— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1026-1037 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1056-1067 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1026` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2150— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2150-2161 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2206-2217 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:2150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:98— broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:98-113 | broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java:175-186 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.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 (12 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2008— broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2008-2019 | container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java:111-122 — 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 `broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java:2008` 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) remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:144— remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:144-155 | remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingHelper.java:162-173 — 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 (12 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java:232— remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java:232-243 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/MultiProtocolTlsHelper.java:103-114 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/netty/TlsHelper.java:232` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:82— client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:82-93 | client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java:63-74 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/consumer/store/LocalFileOffsetStore.java:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:212— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:212-223 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:201-212 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:212` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:366— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:366-377 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:281-292 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:366` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:444— client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:444-456 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:564-575 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:444` 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) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2227— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2227-2238 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2247-2258 — 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 (12 lines × 2) example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageProducer.java:32— example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageProducer.java:32-43 | example/src/main/java/org/apache/rocketmq/example/schedule/TimerMessageProducer.java:34-49 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageProducer.java:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:828— namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:828-839 | namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:861-872 — 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 `namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java:828` 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) store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1124— store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1124-1135 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:1185-1196 — 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 `store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:1124` 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) store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:921— store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:921-932 | store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:1048-1059 — 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 `store/src/main/java/org/apache/rocketmq/store/timer/TimerMessageStore.java:921` 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) store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1036— store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1036-1047 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1197-1208 — 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 (12 lines × 2) store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1135— store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1135-1146 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1291-1303 — 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 `store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1135` 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) tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:121— tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:121-132 | tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:188-200 — 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 `tools/src/main/java/org/apache/rocketmq/tools/command/cluster/ClusterListSubCommand.java:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:54— auth/src/main/java/org/apache/rocketmq/auth/authentication/provider/LocalAuthenticationMetadataProvider.java:54-67 | auth/src/main/java/org/apache/rocketmq/auth/authorization/provider/LocalAuthorizationMetadataProvider.java:59-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:310— broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:310-323 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:274-286 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:310` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:87— broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:87-99 | broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLongPollingService.java:107-119 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/longpolling/PopLiteLongPollingService.java:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:954— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:954-966 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3003-3015 — 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 (13 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:986— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:986-998 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3035-3047 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:986` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1955— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1955-1967 | proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/ConsumerManagerActivity.java:116-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1955` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:288— broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:288-300 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:1003-1015 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:1003` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:232— client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:232-244 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java:503-515 — 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 (13 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:544— client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:544-556 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:580-592 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:544` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1663— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1663-1678 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1724-1736 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1663` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1362— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1362-1374 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1395-1407 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2208— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2208-2220 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2291-2303 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2208` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2600— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2600-2612 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2648-2660 — 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 (13 lines × 2) common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:39— common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:39-51 | common/src/main/java/org/apache/rocketmq/common/compression/ZstdCompressor.java:39-51 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageConsumer.java:32— example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageConsumer.java:32-44 | example/src/main/java/org/apache/rocketmq/example/schedule/TimerMessageConsumer.java:34-46 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `example/src/main/java/org/apache/rocketmq/example/schedule/ScheduledMessageConsumer.java:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:334— store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:334-346 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:787-799 — 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 `store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:334` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:334— store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:334-346 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:355-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:334` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1418— tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1418-1430 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1509-1521 — 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 `tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1418` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:101— tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:101-113 | tools/src/main/java/org/apache/rocketmq/tools/command/auth/ListUserSubCommand.java:103-115 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/src/main/java/org/apache/rocketmq/tools/command/auth/GetUserSubCommand.java:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:108— tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:108-120 | tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerSubCommand.java:92-104 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/src/main/java/org/apache/rocketmq/tools/command/consumer/ConsumerStatusSubCommand.java:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1078— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1078-1091 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1115-1128 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1078` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:230— remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:230-243 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:252-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 `remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:271— remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:271-284 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:293-306 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumerRunningInfo.java:271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:255— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:255-268 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:234-247 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:255` 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) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1633— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1633-1646 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1693-1706 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1633` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2342— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2342-2356 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2371-2384 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:71— common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:71-84 | common/src/main/java/org/apache/rocketmq/common/compression/ZstdCompressor.java:71-84 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `common/src/main/java/org/apache/rocketmq/common/compression/Lz4Compressor.java:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:76— common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:76-89 | common/src/main/java/org/apache/rocketmq/common/UtilAll.java:381-394 — 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 `common/src/main/java/org/apache/rocketmq/common/compression/ZlibCompressor.java:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java:280— store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java:280-293 | store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAConnection.java:734-747 — 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 (14 lines × 2) store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:285— store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:285-298 | store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:1886-1899 — 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 `store/src/main/java/org/apache/rocketmq/store/kv/CompactionLog.java:285` 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) store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:542— store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:542-555 | store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java:757-771 — 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 `store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java:542` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) store/src/main/java/org/apache/rocketmq/store/CommitLog.java:424— store/src/main/java/org/apache/rocketmq/store/CommitLog.java:424-437 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:897-911 — 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 `store/src/main/java/org/apache/rocketmq/store/CommitLog.java:424` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1772— store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1772-1785 | store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1878-1891 — 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 `store/src/main/java/org/apache/rocketmq/store/CommitLog.java:1772` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:343— tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:343-356 | tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:1119-1132 — 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 `tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:343` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java:63— tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.java:63-76 | tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/WipeWritePermSubCommand.java:65-79 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/AddWritePermSubCommand.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 (14 lines × 2) tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:49— tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:49-62 | tools/src/main/java/org/apache/rocketmq/tools/command/offset/SkipAccumulationSubCommand.java:88-101 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeOldCommand.java:49` 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) broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java:263— broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java:263-269 | broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java:110-116 | broker/src/main/java/org/apache/rocketmq/broker/processor/ConsumerManageProcessor.java:207-213 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/topic/TopicQueueMappingManager.java:263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:493— broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:493-499 | broker/src/main/java/org/apache/rocketmq/broker/metrics/PopMetricsManager.java:80-86 | remoting/src/main/java/org/apache/rocketmq/remoting/metrics/RemotingMetricsManager.java:77-83 — 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 `broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java:493` 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 × 3) broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1003— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1003-1009 | broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1044-1050 | container/src/main/java/org/apache/rocketmq/container/BrokerContainerProcessor.java:243-250 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:1003` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:144— broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:144-150 | broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:180-186 | broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:228-234 — 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 `broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java:144` 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) broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:190— broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:190-196 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:457-463 | broker/src/main/java/org/apache/rocketmq/broker/processor/PopMessageProcessor.java:610-616 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/processor/PeekMessageProcessor.java:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1655— client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1655-1661 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1716-1722 | client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:1786-1792 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) example/src/main/java/org/apache/rocketmq/example/broadcast/PushConsumer.java:47— example/src/main/java/org/apache/rocketmq/example/broadcast/PushConsumer.java:47-54 | example/src/main/java/org/apache/rocketmq/example/tracemessage/OpenTracingPushConsumer.java:50-56 | example/src/main/java/org/apache/rocketmq/example/tracemessage/TracePushConsumer.java:42-48 — 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 `example/src/main/java/org/apache/rocketmq/example/broadcast/PushConsumer.java:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:94— filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:94-100 | filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:116-122 | filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:135-141 — 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 `filter/src/main/java/org/apache/rocketmq/filter/util/BitsArray.java:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:36— proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:36-42 | proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:53-59 | proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:71-77 — 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 `proxy/src/main/java/org/apache/rocketmq/proxy/service/route/ProxyTopicRouteData.java:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:467— store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:467-473 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:489-495 | store/src/main/java/org/apache/rocketmq/store/stats/BrokerStatsManager.java:500-506 — 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 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.
Hotspot: broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java— broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java changed 2 times in last 90 days, max complexity 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: store/src/main/java/org/apache/rocketmq/store/CommitLog.java store/src/main/java/org/apache/rocketmq/store/CommitLog.java— store/src/main/java/org/apache/rocketmq/store/CommitLog.java changed 4 times in last 90 days, max complexity 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java— tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreDispatcherImpl.java changed 3 times in last 90 days, max complexity 32. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java— tieredstore/src/main/java/org/apache/rocketmq/tieredstore/TieredMessageStore.java changed 4 times in last 90 days, max complexity 16. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java— broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java changed 3 times in last 90 days, max complexity 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java— tieredstore/src/main/java/org/apache/rocketmq/tieredstore/file/FlatMessageFile.java changed 4 times in last 90 days, max complexity 15. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java— store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java changed 2 times in last 90 days, max complexity 29. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java— broker/src/main/java/org/apache/rocketmq/broker/processor/NotificationProcessor.java changed 2 times in last 90 days, max complexity 23. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java— proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/consumer/ReceiveMessageActivity.java changed 2 times in last 90 days, max complexity 18. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Duplicated block (15 lines × 2) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1565— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1565-1579 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1089-1103 — 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 `broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:1565` 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) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:154— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:154-168 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopConcurrentlyService.java:138-152 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.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.
Duplicated block (15 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:165— client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:165-179 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessagePopOrderlyService.java:157-171 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.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.
Duplicated block (15 lines × 2) client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:487— client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:487-503 | client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:649-663 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/consumer/RebalanceImpl.java:487` 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) client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:246— client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:246-260 | client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:271-285 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPIExt.java:246` 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) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1122— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1122-1136 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1241-1255 — 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 `client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1122` 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) common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:96— common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:96-110 | common/src/main/java/org/apache/rocketmq/common/stats/StatsItemSet.java:51-65 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `common/src/main/java/org/apache/rocketmq/common/stats/StatsItem.java:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java:115— tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java:115-129 | tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/FileSegmentInputStream.java:155-169 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tieredstore/src/main/java/org/apache/rocketmq/tieredstore/stream/CommitLogInputStream.java:115` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:97— broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:97-107 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBSubscriptionGroupManager.java:113-122 | broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBTopicConfigManager.java:95-106 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `broker/src/main/java/org/apache/rocketmq/broker/config/v1/RocksDBConsumerOffsetManager.java:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:434— broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:434-445 | broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java:633-643 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:3410-3419 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 3) remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:214— remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:214-223 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:245-254 | remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:272-281 — 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 `remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/ExtraInfoUtil.java:214` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1954— client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1954-1964 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:1992-2001 | client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java:2010-2019 — 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 3) common/src/main/java/org/apache/rocketmq/common/consumer/ReceiptHandle.java:87— common/src/main/java/org/apache/rocketmq/common/consumer/ReceiptHandle.java:87-96 | controller/src/main/java/org/apache/rocketmq/controller/impl/heartbeat/BrokerLiveInfo.java:52-61 | proxy/src/main/java/org/apache/rocketmq/proxy/service/sysmessage/HeartbeatSyncerData.java:50-59 — 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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (10 lines × 3) store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:162— store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:162-171 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:290-299 | store/src/main/java/org/apache/rocketmq/store/rocksdb/RocksDBOptionsFactory.java:341-350 — all 3 copies are in the same file, so extract the block into one function there and call i...
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.