Public report — qmq, published 4 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
116findings with an exact file:lineof 131 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
38/97dimensions across the health lenses8410 LoC · 1 projects — 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.
qunarcorp/qmq is sound in substance but carries real gaps (52%). It is not in crisis, but the issues below raise the cost of changing it — friction its consumers ultimately inherit.
It is strongest in Event Sourcing (100%) — its event log is trustworthy to replay. Architecture (79%) is solid too.
The area that most needs attention is Readiness (38%) — 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. Maturity (54%) is the next concern — onboarding is slow — key decisions and the architecture aren't written down, so contributors have to reverse-engineer the intent.
Leadership focus, highest impact first: SAST step to CI running what this repository's stack ships (Security & performance tooling); Document RTO/RPO and a tested restore procedure (a backup… (DR & Backup); Nothing pauses a release for a human (Deployment & Rollback).
For scale: Small (~8,410 production lines); rebuilding it from scratch would take roughly ~0.1 person-years (~1 engineer). Approximate, ±~30%.
It builds on a genuinely strong Event Sourcing 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.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
This codebase represents roughly ~0.1 person-years of build effort (about ~€11,000 to rebuild). Its weakest lens is Readiness at 38% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.1) — library/CLI, CQRS × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source. 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
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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.
Value concentrated against a weak lens · High · Value at risk
This is a Small asset (~0.1 person-years to rebuild), and its weakest lens is Readiness 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 Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Architecture — module dependency matrix
145 modules, 447 dependencies — 6 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
9
High / Critical
A06:2021 — Vulnerable & Outdated Components
2
High / Critical
Roadmap
First, integrate a static security scan into the CI pipeline to fail the build on vulnerabilities. Next, document disaster recovery procedures and tested restore steps to ensure data resilience. Then, add a manual approval gate to prevent bad builds from being released. Additionally, maintain a changelog to track release history. Finally, ensure the test suite runs in CI to gate merges on passing tests.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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.
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).
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. 37 of 38 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 1 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.6 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 38 dimensions across the health lenses
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, 116 of 131 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.
D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
D24 Comment Value — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
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.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
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").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and the advisory database — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS 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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (2): 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.
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.
+ 19 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 DefaultStorage.pollFromConsumerLog (cognitive 40) finding(s) in Cognitive Complexity — start with DefaultStorage.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 DelayMessageLogVisitor.readOneRecord (cognitive 38) finding(s) in Cognitive Complexity — start with DelayMessageLogVisitor.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 MessageStoreWrapper.doFindUnAckMessages (cognitive 38) finding(s) in Cognitive Complexity — start with MessageStoreWrapper.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 Classes9.5 / 10Exemplary✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
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.
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
✓ On the Gold path — maintain.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
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: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
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.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
Resolve the 9 EmptyCatchBlock finding(s) in Explicit Debt — start with ProducerMessageImpl.cs (2), MetainfoAddressResolver.cs, NewQmqClient.cs. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 10 Dead code finding(s) in Explicit Debt — start with InputStream.cs (3), BlockMessageException.cs, MetainfoClient.cs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 4 TodoComment finding(s) in Explicit Debt — start with NewQmqCluster.cs, AckHandlerQueue.cs, PullMessageDataTransformer.cs. — One of this dimension's main actionable groups (4 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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 · ×3.github/workflows/deploy.yml:12detected by semgrep finding
Medium: no-direct-response-writer · ×6qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/MetaManagementServlet.java:50detected by semgrep finding
What to do
Resolve the 6 Medium finding(s) in Static Analysis (SAST) — start with MetaManagementServlet.java (2), OnOfflineServlet.java (2), SlaveServerAddressSupplierServlet.java. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 3 High finding(s) in Static Analysis (SAST) — start with deploy.yml (3). — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependencies have known published vulnerabilities (CVEs), direct or transitive.
Method: NuGet CVE scan via dotnet list package --vulnerable including transitive; severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer. Exhaustive, deterministic; degrades when absent.
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.
36 of 36 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is clients/csharp/qmqclient/Util/Crc32.cs.
Dormant codebase
Largest orphaned fileclients/csharp/qmqclient/Util/Crc32.cs
What to do
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Largest orphaned file finding(s) in Knowledge Freshness — start with Crc32.cs. — 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 Workflow token permissions not restricted 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 — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code — check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
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 · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface member counts; fat-interface threshold (over 15 members) flagged per type. Deterministic, type-level.
`Message` declares 31 members. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Message.cs:7
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether the event-sourcing replay fold reconstructs state purely from the event (no wall clock, UUID or randomness) so replay is reproducible.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether persisted events stay immutable (never rewritten in place).
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×3) — PacketInputStream.cs:82, PacketInputStream.cs:87, PacketInputStream.cs:92
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
`Write` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — PacketInputStream.cs:90
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×6) — ClientId.cs:37, ClientId.cs:40, ClientId.cs:44, …
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 1 of 1 project(s) that lack one — worth up to 2 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.
Do you agree with this assessment?
P1 · CI/CD gates6.5 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Check the coverage dimensions first: if this repo has no test suite yet, that is the finding and this row follows from it. If a suite does exist, make the runner step explicit so the gate is unambiguous.
A CI pipeline exists but no build/compile step was matched — changes may merge without being compiled. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
What to do
Run the test suite in CI via an explicit runner step (`mvn test` for the toolchain this pipeline already uses) and gate merges on it.
Add an explicit build/compile step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is compiled before merge.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step.
What to do
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×9) — MetainfoAddressResolver.cs:59, NewQmqClient.cs:33, ProducerMessageImpl.cs:131, …
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. Deterministic.
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 — 59 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D10 Test Quality — ~862 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 — no packages were read
D16 Bus Factor — dormant codebase — no living knowledge left to concentrate
D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .erl, .hrl, .java, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D19 Documentation Quality — LLM evaluation failed
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 — At only 64k LoC in a single project the codebase is trivially small despite the absence of declared bounded contexts.
D24 Comment Value — LLM evaluation failed
D25 ADR Conformance — no ADRs to check
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.
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 — The target did not build, so no IL was available to measure.
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.
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is mostly .erl, .hrl, .java, which this pass does not read, so cohesion was not assessed for this repository. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.java) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 225 value object(s); a JPA/Axon/DDD domain-annotation stack (@Entity/@Aggregate/@Embeddable)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this check looks for (1 CQRS handler(s))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
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 is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF3 Async & latency hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X2 Cancellation propagation — no async methods found
X5 Nullable reference types — no NRT-eligible projects
X6 Hand-rolled structured-format parsing — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
X7 Silent fallback defaults — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
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.
EmptyCatchBlock clients/csharp/qmqclient/Metainfo/MetainfoAddressResolver.cs:59— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/NewQmq/NewQmqClient.cs:33— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/ProducerMessageImpl.cs:131— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/ProducerMessageImpl.cs:143— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/Transport/QueueSender.cs:76— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/Transport/SingleEventLoop.cs:31— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/Transport/TransportClient.cs:273— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/Util/BatchExecutor.cs:76— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
EmptyCatchBlock clients/csharp/qmqclient/Util/Scheduler.cs:51— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Narrow the catch to the exception you actually expect, record it through whatever this codebase already uses to report problems, or — where swallowing really is correct, as it often is on a teardown/dispose path where throwing would mask the original failure — write down WHY in a comment on the catch. The comment has to give the reason: a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all and leaves this row in place. Any of the three makes the decision reviewable; all three clear this row.
High: github-actions-mutable-action-tag .github/workflows/deploy.yml:12— 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/deploy.yml:14— 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@v3`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/deploy.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/setup-java@<40-character SHA>`. This step references `actions/setup-java@v3`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v3 --jq .sha`.
Dead code: BlockMessageException clients/csharp/qmqclient/Exceptions/BlockMessageException.cs:3— NamedType BlockMessageException — no references found in solution.
Dead code: InitLenBuffer clients/csharp/qmqclient/Metainfo/MetainfoClient.cs:253— Method InitLenBuffer — no references found in solution.
Dead code: ACKMessage clients/csharp/qmqclient/Model/ACKMessage.cs:5— NamedType ACKMessage — no references found in solution.
Dead code: HandlerMismatchException clients/csharp/qmqclient/Model/HandlerMismatchException.cs:6— NamedType HandlerMismatchException — no references found in solution.
Dead code: QueryRequest clients/csharp/qmqclient/Model/QueryRequest.cs:5— NamedType QueryRequest — no references found in solution.
Dead code: ChannelContext clients/csharp/qmqclient/Transport/ChannelContext.cs:5— NamedType ChannelContext — no references found in solution.
Dead code: MarkWriterIndex clients/csharp/qmqclient/Transport/InputStream.cs:7— Method MarkWriterIndex — no references found in solution.
Dead code: ResetWriterIndex clients/csharp/qmqclient/Transport/InputStream.cs:9— Method ResetWriterIndex — no references found in solution.
Dead code: Limit clients/csharp/qmqclient/Transport/InputStream.cs:15— Method Limit — no references found in solution.
Dead code: ConcurrentPriorityQueue clients/csharp/qmqclient/Util/ConcurrentPriorityQueue.cs:11— NamedType ConcurrentPriorityQueue — no references found in solution.
Duplicated block (11 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:110— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:110-120 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageContentBatchBackup.java:102-112 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:110` it begins part-way through the construct above it, so those exact lines 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:84— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:84-94 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:104-114 — both copies are in the same file, so extract the 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:134— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:134-144 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:162-172 — both copies are in the same file, so extract the 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:134` it begins part-way through the construct above it, so those 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/AbstractHBaseMessageStore.java:68— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/AbstractHBaseMessageStore.java:68-78 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseDeadMessageContentStore.java:98-108 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/AbstractHBaseMessageStore.java:68` it begins part-way through the construct above it, so those exact lines 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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/receiver/ReceivedDelayMessageProcessor.java:56— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/receiver/ReceivedDelayMessageProcessor.java:56-66 | qmq-server/src/main/java/qunar/tc/qmq/processor/SendMessageProcessor.java:72-82 — 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 `qmq-server/src/main/java/qunar/tc/qmq/processor/SendMessageProcessor.java:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/DispatchLogSegmentContainer.java:57— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/DispatchLogSegmentContainer.java:57-67 | qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/ScheduleSetSegmentContainer.java:52-62 — 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 `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/DispatchLogSegmentContainer.java:57` 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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:357— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:357-367 | qmq-store/src/main/java/qunar/tc/qmq/store/ActionLog.java:189-199 — 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 `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:357` 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) qmq-store/src/main/java/qunar/tc/qmq/store/ActionLog.java:53— qmq-store/src/main/java/qunar/tc/qmq/store/ActionLog.java:53-63 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLog.java:82-92 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (11 lines × 2) qmq-store/src/main/java/qunar/tc/qmq/store/IndexLogVisitor.java:63— qmq-store/src/main/java/qunar/tc/qmq/store/IndexLogVisitor.java:63-73 | qmq-store/src/main/java/qunar/tc/qmq/store/IndexLogVisitor.java:76-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:120— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:120-127 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:177— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:177-184 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:202-209 — both copies are in the same file, so extract the 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageServiceImpl.java:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:172— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:172-179 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:211-218 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:172` it begins part-way through the construct above it, so those exact lines 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseIndexStore.java:80— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseIndexStore.java:80-87 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseStore.java:65-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.
Duplicated block (8 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:171— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:171-178 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:181-188 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:171` it begins part-way through the construct above it, so those exact lines 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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/receiver/ReceivedDelayMessageProcessor.java:90— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/receiver/ReceivedDelayMessageProcessor.java:90-97 | qmq-server/src/main/java/qunar/tc/qmq/processor/SendMessageProcessor.java:103-110 — 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) qmq-gateway/src/main/java/qunar/tc/qmq/gateway/servlet/SendServlet.java:166— qmq-gateway/src/main/java/qunar/tc/qmq/gateway/servlet/SendServlet.java:166-173 | qmq-gateway/src/main/java/qunar/tc/qmq/gateway/servlet/SendServlet.java:181-188 — both copies are in the same file, so extract the 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 `qmq-gateway/src/main/java/qunar/tc/qmq/gateway/servlet/SendServlet.java:166` it begins part-way through the construct above it, so those exact lines 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) qmq-store/src/main/java/qunar/tc/qmq/store/ActionLogVisitor.java:58— qmq-store/src/main/java/qunar/tc/qmq/store/ActionLogVisitor.java:58-65 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLogRecordVisitor.java:54-61 — 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 `qmq-store/src/main/java/qunar/tc/qmq/store/ActionLogVisitor.java:58` it begins part-way through the construct above it, so those 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageIndexBatchBackup.java:69— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageIndexBatchBackup.java:69-75 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:112-118 — 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:113— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:113-119 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:116-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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:191— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:191-197 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:230-236 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:191` it begins part-way through the construct above it, so those exact lines 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:214— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:214-220 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:253-259 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.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. 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) qmq-client/src/main/java/qunar/tc/qmq/producer/ProduceMessageImpl.java:149— qmq-client/src/main/java/qunar/tc/qmq/producer/ProduceMessageImpl.java:149-155 | qmq-client/src/main/java/qunar/tc/qmq/producer/ProduceMessageImpl.java:193-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-client/src/main/java/qunar/tc/qmq/producer/ProduceMessageImpl.java:149` it begins part-way through the construct above it, so those exact lines 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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:311— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:311-317 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLog.java:263-269 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) qmq-tools/src/main/java/qunar/tc/qmq/tools/command/AddBrokerCommand.java:64— qmq-tools/src/main/java/qunar/tc/qmq/tools/command/AddBrokerCommand.java:64-70 | qmq-tools/src/main/java/qunar/tc/qmq/tools/command/ReplaceBrokerCommand.java:65-71 — 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:84— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:84-89 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageContentBatchBackup.java:72-77 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:123— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:123-128 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:126-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:82— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:82-87 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:89-94 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (6 lines × 2) qmq-server/src/main/java/qunar/tc/qmq/utils/HeaderSerializer.java:36— qmq-server/src/main/java/qunar/tc/qmq/utils/HeaderSerializer.java:36-45 | qmq-remoting/src/main/java/qunar/tc/qmq/netty/EncodeHandler.java:56-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.
Duplicated block (6 lines × 2) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:121— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:121-126 | qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:399-404 — both copies are in the same file, so extract the 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 `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:121` 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) qmq-tools/src/main/java/qunar/tc/qmq/tools/command/AddSubjectBrokerGroupCommand.java:51— qmq-tools/src/main/java/qunar/tc/qmq/tools/command/AddSubjectBrokerGroupCommand.java:51-56 | qmq-tools/src/main/java/qunar/tc/qmq/tools/command/RemoveSubjectBrokerGroupCommand.java:51-56 — 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) qmq-tools/src/main/java/qunar/tc/qmq/tools/command/MarkBrokerReadonlyCommand.java:52— qmq-tools/src/main/java/qunar/tc/qmq/tools/command/MarkBrokerReadonlyCommand.java:52-57 | qmq-tools/src/main/java/qunar/tc/qmq/tools/command/UnMarkBrokerReadonlyCommand.java:52-57 — 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.
Medium: no-direct-response-writer qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/MetaManagementServlet.java:50— Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: no-direct-response-writer qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/MetaManagementServlet.java:57— Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: no-direct-response-writer qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/OnOfflineServlet.java:73— Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: no-direct-response-writer qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/OnOfflineServlet.java:75— Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: no-direct-response-writer qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/SlaveServerAddressSupplierServlet.java:41— Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: no-direct-response-writer qmq-metaserver/src/main/java/qunar/tc/qmq/meta/web/SubjectConsumerServlet.java:59— Detected a request with potential user-input going into a OutputStream or Writer object. This bypasses any view or template environments, including HTML escaping, which may expose this application to cross-site scripting (XSS) vulnerabilities. Consider using a view technology such as JavaServer Faces (JSFs) which automatically escapes HTML views. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
TooManyMethods: QMon qmq-server-common/src/main/java/qunar/tc/qmq/monitor/QMon.java:32— TooManyMethods — 89 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: BaseMessage qmq-common/src/main/java/qunar/tc/qmq/base/BaseMessage.java:33— TooManyMethods — 62 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: CheckpointManager qmq-store/src/main/java/qunar/tc/qmq/store/CheckpointManager.java:40— TooManyMethods — 52 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultStorage qmq-store/src/main/java/qunar/tc/qmq/store/DefaultStorage.java:48— TooManyMethods — 42 methods. Most of these members implement store.Storage (31 of 40 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: BaseMessage clients/csharp/qmqclient/Model/BaseMessage.cs:0— TooManyMethods — 208 significant lines (blank, comment-only and punctuation-only lines excluded), 38 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: QMon qmq-delay-server/src/main/java/qunar/tc/qmq/delay/monitor/QMon.java:29— TooManyMethods — 33 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 (5 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:95— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:95-99 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageContentBatchBackup.java:92-96 — 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:206— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:206-210 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:245-249 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/RecordBatchBackup.java:206` it begins part-way through the construct above it, so those exact lines 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) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/AbstractHBaseMessageStore.java:61— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/AbstractHBaseMessageStore.java:61-65 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseDeadMessageContentStore.java:86-90 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/AbstractHBaseMessageStore.java:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:94— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:94-98 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:101-105 — 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) qmq-client/src/main/java/qunar/tc/qmq/consumer/pull/PullService.java:220— qmq-client/src/main/java/qunar/tc/qmq/consumer/pull/PullService.java:220-224 | qmq-remoting/src/main/java/qunar/tc/qmq/protocol/QMQSerializer.java:115-119 — 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 `qmq-client/src/main/java/qunar/tc/qmq/consumer/pull/PullService.java:220` it begins part-way through the construct above it, so those 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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:329— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/MessageSegmentContainer.java:329-333 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLog.java:280-284 — 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.
TodoComment clients/csharp/qmqclient/Cluster/NewQmqCluster.cs:66— // TODO(keli.wang): make timeout configable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment clients/csharp/qmqclient/NewQmq/AckHandlerQueue.cs:187— // TODO(keli.wang): when one ack delay and blocks many other acks, can we just make this one a nack? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment clients/csharp/qmqclient/NewQmq/PullMessageDataTransformer.cs:35— // TODO(keli.wang): return list of messages or a special object? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment clients/csharp/qmqclient/NewQmq/SendMessageDataTransformer.cs:21— // TODO(keli.wang): don't use request id here? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (9 lines × 2) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:158— qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:158-166 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileRecordStore.java:168-176 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:158` it begins part-way through the construct above it, so those exact lines 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) qmq-metaserver/src/main/java/qunar/tc/qmq/meta/management/AddBrokerAction.java:89— qmq-metaserver/src/main/java/qunar/tc/qmq/meta/management/AddBrokerAction.java:89-97 | qmq-metaserver/src/main/java/qunar/tc/qmq/meta/management/ReplaceBrokerAction.java:84-92 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (9 lines × 2) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:46— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:46-56 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLogRecordVisitor.java:37-45 — 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 `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:46` 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) qmq-store/src/main/java/qunar/tc/qmq/store/LogManager.java:65— qmq-store/src/main/java/qunar/tc/qmq/store/LogManager.java:65-73 | qmq-store/src/main/java/qunar/tc/qmq/store/SortedPullLogTable.java:215-223 — 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 `qmq-store/src/main/java/qunar/tc/qmq/store/LogManager.java:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:91— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:91-103 | qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:104-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:91` it begins part-way through the construct above it, so those 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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:112— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:112-124 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLogRecordVisitor.java:71-82 — 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 `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.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) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/DispatchLogSegmentContainer.java:71— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/DispatchLogSegmentContainer.java:71-80 | qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/ScheduleSetSegmentContainer.java:66-75 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/log/DispatchLogSegmentContainer.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.
Duplicated block (10 lines × 2) qmq-store/src/main/java/qunar/tc/qmq/store/DefaultStorage.java:623— qmq-store/src/main/java/qunar/tc/qmq/store/DefaultStorage.java:623-632 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLog.java:169-178 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-store/src/main/java/qunar/tc/qmq/store/DefaultStorage.java:623` it begins part-way through the construct above it, so those 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 × 3) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:100— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/DeadMessageBatchBackup.java:100-104 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/MessageIndexBatchBackup.java:77-81 | qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HFileIndexStore.java:120-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/BackupKeyGenerator.java:52— qmq-backup/src/main/java/qunar/tc/qmq/backup/service/BackupKeyGenerator.java:52-56 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/BackupKeyGenerator.java:64-68 | qmq-backup/src/main/java/qunar/tc/qmq/backup/service/BackupKeyGenerator.java:75-79 — 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 `qmq-backup/src/main/java/qunar/tc/qmq/backup/service/BackupKeyGenerator.java:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
DefaultStorage.pollFromConsumerLog (cyclomatic 21) qmq-store/src/main/java/qunar/tc/qmq/store/DefaultStorage.java:258— DefaultStorage.pollFromConsumerLog has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MessageStoreWrapper.doFindUnAckMessages (cyclomatic 20) qmq-server/src/main/java/qunar/tc/qmq/store/MessageStoreWrapper.java:279— MessageStoreWrapper.doFindUnAckMessages has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DelayMessageLogVisitor.readOneRecord (cyclomatic 16) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:45— DelayMessageLogVisitor.readOneRecord has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dormant codebase — no living knowledge left to concentrate — Every one of the 36 significant source file(s) was last meaningfully changed so long ago that no living knowledge remains, so there is no concentration to measure — the bus factor is not scored. This is not a clean bill: nobody currently holds working knowledge of this code (see D34 Knowledge Freshness).
LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.findings[0].suggestion | LineNumber: 0 | BytePositionInLine: 962.
DefaultStorage.pollFromConsumerLog (cognitive 40) qmq-store/src/main/java/qunar/tc/qmq/store/DefaultStorage.java:258— DefaultStorage.pollFromConsumerLog has cognitive complexity 40 (threshold 15). Drivers by points: if/else 37, boolean chains 1, loops 1, ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DelayMessageLogVisitor.readOneRecord (cognitive 38) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:45— DelayMessageLogVisitor.readOneRecord has cognitive complexity 38 (threshold 15). Drivers by points: if/else 38 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageStoreWrapper.doFindUnAckMessages (cognitive 38) qmq-server/src/main/java/qunar/tc/qmq/store/MessageStoreWrapper.java:279— MessageStoreWrapper.doFindUnAckMessages has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, boolean chains 3, error handling 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SocketChannel.Flush (cognitive 28) clients/csharp/qmqclient/Transport/SocketChannel.cs:146— SocketChannel.Flush has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MessageLogRecordVisitor.readOneRecord (cognitive 26) qmq-store/src/main/java/qunar/tc/qmq/store/MessageLogRecordVisitor.java:36— MessageLogRecordVisitor.readOneRecord has cognitive complexity 26 (threshold 15). Drivers by points: if/else 26 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MinBinaryHeap.Remove (cognitive 24) clients/csharp/qmqclient/Util/ConcurrentPriorityQueue.cs:288— MinBinaryHeap.Remove has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
NetworkUtils.getLocalAddress (cognitive 24) qmq-common/src/main/java/qunar/tc/qmq/utils/NetworkUtils.java:47— NetworkUtils.getLocalAddress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, loops 5, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IndexLog.copy (cognitive 23) qmq-store/src/main/java/qunar/tc/qmq/store/IndexLog.java:147— IndexLog.copy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageIndexSyncWorker.getSyncLog (cognitive 22) qmq-server/src/main/java/qunar/tc/qmq/sync/master/MessageIndexSyncWorker.java:51— MessageIndexSyncWorker.getSyncLog has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeightLoadBalance.select (cognitive 21) qmq-client/src/main/java/qunar/tc/qmq/consumer/pull/WeightLoadBalance.java:45— WeightLoadBalance.select has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 3, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SenderGroup.send (cognitive 21) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/sender/SenderGroup.java:120— SenderGroup.send has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 3, loops 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionSyncLogIterator.next (cognitive 20) qmq-backup/src/main/java/qunar/tc/qmq/backup/service/impl/ActionSyncLogIterator.java:64— ActionSyncLogIterator.next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SendServlet.appendAttrs (cognitive 20) qmq-gateway/src/main/java/qunar/tc/qmq/gateway/servlet/SendServlet.java:103— SendServlet.appendAttrs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActionLogVisitor.readOneRecord (cognitive 20) qmq-store/src/main/java/qunar/tc/qmq/store/ActionLogVisitor.java:42— ActionLogVisitor.readOneRecord has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, error handling 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultPullEntry.run (cognitive 19) qmq-client/src/main/java/qunar/tc/qmq/consumer/pull/DefaultPullEntry.java:109— DefaultPullEntry.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, error handling 5, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NettyConnectManageHandler.getOrCreateChannel (cognitive 19) qmq-remoting/src/main/java/qunar/tc/qmq/netty/client/NettyConnectManageHandler.java:78— NettyConnectManageHandler.getOrCreateChannel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SendMessageTask.processErrorMessages (cognitive 19) qmq-watchdog/src/main/java/qunar/tc/qmq/task/SendMessageTask.java:123— SendMessageTask.processErrorMessages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, error handling 5, ternaries 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PollBrokerLoadBalance.loadBalance (cognitive 18) qmq-common/src/main/java/qunar/tc/qmq/broker/impl/PollBrokerLoadBalance.java:48— PollBrokerLoadBalance.loadBalance has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 6, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeightLoadBalance.Select (cognitive 17) clients/csharp/qmqclient/NewQmq/WeightLoadBalance.cs:18— WeightLoadBalance.Select has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultPullConsumer.AsyncPull (cognitive 17) clients/csharp/qmqclient/Pull/DefaultPullConsumer.cs:127— DefaultPullConsumer.AsyncPull has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 141). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
HBaseRecordStore.findRecords (cognitive 17) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseRecordStore.java:73— HBaseRecordStore.findRecords has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
1.onLoad (cognitive 17) qmq-client/src/main/java/qunar/tc/qmq/config/PullSubjectsConfig.java:72— 1.onLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 5, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HBaseStore.scan (cognitive 16) qmq-backup/src/main/java/qunar/tc/qmq/backup/store/impl/HBaseStore.java:91— HBaseStore.scan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MetaInfoService.parseResponse (cognitive 16) qmq-remoting/src/main/java/qunar/tc/qmq/metainfoclient/MetaInfoService.java:188— MetaInfoService.parseResponse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, loops 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.notable[3].suggestion | LineNumber: 0 | BytePositionInLine: 935.
Medium CVE: System.Data.SqlClient 4.4.0 — System.Data.SqlClient 4.4.0 (transitive) has a Medium advisory. https://github.com/advisories/[GHSA redacted]
Unpinned build actions — CI references GitHub Actions by a floating ref (@main / @tag) rather than a pinned commit SHA, weakening build integrity. 3 floating ref(s) across 1 workflow file(s). Each floating ref is itemized at file:line by the SAST (D29) lens.
Workflow token permissions not restricted — No workflow declares a `permissions:` block, so every job runs with the repository's default GITHUB_TOKEN scope (1 workflow file(s) checked). On a repository whose default is read/write, a compromised action or a malicious pull request inherits write access to code, issues, releases and packages. Declare a least-privilege `permissions:` block — `permissions: {contents: read}` at the top of each workflow, widened per job only where a job genuinely writes.
Duplicated block (7 lines × 3) qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:66— qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:66-73 | qmq-store/src/main/java/qunar/tc/qmq/store/ActionLogVisitor.java:57-63 | qmq-store/src/main/java/qunar/tc/qmq/store/MessageLogRecordVisitor.java:53-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. Read the line range as the matched WINDOW rather than a finished unit: at `qmq-delay-server/src/main/java/qunar/tc/qmq/delay/store/visitor/DelayMessageLogVisitor.java:66` it begins part-way through the construct above it, so those 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.
Recommendation — 7 finding(s)
D11 · Test Reliability· Test reliability not included · ×1
Test reliability not included — Test source is present (.java) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
Dormant codebase — 36 of 36 significant files have no living knowledge — the codebase as a whole is dormant, not 36 separate risks. Re-engage owners or document before change.
D34 · Knowledge Freshness· Largest orphaned file · ×1
Largest orphaned file clients/csharp/qmqclient/Util/Crc32.cs— One of the largest files with no living knowledge remaining — a reasonable place to start a read-through before the aggregate risk above bites.
No build provenance — No SLSA provenance generation or build attestation found in CI — nothing binds a released artifact to the build that produced it, so a consumer cannot tell your artifact from a substituted one. Your release already signs its artifacts, so this is the remaining step rather than a new pipeline: attestation records HOW the artifact was built, which a signature over the finished file does not. On GitHub Actions, `actions/attest-build-provenance` (or slsa-github-generator) emits one from the job's own OIDC identity; elsewhere, run `cosign attest` over the released artifact from the release pipeline and publish the attestation beside it.
D36 · Supply-chain Provenance & Signing· No SBOM · ×1
No SBOM — No SBOM generation or committed SBOM found — produce one with what your ecosystem ships (the `cyclonedx-maven-plugin` bound to the package phase, `syft` (or `anchore/sbom-action` in CI) over the source tree or released image). Publish it as a release asset (`*.spdx.json` / `*.cdx.json`) so consumers can see what they are installing.
D38 · OSV Dependency Vulnerabilities· Scanner failed to run · ×1
Scanner failed to run — not a clean result — osv-scanner exited 128 with no findings — the advisory database was likely unreachable. The scanner exited non-zero and produced no findings (typically the advisory DB was unreachable), so this is reported as a measurement gap rather than a clean pass.
Coverage not included — suite not readable by the collector — Coverage NOT MEASURED: test source is present (.java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored.
Info — 2 finding(s)
D12 · Dependency Hygiene· Dependency hygiene not measured · ×1
Dependency hygiene not measured — no packages were read — This repository has NuGet-managed production source (.cs), whose `<PackageReference>` dependencies are exactly what this dimension assesses — but `dotnet list package` returned no packages, so there was nothing to assess. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED. This is a gap in the analysis run (restore or project-load failed), not a verdict about this repository. Dependencies declared for the other ecosystems present here (.erl, .hrl, .java) are not read yet either.
D22 · Internal API Consistency· No exposed public API · ×1
No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
trivy: not applicable — 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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
0
—
Run 019fce7a-6bc4-71b0-9f87-a18e71affc12 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 13 · Warnings: 109 · Recommendations: 7 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 04-08-2026 @ 20:32 UTC.
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.