Public report — arthas, published 5 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
493findings with an exact file:lineof 507 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
43/106dimensions across the health lenses88993 LoC — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
alibaba/arthas carries serious gaps (49%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.
It is strongest in Architecture (93%) — the structure is clean and changes stay contained. Maturity (75%) is solid too.
Most urgent: a critical security exposure was detected (see the Security & Compliance lens). Treat it as a priority regardless of the overall grade.
The area that most needs attention is Accessibility (44%) — it raises ongoing delivery and operational cost. Security (44%) is the next concern — exposure to security and compliance incidents is elevated.
Leadership focus, highest impact first: text alternative — alt on images (alt="" for purely decorative… (Text alternatives); Make custom controls keyboard-operable (role + tabindex + key handler) (Keyboard semantics); accessibility in the toolchain (A11y enforcement).
For scale: Medium (~88,993 production lines); rebuilding it from scratch would take roughly ~0.8 person-years (~1–2 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (93%); 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.
R7 · Dead file (~36 LoC) labs/arthas-jfr-frontend/src/services/jfr.ts
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.
0.7× (at 49% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
Dead frontend code
~2234 LoC unreachable (10 file(s)) — that slice of this estimate buys code with zero runtime value; deleting it is the cheapest win in this report (the R7 card lists every file)
This codebase represents roughly ~0.8 person-years of build effort (about ~€110,000 to rebuild). Its weakest lens is Accessibility at 44% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — CQRS × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
Value concentrated against a weak lens · High · Value at risk
This is a Medium asset (~0.8 person-years to rebuild), and its weakest lens is Accessibility at 44%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Accessibility first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 3.3–19.6 engineer-days every year, paid as drag on the ~32,749 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 2–37 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 4–9% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 8,075 line(s) changed over a 90-day window ⇒ ~32,749/year · D1/D2/D4 code quality: averaging 6.4/10 ⇒ a 4–9% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 37 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.4/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 4–9% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 6.4/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
176 modules, 404 dependencies — 7 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.)
At a glance — Code Health · 67% · Adequate · gated by D2
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
50
High / Critical
A06:2021 — Vulnerable & Outdated Components
50
High / Critical
A04:2021 — Insecure Design
25
High / Critical
A02:2021 — Cryptographic Failures
2
High / Critical
A05:2021 — Security Misconfiguration
2
High / Critical
Roadmap
Begin by adding text alternatives for all images, media, and video content to ensure non-visual access. Next, ensure all interactive elements and form controls are fully keyboard-operable and properly labeled, while also fixing structural page elements like language attributes and landmarks. Finally, enforce accessibility standards by integrating automated testing tools into your development workflow and continuous integration pipeline to prevent future regressions.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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. 42 of 43 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 — 43 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, 493 of 507 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.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Repo exclusion declarations: 4 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A clean result is "no unlabelled native control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
46 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ObjectView.renderObject at 90. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being TimeTunnelTool.normalizeAction at 25 — they are counted neither in the figure above nor in this dimension's score.
+ 40 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 draw (cyclomatic 36) finding(s) in Cyclomatic Complexity — start with flame-graph-core.js (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 ObjectView.renderObject (cyclomatic 90) finding(s) in Cyclomatic Complexity — start with ObjectView.java. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Bootstrap.main (cyclomatic 60) finding(s) in Cyclomatic Complexity — start with Bootstrap.java. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 125 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 draw (cognitive 78) finding(s) in Cognitive Complexity — start with flame-graph-core.js (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 1.run (cognitive 26) finding(s) in Cognitive Complexity — start with AdviceListenerManager.java (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 touch (cognitive 26) finding(s) in Cognitive Complexity — start with flame-graph-core.js (2). — One of this dimension's main actionable groups (2 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.8 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 21 TooManyMethods finding(s) in God Classes — start with ProcessImpl.java (2), Ansi.java, StringUtils.java. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 6 FileTooLong finding(s) in God Classes — start with ClassLoaderCommand.java, ClassLoaderMetaspaceCommand.java, ProfilerCommand.java. — One of this dimension's main actionable groups (6 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.9 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
34 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_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.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
Secret: generic-api-keytunnel-common/src/main/java/com/alibaba/arthas/tunnel/common/MethodConstants.java:31detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed
✓ On the Gold path — maintain.
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
High: github-actions-mutable-action-tag · ×50.github/workflows/auto-prettier.yaml:14detected by semgrep finding
What to do
Resolve the 50 High finding(s) in Static Analysis (SAST) — start with build-async-profiler.yml (15), build-vmtool.yaml (15), codeql-analysis.yml (4). — One of this dimension's main actionable groups (50 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
High IaC: DS-0002Dockerfiledetected by trivy finding
Medium IaC: CKV_DOCKER_3Dockerfile:1detected by trivy finding
✓ On the Gold path — maintain.
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D32 · Data Compliance (PII/GDPR)0.0 / 10Critical✓ Tool-verified
What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.
Method: Heuristic PII/GDPR pattern scan via semgrep across the repo, using Watchdog's own ruleset (personal data reaching log/console sinks, URLs and query strings, or unprotected browser storage); matches map to severity and a 0-10 wide normalizer. NotApplicable when the scan runs and detects no PII/GDPR surface (no unearned 10); reported LOUDLY as a measurement gap, never as not-applicable, if the ruleset is missing from the analyzer image. Exhaustive, advisory-leaning; degrades on parse failure.
High: watchdog-sensitive-personal-data-in-log · ×25arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/DefaultToolCallbackProvider.java:119detected by semgrep finding
What to do
Resolve the 25 High finding(s) in Data Compliance (PII/GDPR) — start with Enhancer.java (14), DefaultToolCallbackProvider.java (3), AdviceListenerManager.java (2). — One of this dimension's main actionable groups (25 issue-level).
Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
69 of 387 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx.
Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with Analysis.tsx, HttpApiHandler.java, MBeanCommand.java. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PR-triggered workflow without a permissions block finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.
Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.
High CVE: [GHSA redacted] · ×42labs/arthas-grpc-web-proxy/ui/package-lock.jsondetected by osv-scanner finding
Critical CVE: [GHSA redacted] · ×5labs/arthas-grpc-web-proxy/ui/package-lock.jsondetected by osv-scanner finding
High vulnerability: [GHSA redacted] · ×2labs/arthas-grpc-web-proxy/ui/package-lock.jsondetected by osv-scanner finding
Medium CVE: [GHSA redacted]labs/arthas-grpc-web-proxy/ui/package-lock.jsondetected by osv-scanner finding
What to do
Resolve the 42 High CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (32), yarn.lock (10). — One of this dimension's main actionable groups (42 issue-level).
Resolve the 5 Critical CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (4), yarn.lock. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 2 High vulnerability finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d38_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives4.3 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — Console.vue:90
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.7 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×20) — syspropView.vue:15, syspropView.vue:18, syspropView.vue:55, …
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — Analysis.tsx:739, Analysis.tsx:1043
This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — Analysis.tsx:769
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — InputDialog.vue:19, SwitchInput.vue:12
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — index.html:2
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×15) — index.html:2, index.html:2, agents.html:2, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — Process.vue:22, SelectCmd.vue:4
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
`.btn-disabled,.btn-disabled:hover,.btn[disabled],.btn[disabled]:hover` sets color: hsl(214 30% 32% / 1) on background-color: hsl(217 92% 10% / 1) — 2.2:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — main-c782b056.css:1
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
No accessibility enforcement found — no a11y linter (eslint-plugin-vuejs-accessibility) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time.
What to do
Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 22 of 35 project(s) that lack one — worth up to 1.3 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.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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.
Do you agree with this assessment?
R1 · Type Safety8.3 / 10Strong✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).
Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.
web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:21 · web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:20 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same names written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — consoleMachine.ts:21
labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:1021 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:1021 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — flame-graph-class.js:1021
labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:169 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:169 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — flame-graph-core.js:169
labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:396 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:478 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Analysis.tsx:396
web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:382 · web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:374 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — consoleMachine.ts:382
labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:471 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:471 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — flame-graph-core.js:471
web-ui/arthasWebConsole/all/ui/ui/src/router/routes.ts:45 · web-ui/arthasWebConsole/all/ui/ui/src/router/routes.ts:98 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — routes.ts:45
labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:136 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:474 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — vmtoolView.vue:136
What to do
Extract the duplicated blocks into shared functions/components.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×8) — Analysis.tsx:73, flame-graph-core.js:266, flame-graph-core.js:266, …
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files6.4 / 10Adequate✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
10 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: labs/arthas-grpc-web-proxy/ui/src/assets/proto/ArthasServices_pb.js (5318), labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx (1203), labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js (907), labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js (907), labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue (638), labs/arthas-grpc-web-proxy/ui/src/assets/proto/ArthasServices_grpc_web_pb.js (513) (+4 more).
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
0% of 109 production file(s) reachable from 0 test file(s) via the import graph
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D33 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D33). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling6.6 / 10Adequate✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✗ · lint ✓ · typecheck ✓
What to do
Add a test runner (vitest / jest / playwright) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code5.4 / 10Adequate✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
2 file(s) (~2 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/js/agents-b07f3b75.js imports './main-38ee3337.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here.
Unreachable from the 21 application, 12 tooling and 0 test entry point(s) detected in this repo. Gate removals on your build/type-check — an undetected custom entry would make these reachable.
no import path from any entry point (21 application, 12 tooling, 0 test roots considered) (×6) — flame-graph-class.js, flame-graph-core.js, flame-graph-component.js, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in labs/arthas-grpc-web-proxy/ui/package.json but never imported anywhere in that package or its workspace members — dead weight and attack surface. Verify against build tooling before removing.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Break each cycle by extracting the shared piece into a module both sides can import.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 63 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — no DI registrations detected
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~13573 lines of test source are present (.java) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Maven POM and package.json), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
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 — Production source is present (.java, .ts, .tsx) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Maven POM and package.json — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .java, .ts, .tsx, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.java) 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): 110 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 (32 CQRS handler(s))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
GD1 Unfinished & placeholder code — no source files
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — 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 — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
High: github-actions-mutable-action-tag .github/workflows/auto-prettier.yaml: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/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/auto-prettier.yaml: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: creyD/prettier_action@<40-character SHA>`. This step references `creyD/prettier_action@v4.3`; resolve the SHA it points at today with `gh api repos/creyD/prettier_action/commits/v4.3 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:17— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: run-shell-injection .github/workflows/build-async-profiler.yml:22— Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:24— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:44— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:55— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: run-shell-injection .github/workflows/build-async-profiler.yml:60— Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:63— 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: uraimo/run-on-arch-action@<40-character SHA>`. This step references `uraimo/run-on-arch-action@v2`; resolve the SHA it points at today with `gh api repos/uraimo/run-on-arch-action/commits/v2 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:99— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:110— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: run-shell-injection .github/workflows/build-async-profiler.yml:115— Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:118— 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: uraimo/run-on-arch-action@<40-character SHA>`. This step references `uraimo/run-on-arch-action@v2`; resolve the SHA it points at today with `gh api repos/uraimo/run-on-arch-action/commits/v2 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:139— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:153— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:155— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/download-artifact@<40-character SHA>`. This step references `actions/download-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/download-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-async-profiler.yml:175— 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: ad-m/github-push-action@<40-character SHA>`. This step references `ad-m/github-push-action@v0.8.0`; resolve the SHA it points at today with `gh api repos/ad-m/github-push-action/commits/v0.8.0 --jq .sha`. Note that `v0.8.0` is an exact release tag rather than a floating major: it is still mutable (a tag can be repointed), but by convention it moves only on a force-push, so pin the floating-major and branch references in this file first.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:10— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml: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/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:18— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:26— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:28— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:34— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:42— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/build-vmtool.yaml:44— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-java@<40-character SHA>`. This step references `actions/setup-java@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-java/commits/v4 --jq .sha`.
+ 25 more in this group — see findings.md.
D38 · OSV Dependency Vulnerabilities· High CVE · ×42
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— @babel/plugin-transform-modules-systemjs 7.22.5: [GHSA redacted] — @babel/plugin-transform-modules-systemjs is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin @babel/plugin-transform-modules-systemjs to 7.29.4 with an `overrides` entry (`resolutions` if you use Yarn)).
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/yarn.lock— @babel/plugin-transform-modules-systemjs 7.23.0: [GHSA redacted] — @babel/plugin-transform-modules-systemjs is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin @babel/plugin-transform-modules-systemjs to 7.29.4 with an `overrides` entry (`resolutions` if you use Yarn)).
High CVE: [GHSA redacted] labs/arthas-jfr-frontend/package-lock.json— @remix-run/router 1.23.0: [GHSA redacted] — @remix-run/router is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin @remix-run/router to 1.23.2 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against @remix-run/router 1.23.0, and their fixed versions do not agree — anything below 1.23.3 still leaves at least one of them open. Take this package to 1.23.3 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against @remix-run/router 1.23.0: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-jfr-frontend/package-lock.json— axios 1.10.0: [GHSA redacted] — this repo declares axios ^1.6.0, a range that ALREADY admits the fixed 1.16.0, so there is no manifest edit to make here. Re-resolve the lock so axios moves onto 1.16.0 or later; if the flagged 1.10.0 comes back, a dependency is pinning it — upgrade that dependent, or pin axios with an `overrides` entry (`resolutions` if you use Yarn) so only one copy resolves. This is 1 of 29 advisories with a published fix this scan raises against axios 1.10.0, and their fixed versions do not agree — anything below 1.18.0 still leaves at least one of them open. Take this package to 1.18.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 29 advisories this scan raises against axios 1.10.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web-ui/arthasWebConsole/yarn.lock— axios 1.7.7: [GHSA redacted] — this repo declares axios ^1.7.7, a range that ALREADY admits the fixed 1.16.0, so there is no manifest edit to make here. Re-resolve the lock so axios moves onto 1.16.0 or later; if the flagged 1.7.7 comes back, a dependency is pinning it — upgrade that dependent, or pin axios with an `overrides` entry (`resolutions` if you use Yarn) so only one copy resolves. This is 1 of 30 advisories with a published fix this scan raises against axios 1.7.7, and their fixed versions do not agree — anything below 1.18.0 still leaves at least one of them open. Take this package to 1.18.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 30 advisories this scan raises against axios 1.7.7: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— body-parser 1.20.1: [GHSA redacted] — body-parser is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin body-parser to 1.20.3 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against body-parser 1.20.1, and their fixed versions do not agree — anything below 1.20.6 still leaves at least one of them open. Take this package to 1.20.6 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 2 advisories this scan raises against body-parser 1.20.1: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— brace-expansion 1.1.11: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 1.1.16 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 5 advisories with a published fix this scan raises against brace-expansion 1.1.11, and their fixed versions do not agree — anything below 1.1.18 still leaves at least one of them open. Take this package to 1.1.18 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 5 advisories this scan raises against brace-expansion 1.1.11: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web-ui/arthasWebConsole/yarn.lock— brace-expansion 2.0.1: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 2.1.2 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 5 advisories with a published fix this scan raises against brace-expansion 2.0.1, and their fixed versions do not agree — anything below 2.1.4 still leaves at least one of them open. Take this package to 2.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 5 advisories this scan raises against brace-expansion 2.0.1: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— braces 3.0.2: [GHSA redacted] — braces is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin braces to 3.0.3 with an `overrides` entry (`resolutions` if you use Yarn)). (in 5 dependency files)
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— cross-spawn 5.1.0: [GHSA redacted] — cross-spawn is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 6.0.6 is a MAJOR ahead of the resolved 5.1.0, so an `overrides` pin would force a breaking version under a dependent written against 5.1.0; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead). (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock)
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— cross-spawn 6.0.5: [GHSA redacted] — cross-spawn is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin cross-spawn to 6.0.6 with an `overrides` entry (`resolutions` if you use Yarn)). (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock)
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— cross-spawn 7.0.3: [GHSA redacted] — cross-spawn is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin cross-spawn to 7.0.5 with an `overrides` entry (`resolutions` if you use Yarn)). (in 4 dependency files)
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— flatted 3.2.7: [GHSA redacted] — flatted is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin flatted to 3.4.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against flatted 3.2.7, and their fixed versions do not agree — anything below 3.4.2 still leaves at least one of them open. Take this package to 3.4.2 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against flatted 3.2.7: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/yarn.lock— flatted 3.2.9: [GHSA redacted] — flatted is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin flatted to 3.4.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against flatted 3.2.9, and their fixed versions do not agree — anything below 3.4.2 still leaves at least one of them open. Take this package to 3.4.2 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against flatted 3.2.9: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— http-proxy-middleware 2.0.6: [GHSA redacted] — http-proxy-middleware is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin http-proxy-middleware to 2.0.7 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 4 advisories with a published fix this scan raises against http-proxy-middleware 2.0.6, and their fixed versions do not agree — anything below 2.0.10 still leaves at least one of them open. Take this package to 2.0.10 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 4 advisories this scan raises against http-proxy-middleware 2.0.6: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] site/package-lock.json— immutable 4.1.0: [GHSA redacted] — immutable is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin immutable to 4.3.9 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 3 advisories with a published fix this scan raises against immutable 4.1.0, and their fixed versions do not agree — anything below 4.3.9 still leaves at least one of them open. Take this package to 4.3.9 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: site/package-lock.json, site/yarn.lock) This one row stands for the 3 advisories this scan raises against immutable 4.1.0: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— js-yaml 3.14.1: [GHSA redacted] — js-yaml is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin js-yaml to 3.15.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 3 advisories with a published fix this scan raises against js-yaml 3.14.1, and their fixed versions do not agree — anything below 3.15.0 still leaves at least one of them open. Take this package to 3.15.0 or later: that is the floor for the package, not this row's target alone. (in 4 dependency files) This one row stands for the 3 advisories this scan raises against js-yaml 3.14.1: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— launch-editor 2.6.0: [GHSA redacted] — launch-editor is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin launch-editor to 2.9.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against launch-editor 2.6.0, and their fixed versions do not agree — anything below 2.14.1 still leaves at least one of them open. Take this package to 2.14.1 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against launch-editor 2.6.0: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/yarn.lock— launch-editor 2.6.1: [GHSA redacted] — launch-editor is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin launch-editor to 2.9.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against launch-editor 2.6.1, and their fixed versions do not agree — anything below 2.14.1 still leaves at least one of them open. Take this package to 2.14.1 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against launch-editor 2.6.1: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] site/package-lock.json— linkify-it 4.0.1: [GHSA redacted] — linkify-it is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 5.0.1 is a MAJOR ahead of the resolved 4.0.1, so an `overrides` pin would force a breaking version under a dependent written against 4.0.1; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead). This is 1 of 2 advisories with a published fix this scan raises against linkify-it 4.0.1, and their fixed versions do not agree — anything below 5.0.2 still leaves at least one of them open. Take this package to 5.0.2 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: site/package-lock.json, site/yarn.lock) This one row stands for the 2 advisories this scan raises against linkify-it 4.0.1: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— lodash 4.17.21: [GHSA redacted] — lodash is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin lodash to 4.18.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against lodash 4.17.21, and their fixed versions do not agree — anything below 4.18.0 still leaves at least one of them open. Take this package to 4.18.0 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 2 advisories this scan raises against lodash 4.17.21: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— minimatch 3.1.2: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 3.1.4 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 3 advisories with a published fix this scan raises against minimatch 3.1.2, and their fixed versions do not agree — anything below 3.1.4 still leaves at least one of them open. Take this package to 3.1.4 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 3 advisories this scan raises against minimatch 3.1.2: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web-ui/arthasWebConsole/yarn.lock— minimatch 5.1.0: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 5.1.8 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 3 advisories with a published fix this scan raises against minimatch 5.1.0, and their fixed versions do not agree — anything below 5.1.8 still leaves at least one of them open. Take this package to 5.1.8 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 5.1.0: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— node-forge 1.3.1: [GHSA redacted] — node-forge is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin node-forge to 1.4.0 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 7 advisories with a published fix this scan raises against node-forge 1.3.1, and their fixed versions do not agree — anything below 1.4.0 still leaves at least one of them open. Take this package to 1.4.0 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 7 advisories this scan raises against node-forge 1.3.1: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— path-to-regexp 0.1.7: [GHSA redacted] — path-to-regexp is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin path-to-regexp to 0.1.13 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against path-to-regexp 0.1.7, and their fixed versions do not agree — anything below 0.1.13 still leaves at least one of them open. Take this package to 0.1.13 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 2 advisories this scan raises against path-to-regexp 0.1.7: [GHSA redacted], [GHSA redacted].
High: watchdog-sensitive-personal-data-in-log arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/DefaultToolCallbackProvider.java:119— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/DefaultToolCallbackProvider.java:132— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/DefaultToolCallbackProvider.java:150— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:193— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:260— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:159— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:190— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:282— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:329— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:364— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:438— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:533— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:536— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/command/klass100/ClassDumpTransformer.java:92— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:480— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java:303— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log core/src/main/java/com/taobao/arthas/core/command/view/SearchClassView.java:28— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:107— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:187— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:226— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:255— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:298— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:301— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:72— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
High: watchdog-sensitive-personal-data-in-log labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:128— Special-category or directly-identifying personal data appears to be written to a log or console sink. Logs are copied, shipped to third parties and retained far longer than the data itself is lawfully needed. Log a stable pseudonymous reference instead of the value.
Critical CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— @babel/traverse 7.22.8: [GHSA redacted] — @babel/traverse is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin @babel/traverse to 7.23.2 with an `overrides` entry (`resolutions` if you use Yarn)).
Critical CVE: [GHSA redacted] web-ui/arthasWebConsole/yarn.lock— form-data 4.0.1: [GHSA redacted] — form-data is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin form-data to 4.0.4 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against form-data 4.0.1, and their fixed versions do not agree — anything below 4.0.6 still leaves at least one of them open. Take this package to 4.0.6 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against form-data 4.0.1: [GHSA redacted], [GHSA redacted].
Critical CVE: [GHSA redacted] labs/arthas-jfr-frontend/package-lock.json— form-data 4.0.3: [GHSA redacted] — form-data is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin form-data to 4.0.4 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against form-data 4.0.3, and their fixed versions do not agree — anything below 4.0.6 still leaves at least one of them open. Take this package to 4.0.6 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against form-data 4.0.3: [GHSA redacted], [GHSA redacted].
Critical CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— shell-quote 1.8.1: [GHSA redacted] — shell-quote is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin shell-quote to 1.8.4 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against shell-quote 1.8.1, and their fixed versions do not agree — anything below 1.9.0 still leaves at least one of them open. Take this package to 1.9.0 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 2 advisories this scan raises against shell-quote 1.8.1: [GHSA redacted], [GHSA redacted].
Critical CVE: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— websocket-driver 0.7.4: [GHSA redacted] — websocket-driver is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin websocket-driver to 0.7.5 with an `overrides` entry (`resolutions` if you use Yarn)). (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 2 advisories this scan raises against websocket-driver 0.7.4: [GHSA redacted], [GHSA redacted].
Orphaned knowledge labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D38 · OSV Dependency Vulnerabilities· High vulnerability · ×2
High vulnerability: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— serialize-javascript 6.0.1: [GHSA redacted] — serialize-javascript is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 7.0.3 is a MAJOR ahead of the resolved 6.0.1, so an `overrides` pin would force a breaking version under a dependent written against 6.0.1; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead). (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 3 advisories this scan raises against serialize-javascript 6.0.1: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High vulnerability: [GHSA redacted] labs/arthas-grpc-web-proxy/ui/package-lock.json— svgo 2.8.0: [GHSA redacted] — svgo is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin svgo to 2.8.3 with an `overrides` entry (`resolutions` if you use Yarn)). This is 1 of 2 advisories with a published fix this scan raises against svgo 2.8.0, and their fixed versions do not agree — anything below 2.8.3 still leaves at least one of them open. Take this package to 2.8.3 or later: that is the floor for the package, not this row's target alone. (in 2 dependency files: labs/arthas-grpc-web-proxy/ui/package-lock.json, labs/arthas-grpc-web-proxy/ui/yarn.lock) This one row stands for the 2 advisories this scan raises against svgo 2.8.0: [GHSA redacted], [GHSA redacted].
High IaC: DS-0002 Dockerfile— Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN adduser -S -D app`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
TooManyMethods: Ansi core/src/main/java/com/taobao/arthas/core/view/Ansi.java:12— TooManyMethods — 87 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StringUtils core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:38— TooManyMethods — 65 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: Bootstrap boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:64— TooManyMethods — 61 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SocketClient client/src/main/java/org/apache/commons/net/SocketClient.java:55— TooManyMethods — 50 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Telnet client/src/main/java/org/apache/commons/net/telnet/Telnet.java:28— TooManyMethods — 47 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: ArthasBootstrap core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:104— TooManyMethods — 47 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: TimeTunnelCommand core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:52— TooManyMethods — 46 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: ClassLoaderMetaspaceCommand core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:56— TooManyMethods — 44 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: Configure core/src/main/java/com/taobao/arthas/core/config/Configure.java:23— TooManyMethods — 43 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: WatchRequestModel labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/WatchRequestModel.java:14— TooManyMethods — 43 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: ClassLoaderCommand core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:62— TooManyMethods — 39 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: LineCommand core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java:40— TooManyMethods — 39 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: ClassDetailVO core/src/main/java/com/taobao/arthas/core/command/model/ClassDetailVO.java:7— TooManyMethods — 35 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: DefaultTaskManager arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:28— 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.
TooManyMethods: WatchCommand core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchCommand.java:35— 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.
TooManyMethods: AnsiLog common/src/main/java/com/taobao/arthas/common/AnsiLog.java:23— TooManyMethods — 32 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: CommandProcessImpl core/src/main/java/com/taobao/arthas/core/shell/system/impl/ProcessImpl.java:394— TooManyMethods — 32 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: McpNettyServer arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:29— TooManyMethods — 31 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: McpNettyServerExchange arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServerExchange.java:42— TooManyMethods — 31 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: StreamableServerNettySpecification arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServer.java:41— TooManyMethods — 31 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: ProcessImpl core/src/main/java/com/taobao/arthas/core/shell/system/impl/ProcessImpl.java:38— TooManyMethods — 31 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 (6 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:393— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:393-398 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:576-581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:393` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:214— core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:214-219 | core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:83-88 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:214` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java:105— core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java:105-110 | core/src/main/java/com/taobao/arthas/core/command/klass100/MemoryCompilerCommand.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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java:105` 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) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:125— core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:125-130 | core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:249-255 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java:171— core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java:171-176 | core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:140-145 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java:171` 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) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:108— core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:108-113 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:113-118 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:115— core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:115-120 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:120-125 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:115` 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) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:154— core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:154-159 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:150-155 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:96— core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:96-101 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/WatchRpcAdviceListener.java:114-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 `core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:96` 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) core/src/main/java/com/taobao/arthas/core/command/view/LineView.java:17— core/src/main/java/com/taobao/arthas/core/command/view/LineView.java:17-22 | core/src/main/java/com/taobao/arthas/core/command/view/WatchView.java:19-24 — 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) core/src/main/java/com/taobao/arthas/core/command/view/TraceView.java:101— core/src/main/java/com/taobao/arthas/core/command/view/TraceView.java:101-106 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:445-450 — 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) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:753— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:753-758 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:499-504 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:33— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:33-38 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java:29-34 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/DumpClassTool.java:45— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/DumpClassTool.java:45-50 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/JadTool.java:43-48 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/DumpClassTool.java:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/ArthasMcpServer.java:219— core/src/main/java/com/taobao/arthas/core/mcp/ArthasMcpServer.java:219-224 | core/src/main/java/com/taobao/arthas/core/mcp/ArthasMcpServer.java:290-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/ArthasMcpServer.java:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/BasicHttpAuthenticatorHandler.java:206— core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/BasicHttpAuthenticatorHandler.java:206-211 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/BasicHttpAuthenticatorHandler.java:284-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/BasicHttpAuthenticatorHandler.java:206` 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) common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:459— common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:459-464 | common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:504-509 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:459` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:89— labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:89-94 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/EtcdNativeAgentRegistry.java:88-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:154— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:154-162 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:178-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:229— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:229-237 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:160-168 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServerFeatures.java:56— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServerFeatures.java:56-64 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessServerFeatures.java:42-51 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServerFeatures.java:56` 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:232— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:232-240 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:256-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:232` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:76— core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:76-84 | core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:218-226 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:210— core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:210-219 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/EnhancerRequestModel.java:76-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/command/view/OgnlView.java:16— core/src/main/java/com/taobao/arthas/core/command/view/OgnlView.java:16-24 | core/src/main/java/com/taobao/arthas/core/command/view/VmToolView.java:17-25 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:605— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:605-613 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:369-377 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:605` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:55— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:55-63 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:46-54 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:377— core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:377-386 | core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:396-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 `core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:377` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/handlers/shell/ShellLineHandler.java:112— core/src/main/java/com/taobao/arthas/core/shell/handlers/shell/ShellLineHandler.java:112-120 | core/src/main/java/com/taobao/arthas/core/shell/handlers/shell/ShellLineHandler.java:135-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/handlers/shell/ShellLineHandler.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 (9 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:102— core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:102-110 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:120-128 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:203— core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:203-211 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:302-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:247— core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:247-255 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:346-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:247` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:134— core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:134-142 | core/src/main/java/com/taobao/arthas/core/view/MethodInfoView.java:52-60 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.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 (9 lines × 2) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:95— labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:95-103 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:162-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:82— labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:82-90 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:129-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:222— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:222-231 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:391-400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:347— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:347-356 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:578-587 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:36— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:36-45 | core/src/main/java/com/taobao/arthas/core/mcp/util/McpAuthExtractor.java:41-50 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:36` it begins part-way through the construct above it, so those exact lines 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:57— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:57-66 | core/src/main/java/com/taobao/arthas/core/mcp/util/McpAuthExtractor.java:65-74 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:196— core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:196-205 | core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:263-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:134— core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:134-143 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:134-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.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.
Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:161— core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:161-170 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:161-170 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/command/internal/RedirectHandler.java:27— core/src/main/java/com/taobao/arthas/core/shell/command/internal/RedirectHandler.java:27-36 | core/src/main/java/com/taobao/arthas/core/shell/command/internal/TeeHandler.java:25-34 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/command/internal/RedirectHandler.java:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:327— core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:327-336 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:414-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:327` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/NettyWebsocketTtyBootstrap.java:98— core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/NettyWebsocketTtyBootstrap.java:98-107 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/NettyHttpTelnetBootstrap.java:72-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/NettyWebsocketTtyBootstrap.java:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:144— boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:144-153 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:194-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:470— boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:470-479 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:530-539 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:470` it begins part-way through the construct above it, so those exact lines 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) labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:33— labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:33-42 | labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/ClientStreamExecutor.java:33-42 — 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 `labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:98— labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:98-107 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:141-151 — 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 `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/ForwardClientSocketClientHandler.java:87— labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/ForwardClientSocketClientHandler.java:87-96 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClientSocketClientHandler.java:96-105 — 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 `labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/ForwardClientSocketClientHandler.java:87` it begins part-way through the construct above it, so those exact lines 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) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:66— tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:66-76 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClient.java:102-111 — 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:147— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:147-154 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:554-561 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:147` it begins part-way through the construct above it, so those exact lines 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:222— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:222-229 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:550-557 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:410— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:410-417 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:427-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:410` it begins part-way through the construct above it, so those exact lines 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:137— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:137-144 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:81-88 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:331— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:331-338 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:347-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:388— core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:388-395 | core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:401-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:143— core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:143-150 | core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:200-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:225— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:225-232 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:138-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:64— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:64-71 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:53-60 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:62— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:62-69 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TraceTool.java:49-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:160— core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:160-167 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/ExtHttpTtyConnection.java:75-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 `core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:121— labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:121-128 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:147-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java:144— client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java:144-151 | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java:170-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:142— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:142-148 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:216-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:253— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:253-259 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:447-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:253` 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:312— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:312-318 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:476-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:100— core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:100-106 | core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:126-133 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:254— core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:254-260 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/EnhancerRequestModel.java:111-117 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:59— core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:59-65 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:80-87 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/StackAdviceListener.java:55— core/src/main/java/com/taobao/arthas/core/command/monitor200/StackAdviceListener.java:55-61 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:77-84 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/StackAdviceListener.java:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:389— core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:389-395 | core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:434-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:310— core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:310-316 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:235-242 — 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) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:548— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:548-554 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:313-319 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:548` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:174— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:174-180 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:209-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:55— labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:55-61 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/ZookeeperNativeAgentRegistry.java:51-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:55` it begins part-way through the construct above it, so those exact lines 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) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:90— tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:90-96 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClient.java:125-132 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:90` 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:268— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:268-272 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:199-203 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:268` it begins part-way through the construct above it, so those exact lines 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:94— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:94-98 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:109-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:172— core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:172-176 | core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:207-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:69— core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:69-73 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:90-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 (5 lines × 2) core/src/main/java/com/taobao/arthas/core/command/view/DumpClassView.java:43— core/src/main/java/com/taobao/arthas/core/command/view/DumpClassView.java:43-47 | core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java:235-239 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/view/DumpClassView.java:43` 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) core/src/main/java/com/taobao/arthas/core/command/view/OptionsView.java:35— core/src/main/java/com/taobao/arthas/core/command/view/OptionsView.java:35-39 | core/src/main/java/com/taobao/arthas/core/command/view/VMOptionView.java:32-36 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/view/OptionsView.java:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:128— core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:128-132 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/view/GrpcResultViewResolver.java:125-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:647— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:647-651 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:415-419 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/TtyServerInitializer.java:41— core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/TtyServerInitializer.java:41-45 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/ProtocolDetectHandler.java:92-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ArthasBanner.java:181— core/src/main/java/com/taobao/arthas/core/util/ArthasBanner.java:181-185 | boot/src/main/java/com/taobao/arthas/boot/DownloadUtils.java:144-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/util/ArthasBanner.java:181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:46— core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:46-50 | core/src/main/java/com/taobao/arthas/core/view/MethodInfoView.java:27-31 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:143— labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:143-147 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:191-195 — both copies are in the same file, so extract the 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 (15 lines × 2) core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:370— core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:370-384 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:519-533 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:152— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:152-166 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:100-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:152` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:354— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:354-368 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:245-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 `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:691— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:691-705 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:447-461 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:691` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:733— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:733-747 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:479-493 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:733` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:444— common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:444-458 | common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:488-503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:444` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:36— labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:36-50 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/ZookeeperNativeAgentRegistry.java:32-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:242— core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:242-253 | core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:182-193 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:135— core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:135-146 | core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:261-272 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:298— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:298-309 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:195-206 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:298` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:39— core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:39-50 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:39-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:24— core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:24-35 | core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:75-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:24` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:222— core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:222-233 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:322-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:426— boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:426-437 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:557-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:426` it begins part-way through the construct above it, so those 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) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:86— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:86-96 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:177-187 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (11 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:90— core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:90-100 | core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:236-246 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:90` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:197— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:197-207 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:119-129 — 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 (11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:568— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:568-578 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:332-342 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:568` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:64— core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:64-74 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:64-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:88— core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:88-98 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:88-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:88` it begins part-way through the construct above it, so those exact lines 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) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpRequestHandler.java:25— labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpRequestHandler.java:25-35 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpRequestHandler.java:28-38 — 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 `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpRequestHandler.java:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
FileTooLong: klass100/ClassLoaderCommand.java core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:0— FileTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ClassLoaderCommand (62-1067). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: klass100/ClassLoaderMetaspaceCommand.java core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:0— FileTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ClassLoaderMetaspaceCommand (56-920). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: monitor200/ProfilerCommand.java core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:0— FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ProfilerCommand (73-1107). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: server/ArthasBootstrap.java core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:0— FileTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: ArthasBootstrap (104-1018). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: boot/Bootstrap.java boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:0— FileTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Bootstrap (64-893). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: util/StringUtils.java core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:0— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: StringUtils (38-998). Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
Duplicated block (8 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:233— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:233-240 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:322-329 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:415-422 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:308— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:308-315 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:347-354 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:578-585 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 3) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:79— core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:79-86 | core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:93-100 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:96-104 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:83— core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:83-90 | core/src/main/java/com/taobao/arthas/core/command/monitor200/StackAdviceListener.java:65-72 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:104-111 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:55— core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:55-62 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:51-58 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/TelnetTermServer.java:47-54 — 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 `core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:36— labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:36-43 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:61-68 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:85-92 — 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 `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:88— core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:88-101 | core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java:170-183 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:77— core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:77-90 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:78-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:163— core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:163-176 | core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionManagerImpl.java:122-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:163` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/discovery/impl/ZookeeperNativeAgentProxyDiscovery.java:24— labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/discovery/impl/ZookeeperNativeAgentProxyDiscovery.java:24-37 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/discovery/impl/ZookeeperNativeAgentDiscovery.java:27-40 — 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 `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/discovery/impl/ZookeeperNativeAgentProxyDiscovery.java:24` it begins part-way through the construct above it, so those exact lines 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 × 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:256— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:256-265 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:291-300 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:187-196 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:216-225 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:423— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:423-432 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:455-464 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:279-288 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:307-316 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:423` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:526— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:526-535 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:561-570 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:369-378 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:399-408 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:526` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 4) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:73— labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:73-82 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentDiscoveryFactory.java:73-82 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentProxyRegistryFactory.java:73-82 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/factory/NativeAgentRegistryFactory.java:70-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:69— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:69-77 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:86-94 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:177-185 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:281— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:281-289 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:324-332 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:626-634 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:74— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:74-82 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/StackTool.java:60-68 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TraceTool.java:61-69 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:81— labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:81-89 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:123-131 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:170-178 — 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 `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/AttachArthasClassloader.java:29— arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/AttachArthasClassloader.java:29-41 | agent/src/main/java/com/taobao/arthas/agent/ArthasClassloader.java:27-39 — 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 `arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/AttachArthasClassloader.java:29` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:175— arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:175-187 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:115-127 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:524— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:524-536 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:289-301 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:524` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:108— core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:108-117 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:133-142 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:160-169 — 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 `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:108` 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 × 3) core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:83— core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:83-92 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:79-88 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/TelnetTermServer.java:70-79 — 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 `core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:109— labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:109-118 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:134-143 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:161-170 — 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 `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:109` it begins part-way through the construct above it, so those exact lines 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 × 3) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/basic1000/OptionsTool.java:37— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/basic1000/OptionsTool.java:37-42 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/SysPropTool.java:25-30 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMOptionTool.java:25-30 — 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 `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/basic1000/OptionsTool.java:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:95— core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:95-100 | core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:131-136 | core/src/main/java/com/taobao/arthas/core/view/MethodInfoView.java:49-54 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:31— labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:31-36 | labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentProxyHandler.java:28-33 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:34-39 — 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 `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:31` 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.
draw (cyclomatic 36) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266— draw has cyclomatic complexity 36 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
draw (cyclomatic 36) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:266— draw has cyclomatic complexity 36 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
draw (cognitive 78) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266— draw has cognitive complexity 78 (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.
draw (cognitive 78) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:266— draw has cognitive complexity 78 (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.
1.run (cognitive 26) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:61— 1.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 6, error handling 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
1.run (cognitive 26) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:62— 1.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, loops 6, error handling 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
touch (cognitive 26) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:392— touch has cognitive complexity 26 (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.
touch (cognitive 26) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:392— touch has cognitive complexity 26 (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.
genFramesFromLineData (cognitive 21) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:364— genFramesFromLineData has cognitive complexity 21 (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.
genFramesFromLineData (cognitive 21) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:364— genFramesFromLineData has cognitive complexity 21 (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.
drawSelf (cognitive 18) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:184— drawSelf has cognitive complexity 18 (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.
drawSelf (cognitive 18) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:184— drawSelf has cognitive complexity 18 (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.
render (cognitive 17) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:242— render 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.
render (cognitive 17) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:242— render 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.
Change coupling: en.js ↔ zh.js site/docs/.vuepress/configs/sidebar/en.js— `site/docs/.vuepress/configs/sidebar/en.js` and `site/docs/.vuepress/configs/sidebar/zh.js` change together 92% of the time (12 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking.
Change coupling: zh.js ↔ zh.js site/docs/.vuepress/configs/navbar/zh.js— `site/docs/.vuepress/configs/navbar/zh.js` and `site/docs/.vuepress/configs/sidebar/zh.js` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking.
Duplicated block (17 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:108— core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:108-124 | core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:229-245 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:239— core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:239-255 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:148-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:239` it begins part-way through the construct above it, so those exact lines 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 × 4) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/JadTool.java:38— core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/JadTool.java:38-44 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/MemoryCompilerTool.java:32-38 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/RedefineTool.java:25-31 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/RetransformTool.java:25-31 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/JadTool.java:38` 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 × 4) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:42— labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:42-48 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentDiscoveryFactory.java:42-48 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentProxyRegistryFactory.java:42-48 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/factory/NativeAgentRegistryFactory.java:41-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:42` 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.
ObjectView.renderObject (cyclomatic 90) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:134— ObjectView.renderObject has cyclomatic complexity 90 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Bootstrap.main (cyclomatic 60) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:309— Bootstrap.main has cyclomatic complexity 60 (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.
Enhancer.transform (cyclomatic 45) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:150— Enhancer.transform has cyclomatic complexity 45 (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.
JFRCommand.process (cyclomatic 42) core/src/main/java/com/taobao/arthas/core/command/basic1000/JFRCommand.java:173— JFRCommand.process has cyclomatic complexity 42 (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.
ProfilerCommand.executeArgs (cyclomatic 42) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:606— ProfilerCommand.executeArgs has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TelnetInputStream.__read (cyclomatic 30) client/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java:118— TelnetInputStream.__read has cyclomatic complexity 30 (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.
RetransformCommand.process (cyclomatic 29) core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:149— RetransformCommand.process has cyclomatic complexity 29 (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.
ProfilerCommand.process (cyclomatic 27) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:747— ProfilerCommand.process has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VmToolCommand.process (cyclomatic 27) core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:202— VmToolCommand.process has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArthasBootstrap.bind (cyclomatic 27) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:366— ArthasBootstrap.bind has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClassLoaderCommand.process (cyclomatic 26) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:179— ClassLoaderCommand.process has cyclomatic complexity 26 (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.
Enhancer.transform (cyclomatic 26) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:98— Enhancer.transform has cyclomatic complexity 26 (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.
ObjectService.query (cyclomatic 26) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:53— ObjectService.query has cyclomatic complexity 26 (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.
ArthasMcpJavaSdkIT.createArgumentsForTool (cyclomatic 25) arthas-mcp-integration-test/src/test/java/com/taobao/arthas/mcp/it/ArthasMcpJavaSdkIT.java:223— ArthasMcpJavaSdkIT.createArgumentsForTool has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StreamableToolUtils.executeAndCollectResults (cyclomatic 25) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/StreamableToolUtils.java:81— StreamableToolUtils.executeAndCollectResults has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ObjectUtils.nullSafeEquals (cyclomatic 25) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:127— ObjectUtils.nullSafeEquals has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ThreadUtil.getFullStacktrace (cyclomatic 25) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:268— ThreadUtil.getFullStacktrace has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ReflectUtils.defineClass (cyclomatic 25) common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:429— ReflectUtils.defineClass has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RecordedEvent.init (cyclomatic 24) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/model/jfr/RecordedEvent.java:56— RecordedEvent.init has cyclomatic complexity 24 (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.
ClassLoaderCommand.processUrlClasses (cyclomatic 22) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:478— ClassLoaderCommand.processUrlClasses has cyclomatic complexity 22 (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.
ThreadUtil.getFullStacktrace (cyclomatic 22) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:180— ThreadUtil.getFullStacktrace has cyclomatic complexity 22 (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.
McpStreamableHttpRequestHandler.handlePostRequest (cyclomatic 21) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:304— McpStreamableHttpRequestHandler.handlePostRequest has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ProfilerMarkdown.toMarkdown (cyclomatic 21) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerMarkdown.java:58— ProfilerMarkdown.toMarkdown has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TelnetConsole.process (cyclomatic 21) client/src/main/java/com/taobao/arthas/client/TelnetConsole.java:210— TelnetConsole.process 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.
RedefineCommand.process (cyclomatic 20) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:73— RedefineCommand.process 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.
PropertySource.arrayEquals (cyclomatic 19) core/src/main/java/com/taobao/arthas/core/env/PropertySource.java:235— PropertySource.arrayEquals has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WildcardMatcher.match (cyclomatic 19) core/src/main/java/com/taobao/arthas/core/util/matcher/WildcardMatcher.java:30— WildcardMatcher.match has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OSUtils.normalizeArch (cyclomatic 19) common/src/main/java/com/taobao/arthas/common/OSUtils.java:84— OSUtils.normalizeArch has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TelnetInputStream.read (cyclomatic 19) client/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java:351— TelnetInputStream.read has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BinderUtils.inject (cyclomatic 18) core/src/main/java/com/taobao/arthas/core/config/BinderUtils.java:23— BinderUtils.inject has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VMToolTool.vmtool (cyclomatic 18) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java:17— VMToolTool.vmtool has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
serializeBinaryToWriter (cyclomatic 18) labs/arthas-grpc-web-proxy/ui/src/assets/proto/ArthasServices_pb.js:4966— serializeBinaryToWriter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ThreadSampler.sample (cyclomatic 17) core/src/main/java/com/taobao/arthas/core/command/monitor200/ThreadSampler.java:34— ThreadSampler.sample has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompletionUtils.completeFilePath (cyclomatic 17) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:89— CompletionUtils.completeFilePath has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProcessUtils.select (cyclomatic 17) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:55— ProcessUtils.select has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JavaObjectConverter.toJavaObject (cyclomatic 17) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/objectUtils/JavaObjectConverter.java:42— JavaObjectConverter.toJavaObject has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JsonSchemaGenerator.generateParameterProperties (cyclomatic 16) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:91— JsonSchemaGenerator.generateParameterProperties 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.
ResultConsumerHelper.getItemCount (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/distribution/ResultConsumerHelper.java:35— ResultConsumerHelper.getItemCount 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.
ClassLoaderTool.classloader (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/ClassLoaderTool.java:21— ClassLoaderTool.classloader has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TimeTunnelTool.validateParameters (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java:107— TimeTunnelTool.validateParameters 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.
GrepHandler.apply (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/shell/command/internal/GrepHandler.java:106— GrepHandler.apply 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.
HttpApiHandler.processRequest (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:116— HttpApiHandler.processRequest 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.
HttpRequestHandler.channelRead0 (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/HttpRequestHandler.java:56— HttpRequestHandler.channelRead0 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.
TunnelClientSocketClientHandler.channelRead0 (cyclomatic 16) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClientSocketClientHandler.java:56— TunnelClientSocketClientHandler.channelRead0 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.
Hotspot: boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java— boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java changed 8 times in last 90 days, max complexity 60. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.findings[0].issue | LineNumber: 0 | BytePositionInLine: 1135.
ObjectView.renderObject (cognitive 730) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:134— ObjectView.renderObject has cognitive complexity 730 (threshold 15). Drivers by points: loops 486, if/else 199, error handling 26, boolean chains 13, match/switch 6 (nesting depth added 625). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
JFRCommand.process (cognitive 142) core/src/main/java/com/taobao/arthas/core/command/basic1000/JFRCommand.java:173— JFRCommand.process has cognitive complexity 142 (threshold 15). Drivers by points: if/else 93, error handling 41, loops 5, boolean chains 3 (nesting depth added 93). 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.
Bootstrap.main (cognitive 106) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:309— Bootstrap.main has cognitive complexity 106 (threshold 15). Drivers by points: if/else 92, boolean chains 7, error handling 7 (nesting depth added 44). 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.
Enhancer.transform (cognitive 104) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:150— Enhancer.transform has cognitive complexity 104 (threshold 15). Drivers by points: if/else 74, loops 19, error handling 6, boolean chains 5 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VmToolCommand.process (cognitive 77) core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:202— VmToolCommand.process has cognitive complexity 77 (threshold 15). Drivers by points: if/else 36, ternaries 33, error handling 7, boolean chains 1 (nesting depth added 48). 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.
ProfilerCommand.process (cognitive 75) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:747— ProfilerCommand.process has cognitive complexity 75 (threshold 15). Drivers by points: if/else 66, error handling 6, boolean chains 3 (nesting depth added 47). 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.
ObjectUtils.nullSafeEquals (cognitive 67) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:127— ObjectUtils.nullSafeEquals has cognitive complexity 67 (threshold 15). Drivers by points: if/else 56, boolean chains 11 (nesting depth added 41). 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.
TelnetInputStream.read (cognitive 67) client/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java:351— TelnetInputStream.read has cognitive complexity 67 (threshold 15). Drivers by points: if/else 40, error handling 20, loops 5, boolean chains 2 (nesting depth added 47). 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.
Enhancer.transform (cognitive 64) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:98— Enhancer.transform has cognitive complexity 64 (threshold 15). Drivers by points: if/else 43, loops 14, error handling 6, boolean chains 1 (nesting depth added 37). 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.
RetransformCommand.process (cognitive 60) core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:149— RetransformCommand.process has cognitive complexity 60 (threshold 15). Drivers by points: if/else 38, error handling 11, loops 9, boolean chains 2 (nesting depth added 31). 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.
ObjectService.query (cognitive 52) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:53— ObjectService.query has cognitive complexity 52 (threshold 15). Drivers by points: if/else 31, error handling 14, boolean chains 4, loops 3 (nesting depth added 26). 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.
WildcardMatcher.match (cognitive 45) core/src/main/java/com/taobao/arthas/core/util/matcher/WildcardMatcher.java:30— WildcardMatcher.match has cognitive complexity 45 (threshold 15). Drivers by points: if/else 35, loops 8, boolean chains 2 (nesting depth added 26). 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.
GrepHandler.apply (cognitive 44) core/src/main/java/com/taobao/arthas/core/shell/command/internal/GrepHandler.java:106— GrepHandler.apply has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23, loops 10, ternaries 9, boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProfilerCommand.executeArgs (cognitive 43) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:606— ProfilerCommand.executeArgs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 36, loops 4, boolean chains 3 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ArthasReflectUtils.getClasses (cognitive 43) core/src/main/java/com/taobao/arthas/core/util/reflect/ArthasReflectUtils.java:34— ArthasReflectUtils.getClasses has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25, error handling 12, loops 5, boolean chains 1 (nesting depth added 31). 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.
StreamableToolUtils.executeAndCollectResults (cognitive 41) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/StreamableToolUtils.java:81— StreamableToolUtils.executeAndCollectResults has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19, error handling 8, boolean chains 7, ternaries 6, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReflectUtils.defineClass (cognitive 41) common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:429— ReflectUtils.defineClass has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20, error handling 16, boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelnetInputStream.__read (cognitive 40) client/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java:118— TelnetInputStream.__read has cognitive complexity 40 (threshold 15). Drivers by points: if/else 27, match/switch 11, boolean chains 1, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThreadView.draw (cognitive 39) core/src/main/java/com/taobao/arthas/core/command/view/ThreadView.java:23— ThreadView.draw has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21, loops 18 (nesting depth added 27). 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.
ClassLoaderCommand.processUrlClasses (cognitive 36) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:478— ClassLoaderCommand.processUrlClasses has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, boolean chains 4, ternaries 3, error handling 2, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelnetConsole.process (cognitive 36) client/src/main/java/com/taobao/arthas/client/TelnetConsole.java:210— TelnetConsole.process has cognitive complexity 36 (threshold 15). Drivers by points: if/else 26, error handling 7, loops 2, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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.