Public report of alibaba/arthas, published 10 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 10 November 2026, 13:48 UTC · Survey ID cd_32f780becb754272853fbd055368e70d

alibaba/arthas

Measured 10 November 2026, 13:47 UTC, at code version 6d97217

CAI score 45out of 100 At risk Up 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 89,714 lines of product code in 31 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Production Readiness, 37

Findings by how serious they are

274 critical 847 serious 498 minor

14 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
10 November 2026, 13:47 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

86of 86 dimensions measured by tools.
1374of 1619 findings point to an exact file and line, so you can open each one in the code. The other 245 concern the repository as a whole, such as missing documentation.
86dimensions across 7 lenses, read from 89,714 lines of product code in 31 projects.
Chapters

Executive summary

alibaba/arthas is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 45 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 37, is the weakest lens and counts most in the score. The best first step is fixing the package under a licence on your banned list, worth about 3 points. Adding tests for the code no test reaches would lift Production Readiness itself, also worth about 3. Raising Production Readiness to 70 would lift the score to about 52.

155 known security holes in the packages the code depends on can be used by attackers. Fifty-six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and twenty-three form fields can't be read by a screen reader. Updating the vulnerable packages, pinning each tool to an exact version and labelling the form fields would close these risks. Limiting each secret to its own step would fix the eight secrets exposed to more of the pipeline than needed, and passing outside input through environment variables would deal with the seven pipeline steps that put outside input straight into a shell command. The seven parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.

The product code is 89,714 lines, about €110,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 37 · counts for 46%Accessibility 38 · counts for 25%Code Health 57 · counts for 14%Security and Compliance 62 · counts for 8%Architecture 73 · counts for 4%Maturity 75 · counts for 2%Performance 100 · counts for 1%

If Production Readiness rose from 37 to 70, the lowest score rated Strong, the score would rise from 45 to about 52.

Code composition: what the lines of code are
Product code 85%Tests 15%
New since the last survey: 117 findings

These 117 critical or serious findings weren't in the previous survey, on 23 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 67 findings

These 67 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.

  • Code Duplication · Near-duplicate member pair (62 shared lines) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java
  • Code Duplication · Duplicated block (31 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java
  • Code Duplication · Duplicated block (11 lines × 4) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java
  • Code Duplication · Duplicated block (11 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java
  • Code Duplication · Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java
  • Code Duplication · Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Exception handling · Swallowed exception (empty catch) agent/src/main/java/com/taobao/arthas/agent/ArthasClassloader.java
  • Exception handling · Swallowed exception (empty catch) agent/src/main/java/com/taobao/arthas/agent334/AgentBootstrap.java
  • Exception handling · Swallowed exception (empty catch) agent/src/main/java/com/taobao/arthas/agent334/AgentBootstrap.java
  • Exception handling · Swallowed exception (empty catch) arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/AttachArthasClassloader.java
  • Exception handling · Swallowed exception (empty catch) arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/ArthasAgent.java
  • Exception handling · Swallowed exception (caught, then discarded) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/ToolCallbackCreateTaskHandler.java
  • Exception handling · Swallowed exception (empty catch) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java
  • Exception handling · Swallowed exception (empty catch) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java
  • Exception handling · Swallowed exception (empty catch) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java
  • Exception handling · Swallowed exception (empty catch) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java
  • Exception handling · Swallowed exception (empty catch) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java
  • Exception handling · Swallowed exception (empty catch) client/src/main/java/com/taobao/arthas/client/TelnetConsole.java
  • Exception handling · Swallowed exception (empty catch) common/src/main/java/com/taobao/arthas/common/UnsafeUtils.java
  • Exception handling · Swallowed exception (empty catch) common/src/main/java/com/taobao/arthas/common/UnsafeUtils.java
  • Exception handling · Swallowed exception (caught, then discarded) common/src/main/java/com/taobao/arthas/common/SocketUtils.java
  • Exception handling · Swallowed exception (empty catch) common/src/main/java/com/taobao/arthas/common/SocketUtils.java
  • Exception handling · Swallowed exception (caught, then discarded) common/src/main/java/com/taobao/arthas/common/SocketUtils.java
  • Exception handling · Swallowed exception (empty catch) common/src/main/java/com/taobao/arthas/common/PidUtils.java
  • Exception handling · Swallowed exception (empty catch) common/src/main/java/com/taobao/arthas/common/PidUtils.java
  • Exception handling · Swallowed exception (empty catch) common/src/main/java/com/taobao/arthas/common/AnsiLog.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java
  • Exception handling · Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerMarkdown.java
  • Exception handling · Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java
  • Forms & labels · <Select> field component without a label labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx
  • Visual & motion safety · Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/arthas-jfr-frontend/src/global.less
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/arthas-jfr-frontend/src/global.less
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/arthas-jfr-frontend/src/global.less
  • Visual & motion safety · Animation without a prefers-reduced-motion guard labs/arthas-jfr-frontend/src/global.less
Rebuild cost: about €110,000 · Estimate
Cost to rebuild€37,000 to €190,000, for 620 to 1,966 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 45. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 89,714 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 Banned license finding(s) in License Compliance.
Raises the score by about 3 points · Low effort · License Compliance
2
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with ArthasSpringBootStarterExampleApplicationTests.java, ArthasSpringBoot3StarterExampleApplicationTests.java, JfrAnalyzerBackendApplicationTests.java.
Raises the score by about 2 points · Low effort · Test Quality
3
Add tests that import the unreached modules (directly or through their public entry).
Raises the score by about 3 points · Medium effort · Test Coverage

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €110,000 to build again, about 0.8 person-years of work. Its weakest lens is Production Readiness, at 37 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Banned license finding(s) in License Compliance. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 License Compliance findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 4,397 lines over the last 90 days, which is about 17,832 lines a year. At that pace, the extra work comes to an estimated 0.9 to 5.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch arthas-agent arthas-agent arthas-spy arthas-spy arthas-agent->arthas-spy arthas-agent-attach arthas-agent-attach arthas-agent-attach->arthas-spy arthas-boot arthas-boot arthas-common arthas-common arthas-boot->arthas-common arthas-client arthas-client arthas-client->arthas-common arthas-core arthas-core arthas-core->arthas-common arthas-mcp-server arthas-mcp-server arthas-core->arthas-mcp-server arthas-memorycompiler arthas-memorycompiler arthas-core->arthas-memorycompiler arthas-model arthas-model arthas-core->arthas-model arthas-core->arthas-spy arthas-tunnel-client arthas-tunnel-client arthas-core->arthas-tunnel-client arthas-vmtool arthas-vmtool arthas-core->arthas-vmtool arthas-grpc-server arthas-grpc-server arthas-grpc-server->arthas-common arthas-grpc-web-proxy arthas-grpc-web-proxy arthas-grpc-web-proxy->arthas-common arthas-grpc-web-proxy->arthas-core arthas-grpc-web-proxy->arthas-spy arthas-grpc-web-proxy->arthas-vmtool arthas-mcp-server->arthas-model arthas-packaging arthas-packaging arthas-packaging->arthas-core arthas-spring-boot-starter arthas-spring-boot-starter arthas-spring-boot-starter->arthas-agent-attach arthas-spring-boot-starter->arthas-packaging arthas-spy->arthas-common arthas-tunnel-client->arthas-common arthas-tunnel-common arthas-tunnel-common arthas-tunnel-client->arthas-tunnel-common arthas-tunnel-server arthas-tunnel-server arthas-tunnel-server->arthas-common arthas-tunnel-server->arthas-tunnel-common arthas-vmtool->arthas-common native-agent native-agent native-agent->arthas-core native-agent-common native-agent-common native-agent->native-agent-common __more__ +11 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

175 modules, with 314 dependencies between them. 7 loops run through 28 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 135 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 alibaba.arthas.tunnel.server2 taobao.arthas.core.config3 taobao.arthas.core.util.matcher4 taobao.arthas.mcp.server.session5 alibaba.arthas.tunnel.server.app.configuration6 taobao.arthas.core.distribution7 taobao.arthas.core.shell.future8 taobao.arthas.mcp.server.protocol.server9 taobao.arthas.mcp.server.tool10 taobao.arthas.core.mcp.tool.function11 taobao.arthas.core.shell.handlers12 taobao.arthas.mcp.server.protocol.server.handler13 taobao.arthas.core.mcp14 taobao.arthas.core.shell15 taobao.arthas.core.shell.term16 taobao.arthas.core.shell.system.impl17 taobao.arthas.core.shell.system18 taobao.arthas.core.shell.session19 taobao.arthas.core.shell.cli20 taobao.arthas.core.command21 taobao.arthas.core.shell.term.impl22 taobao.arthas.core.util23 taobao.arthas.core.command.klass10024 taobao.arthas.core.command.monitor20025 taobao.arthas.core.command.model26 taobao.arthas.core.shell.command27 taobao.arthas.core.shell.term.impl.http.api28 taobao.arthas.core.advisor29 taobao.arthas.core.command.basic100030 taobao.arthas.core.command.view31 taobao.arthas.core.shell.impl32 taobao.arthas.core.shell.session.impl33 taobao.arthas.core.distribution.impl34 taobao.arthas.core.server35 taobao.arthas.core.shell.handlers.shell36 taobao.arthas.grpcweb.grpc.observer37 taobao.arthas.grpcweb.grpc.model38 taobao.arthas.grpcweb.grpc.service39 taobao.arthas.grpcweb.grpc.service.advisor40 taobao.arthas.grpcweb.grpc.observer.impl
1 alibaba.arthas.tunnel.server
2 taobao.arthas.core.config
3 taobao.arthas.core.util.matcher
4 taobao.arthas.mcp.server.session
5 alibaba.arthas.tunnel.server.app.configuration1
6 taobao.arthas.core.distribution4
7 taobao.arthas.core.shell.future2
8 taobao.arthas.mcp.server.protocol.server8
9 taobao.arthas.mcp.server.tool1
10 taobao.arthas.core.mcp.tool.function232
11 taobao.arthas.core.shell.handlers1
12 taobao.arthas.mcp.server.protocol.server.handler5
13 taobao.arthas.core.mcp1323
14 taobao.arthas.core.shell11222111
15 taobao.arthas.core.shell.term113111
16 taobao.arthas.core.shell.system.impl32951468271
17 taobao.arthas.core.shell.system122131
18 taobao.arthas.core.shell.session1121
19 taobao.arthas.core.shell.cli1
20 taobao.arthas.core.command1121442122
21 taobao.arthas.core.shell.term.impl24634
22 taobao.arthas.core.util11122
23 taobao.arthas.core.command.klass1002273325
24 taobao.arthas.core.command.monitor20093546114331
25 taobao.arthas.core.command.model41
26 taobao.arthas.core.shell.command311411
27 taobao.arthas.core.shell.term.impl.http.api11214421
28 taobao.arthas.core.advisor121
29 taobao.arthas.core.command.basic1000119642
30 taobao.arthas.core.command.view36746
31 taobao.arthas.core.shell.impl2253451141
32 taobao.arthas.core.shell.session.impl111231
33 taobao.arthas.core.distribution.impl82711
34 taobao.arthas.core.server1111112111
35 taobao.arthas.core.shell.handlers.shell16312215
36 taobao.arthas.grpcweb.grpc.observer111
37 taobao.arthas.grpcweb.grpc.model2122
38 taobao.arthas.grpcweb.grpc.service121
39 taobao.arthas.grpcweb.grpc.service.advisor11711
40 taobao.arthas.grpcweb.grpc.observer.impl111311111
Uses a module listed above itPart of a loopThe module itself
1 alibaba.arthas.tunnel.server2 taobao.arthas.core.config3 taobao.arthas.core.util.matcher4 taobao.arthas.mcp.server.session5 alibaba.arthas.tunnel.server.app.configuration6 taobao.arthas.core.distribution7 taobao.arthas.core.shell.future8 taobao.arthas.mcp.server.protocol.server9 taobao.arthas.mcp.server.tool10 taobao.arthas.core.mcp.tool.function11 taobao.arthas.core.shell.handlers12 taobao.arthas.mcp.server.protocol.server.handler13 taobao.arthas.core.mcp14 taobao.arthas.core.shell15 taobao.arthas.core.shell.term16 taobao.arthas.core.shell.system.impl17 taobao.arthas.core.shell.system18 taobao.arthas.core.shell.session19 taobao.arthas.core.shell.cli20 taobao.arthas.core.command21 taobao.arthas.core.shell.term.impl22 taobao.arthas.core.util23 taobao.arthas.core.command.klass10024 taobao.arthas.core.command.monitor20025 taobao.arthas.core.command.model26 taobao.arthas.core.shell.command27 taobao.arthas.core.shell.term.impl.http.api28 taobao.arthas.core.advisor29 taobao.arthas.core.command.basic100030 taobao.arthas.core.command.view31 taobao.arthas.core.shell.impl32 taobao.arthas.core.shell.session.impl33 taobao.arthas.core.distribution.impl34 taobao.arthas.core.server35 taobao.arthas.core.shell.handlers.shell36 taobao.arthas.grpcweb.grpc.observer37 taobao.arthas.grpcweb.grpc.model38 taobao.arthas.grpcweb.grpc.service39 taobao.arthas.grpcweb.grpc.service.advisor40 taobao.arthas.grpcweb.grpc.observer.implalibaba.arthas.tunnel.server1taobao.arthas.core.config2taobao.arthas.core.util.matcher3taobao.arthas.mcp.server.session4alibaba.arthas.tunnel.server.app.configuration5taobao.arthas.core.distribution6taobao.arthas.core.shell.future7taobao.arthas.mcp.server.protocol.server8taobao.arthas.mcp.server.tool9taobao.arthas.core.mcp.tool.function10taobao.arthas.core.shell.handlers11taobao.arthas.mcp.server.protocol.server.handler12taobao.arthas.core.mcp13taobao.arthas.core.shell14taobao.arthas.core.shell.term15taobao.arthas.core.shell.system.impl16taobao.arthas.core.shell.system17taobao.arthas.core.shell.session18taobao.arthas.core.shell.cli19taobao.arthas.core.command20taobao.arthas.core.shell.term.impl21taobao.arthas.core.util22taobao.arthas.core.command.klass10023taobao.arthas.core.command.monitor20024taobao.arthas.core.command.model25taobao.arthas.core.shell.command26taobao.arthas.core.shell.term.impl.http.api27taobao.arthas.core.advisor28taobao.arthas.core.command.basic100029taobao.arthas.core.command.view30taobao.arthas.core.shell.impl31taobao.arthas.core.shell.session.impl32taobao.arthas.core.distribution.impl33taobao.arthas.core.server34taobao.arthas.core.shell.handlers.shell35taobao.arthas.grpcweb.grpc.observer36taobao.arthas.grpcweb.grpc.model37taobao.arthas.grpcweb.grpc.service38taobao.arthas.grpcweb.grpc.service.advisor39taobao.arthas.grpcweb.grpc.observer.impl401428123215132311222111113111329514682711221311121111214421222463411122227332593546114331413114111121442112111964236746225345114111123182711111111211116312215111212212111711111311111+135 more modules (most-connected shown)

At a glance — Code Health · 57% · Adequate ·

At a glance — Architecture · 73% · Strong ·

At a glance — Maturity · 75% · Strong ·

At a glance — Readiness · 37% · Weak · gated by R4, P7, P8 ·

At a glance — Security · 62% · Checked 5 of 11 · gated by D29, D36 ·

At a glance — Accessibility · 38% · Weak · gated by AC1, AC4, AC6 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures241High / Critical
A05:2025 — Injection102High / Critical
A02:2025 — Security Misconfiguration4High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Add tests that import the unreached modules (directly or through their public entry); Resolve the 1 Banned license finding(s) in License Compliance; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.

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

Do thisHelpsEffortDimension
Resolve the 1 Banned license finding(s) in License Compliance.+2.7 ptsLowLicense Compliance
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with ArthasSpringBootStarterExampleApplicationTests.java, ArthasSpringBoot3StarterExampleApplicationTests.java, JfrAnalyzerBackendApplicationTests.java.+1.9 ptsLowTest Quality
Add tests that import the unreached modules (directly or through their public entry).+3.5 ptsMediumTest Coverage
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+1.9 ptsMediumKeyboard semantics
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.+1.7 ptsMediumText alternatives
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).+1.6 ptsMediumOutbound HTTP resilience
Replace Hibernate ddl-auto with Flyway or Liquibase, with `ddl-auto` set to `validate` so the production schema can evolve safely and reproducibly.+1.6 ptsMediumSchema migrations
Enable Dependabot/Renovate or a dependency-review gate.+1.2 ptsMediumSecurity & performance tooling

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.2SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.5SlopDependency Vulnerabilities: High vulnerability: REDACTED
REDACTED0.5SlopDependency Vulnerabilities: High vulnerability: REDACTED
REDACTED0.8SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.9SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.3SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.5SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedDependency Vulnerabilities: High CVE: REDACTED

How the grades work

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

Critical — 274

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

Serious — 847

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

Minor — 498

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

Could not be resolved — 14

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

Methodology & how to trust this report

This survey 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. All 86 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 86 dimensions across the health lenses
D1D2D3D4D5D6D9D10D11D12D13D14D15D16D17D19D20D26D27D28D29D30D31D34D35D36D43D44AC1AC2AC3AC4AC5AC6AC7AX1AX10AX2AX3AX5AX6IC1M1M2M3M4P1P10P2P3P4P6P7P8PF3R1R10R11R2R3R4R5R6R7R8R9X1X12X15X16X18X19X2X20X21X23X24X25X26X27X28X29X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1374 of 1619 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1c5b6-94b9-7195-b1ee-2d5144ae05d0.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D12 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Currency was graded against Maven Central, but whether an artifact is DEPRECATED is not: Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether one is UNMAINTAINED is not graded either — no registry publishes a maintenance status, and release age does not stand in for one. Two of this dimension's four signals are therefore unread on a Maven tree, and its score reflects currency alone.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its JVM dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/js/console-35a3b78f.js` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • AX6 Interface segregation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Java, Vue components, c, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 39 further occurrence(s) are not listed individually; the score already reflects all 79.
  • X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 29 further occurrence(s) are not listed individually; the score already reflects all 69.

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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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 click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled 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. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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.

Dimensions

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

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

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

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

60 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was flame-graph-core.Frame at 91. A further 3 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being TimeTunnelTool.normalizeAction at 25 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java (JFRAnalyzerImpl.createFlameGraph at 19), core/src/main/java/com/taobao/arthas/core/advisor/ArthasMethod.java (ArthasMethod.initMethod at 18). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

flame-graph-core.Frame (cyclomatic 91) · ×2labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2
Frame::draw (cyclomatic 36) · ×2labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266
Analysis.Analysis::handleFilterValuesChecked (cyclomatic 19) · ×2labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:354
FlameGraph.constructor (cyclomatic 17) · ×2labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:3
ObjectView.renderObject (cyclomatic 90)core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:134

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

What to do

  1. Bring the 12 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with flame-graph-core.Frame (cyclomatic 91), flame-graph-core.Frame (cyclomatic 91), ObjectView.renderObject (cyclomatic 90). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cyclomatic Complexity from 6.1 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity4.8 / 10Weak✓ Tool-verified

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

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

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

146 method(s) exceeded the cognitive complexity threshold of 15; the worst was ObjectView.renderObject at 303.

Frame::draw (cognitive 96) · ×6labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266
Analysis.Analysis::handleFilterValuesChecked (cognitive 36) · ×2labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:354
1.run (cognitive 26) · ×2core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:61
FlameGraph.constructor (cognitive 22) · ×2labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:3
FlameGraph.genFramesFromLineData (cognitive 21) · ×2labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:364

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with ObjectView.renderObject (cognitive 303). — Refactoring it lifts Cognitive Complexity from 4.8 to about 5.8/10.

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

D3 · God Classes8.0 / 10Strong✓ Tool-verified

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

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

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

61 god class(es) detected.

TooManyMethods: Ansi · ×21core/src/main/java/com/taobao/arthas/core/view/Ansi.java:12
ClassTooLong: Analysis · ×15labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1
MethodTooLong: ObjectView.renderObject · ×10core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:134
FileTooLong: Analysis/Analysis.tsx · ×9labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx
FunctionTooLong: Analysis.Analysis · ×6labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:73

What to do

  1. 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).
  2. Resolve the 15 ClassTooLong finding(s) in God Classes — start with flame-graph-class.js (2), Analysis.tsx, ClassLoaderCommand.java. — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 10 MethodTooLong finding(s) in God Classes — start with flame-graph-class.js (2), ObjectView.java, Bootstrap.java. — One of this dimension's main actionable groups (10 warning-level).

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

D4 · Code Duplication9.0 / 10Strong✓ Tool-verified

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

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

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

186 duplicated block group(s) detected. A further 16 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 1 of the 202 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (7 lines × 2) · ×21arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:312
Duplicated block (6 lines × 2) · ×13arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140
Duplicated block (5 lines × 2) · ×10boot/src/main/java/com/taobao/arthas/boot/DownloadUtils.java:144
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:243
Duplicated block (9 lines × 2) · ×8arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:146

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

What to do

  1. Resolve the 21 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with McpNettyServer.java (2), WatchAdviceListener.java (2), Enhancer.java. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 13 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with McpHttpRequestHandler.java, ReflectUtils.java, TraceView.java. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 10 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with DownloadUtils.java, Enhancer.java, ClassLoaderCommand.java. — One of this dimension's main actionable groups (10 warning-level).

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

D5 · Coupling9.5 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

31 production modules (Maven+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 5 module(s) off the main sequence, with abstractness counted on 25 of the 31 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: math-game · ×2
Off the main sequence: arthas-tunnel-common · ×3

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).

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

D6 · Cohesion (LCOM4)9.4 / 10Stronggated by 14 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

14 of 259 classes have LCOM4 above 3.

Low cohesion: Builder (LCOM4 12) · ×14arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/config/McpServerProperties.java:181

What to do

  1. Resolve the 14 Low cohesion finding(s) in Cohesion (LCOM4) — start with ClassLoaderMetaspaceModel.java (2), McpServerProperties.java, ClassLoaderModel.java. — One of this dimension's main actionable groups (14 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.2 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

2 skipped (2 with a documented reason), 26 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 417 tests (1 harness-style project(s) excluded from the assertion penalty).

No assertions (empty test): contextLoads · ×3arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example/src/test/java/com/example/arthasspringbootstarterexample/ArthasSpringBootStarterExampleApplicationTests.java:10
No assertions: shouldNotLimitArtifactCount · ×16core/src/test/java/com/taobao/arthas/core/mcp/tool/function/basic1000/UploadFileToolTest.java:184
Test project verifies nothing: arthas-jfr-backend · ×3labs/arthas-jfr-backend/src/test/java/org/example/jfranalyzerbackend/JfrAnalyzerBackendApplicationTests.java:10
No direct assertions: testCountInstancesMemoryLeak · ×7arthas-vmtool/src/test/java/arthas/VmToolTest.java:111
Skipped (documented): shouldRetransformOrdinaryClassWithLambdaInName · ×2core/src/test/java/com/taobao/arthas/core/util/InstrumentationUtilsTest.java:20

What to do

  1. Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with ArthasSpringBootStarterExampleApplicationTests.java, ArthasSpringBoot3StarterExampleApplicationTests.java, JfrAnalyzerBackendApplicationTests.java. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 16 No assertions finding(s) in Test Quality — start with FileUtilsTest.java (6), GrpcTest.java (3), GrpcWebProxyServerTest.java (2). — One of this dimension's main actionable groups (16 warning-level).
  3. Resolve the 3 Test project verifies nothing finding(s) in Test Quality — start with JfrAnalyzerBackendApplicationTests.java, ArthasSpringBootStarterExampleApplicationTests.java, ArthasSpringBoot3StarterExampleApplicationTests.java. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene8.0 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

220 outdated artifact(s) of 259 resolved by the build, graded against Maven Central. The poms themselves state a version for only 35 of 185 declaration(s) — the rest are parent- or BOM-managed, which is why this is read from the resolved graph rather than from the manifests. Whether any of these is DEPRECATED is not graded — Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Known CVEs in this graph are D30's question, read from the manifest there.

Outdated (compile): io.netty:netty-common · ×104
Outdated (provided): org.slf4j:slf4j-api · ×59
Outdated (test): org.junit.jupiter:junit-jupiter-engine · ×56
Outdated (runtime): jakarta.xml.bind:jakarta.xml.bind-api

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

1 of 30 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 34 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 150 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 1 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

Banned license: com.mysql:mysql-connector-j

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).

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

D15 · Churn × Complexity Hotspots10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

Top hotspots: core/src/main/java/com/taobao/arthas/core/Arthas.java (2×16=32)

Hotspot: core/src/main/java/com/taobao/arthas/core/Arthas.javacore/src/main/java/com/taobao/arthas/core/Arthas.java:101

What to do

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

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

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

22 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. Counted over 316 of the 900 production source files in this repository: 524 are under the ~2,400-byte size floor this dimension measures over, and the remaining 60 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt9.9 / 10Stronggated by 51 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×48labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:21
FixmeComment · ×2core/src/main/java/com/taobao/arthas/core/util/reflect/FieldUtils.java:304
HackCommentclient/src/main/java/com/taobao/arthas/client/TelnetConsole.java:274

What to do

  1. Resolve the 48 TodoComment finding(s) in Explicit Debt — start with EchoImpl.java (6), SecurityAuthenticatorImpl.java (5), HelloImpl.java (2). — One of this dimension's main actionable groups (48 warning-level).
  2. Resolve the 2 FixmeComment finding(s) in Explicit Debt — start with FieldUtils.java, OptionsCommand.java. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 HackComment finding(s) in Explicit Debt — start with TelnetConsole.java. — One of this dimension's main actionable groups (1 warning-level).

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

2 of 2 documentation facets pass in full. 172 document(s) read across 5 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D26 · Project Cohesion8.2 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

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

3 of 28 build units (Maven, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D27 · Navigability9.6 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

57 % of calls cross a namespace and 8 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

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

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

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.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

102 finding(s): 0 critical, 75 high, 27 medium, 0 low. 53 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 7 file(s) — `REDACTED` (lines 16–22), `REDACTED` (line 404, line 509), `bin/as.sh`, `labs/arthas-grpc-web-proxy/ui/public/index.html` (line 8, line 12), `labs/arthas-grpc-web-proxy/ui/src/assets/proto/ArthasServices_pb.js`, … (+2 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (8 issue-level).
  2. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  3. No action in Static Analysis (SAST) — all 53 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (53 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

229 finding(s): 17 critical, 138 high, 61 medium, 13 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 133 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (53), REDACTED (49), REDACTED (31). — One of this dimension's main actionable groups (133 issue-level).
  2. Resolve the 17 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (17 issue-level).
  3. Resolve the 5 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 issue-level).

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

D31 · IaC & Container Security9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

4 finding(s): 0 critical, 1 high, 3 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).

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

D34 · Knowledge Freshness6.4 / 10Adequate✓ Tool-verified

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

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

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

137 of 376 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. Counted over 376 of the 900 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×7labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1
Orphaned file · ×130arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:1
Further orphaned files (smaller)

What to do

  1. Resolve the 130 Orphaned file finding(s) in Knowledge Freshness — start with HttpNativeAgentHandler.java (3), McpStatelessNettyServer.java, McpServer.java. — One of this dimension's main actionable groups (130 recommendation-level).
  2. Resolve the 7 Orphaned knowledge finding(s) in Knowledge Freshness — start with Analysis.tsx, DefaultTaskManager.java, McpNettyServer.java. — One of this dimension's main actionable groups (7 issue-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 13 platform declaration(s) and 41 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives3.0 / 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.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-component.js:252, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-component.js:252
  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — REDACTED:287

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & 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, a click handler on a plain element names the control it declares, 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.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • 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) — labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:15, labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:18, labs/arthas-grpc-web-proxy/ui/src/view/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) — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:739, labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1043
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — 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. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:769
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×3) — REDACTED:213, web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:159, web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:196
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:205, web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:209
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×3) — web-ui/arthasWebConsole/all/ui/ui/src/components/dialog/InputDialog.vue:49, web-ui/arthasWebConsole/all/ui/ui/src/components/input/SwitchInput.vue:34, web-ui/arthasWebConsole/all/ui/ui/src/views/async/Tt.vue:246

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.0 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — labs/arthas-grpc-web-proxy/ui/public/index.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it. (×14) — labs/arthas-grpc-web-proxy/ui/public/index.html:2, labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/agents.html:2, labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/console.html:2, …
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. — labs/arthas-jfr-frontend/index.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.
AC4 · Keyboard semantics2.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, 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.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • 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) — web-ui/arthasWebConsole/all/native-agent/src/Process.vue:137, web-ui/arthasWebConsole/all/ui/ui/src/components/routeTo/SelectCmd.vue:16

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • <div> moves — its inline style sets `animation: pulse 2s infinite` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:904
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×5) — web-ui/arthasWebConsole/all/ui/ui/src/components/dialog/InputDialog.vue:49, web-ui/arthasWebConsole/all/ui/ui/src/views/async/Tt.vue:246, web-ui/arthasWebConsole/all/ui/ui/src/views/sync/HeapDump.vue:45, …
  • `.badge-primary` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-outline.btn-primary .badge` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-outline.btn-secondary .badge` sets color: hsl(0 0% 100% / 1) on background-color: hsl(316 70% 50% / 1) — 4.4: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-outline.btn-accent .badge` sets color: hsl(0 0% 100% / 1) on background-color: hsl(175 70% 41% / 1) — 2.6: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-outline.btn-primary:hover .badge` sets color: hsl(212 100% 51% / 1) on background-color: hsl(212 100% 90% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-outline.btn-secondary:hover .badge` sets color: hsl(316 70% 50% / 1) on background-color: hsl(0 0% 100% / 1) — 4.4: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-outline.btn-accent:hover .badge` sets color: hsl(175 70% 41% / 1) on background-color: hsl(0 0% 100% / 1) — 2.6: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-primary` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn-group>input[type=radio]:checked.btn,.btn-group>.btn-active` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.menu :where(li:not(.menu-title):not(:empty))>:where(:not(ul).active),.menu :where(li:not(.menu-title):not(:empty))>:where(*:not(ul):active)` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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). — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.sidebar-tree-toggle:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — site/docs/.vuepress/theme/components/SidebarItem.vue:240
  • `.sidebar-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — site/docs/.vuepress/theme/components/SidebarItems.vue:174
  • `.sidebar-search-clear:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — site/docs/.vuepress/theme/components/SidebarItems.vue:208
  • `.xterm.focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/xterm-2831e07f.css:32
  • `.badge` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.badge` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.badge` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn` moves (`animation: button-pop var(--animation-btn, .25s) ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.btn.loading:before` moves (`animation: spin 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.dropdown .dropdown-content` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.dropdown .dropdown-content` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.dropdown .dropdown-content` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.input` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.input` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.input` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.select` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.select` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.select` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.checkbox:checked` moves (`animation: checkmark var(--animation-input, .2s) ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1
  • `.checkbox:indeterminate` moves (`animation: checkmark var(--animation-input, .2s) ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/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.
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.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • 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 was searched, so you can tell an absence from a miss: the 90 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here. — web-ui/arthasWebConsole/package.json:34

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.
AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

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

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

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

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

What to do

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

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `ArthasAgent` is a singleton (@Bean: the container shares one instance across every request thread) but mutates instance state outside any lock (instrumentation, arthasHome, errorMessage; e.g. `instrumentation` in `init` at line 77). — arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/ArthasAgent.java:19
  • `TunnelServer` is a singleton (@Bean: the container shares one instance across every request thread) but mutates instance state outside any lock (path, channel; e.g. `path` in `setPath` at line 231). — tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelServer.java:35

What to do

  • Java/Kotlin: keep container singletons stateless — move per-request data into locals or a request-scoped bean — or back the state with java.util.concurrent types (ConcurrentHashMap, AtomicInteger/AtomicReference), guard it with synchronized / a Lock (Kotlin: withLock), or mark a flag that is only ever overwritten volatile (@Volatile).
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

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

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

AX6 · Interface segregation9.8 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `CommandProcess` declares 26 abstract methods: `appendResult`, `args`, `argsTokens`, `backgroundHandler`, `cacheLocation`, `commandLine`, `echoTips`, `end`, `end`, `end`, `endHandler`, `foregroundHandler`, `interruptHandler`, `isForeground`, `isRunning`, `register`, `resizehandler`, `resume`, `resumeHandler`, `session`, `stdinHandler`, `suspend`, `suspendHandler`, `times`, `unregister`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 26 declarations carry 24 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 24 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/src/main/java/com/taobao/arthas/core/shell/command/CommandProcess.java:20
  • `Session` declares 21 abstract methods: `get`, `getCommandResolvers`, `getCreateTime`, `getForegroundJob`, `getInstrumentation`, `getLastAccessTime`, `getLock`, `getPid`, `getResultDistributor`, `getSessionId`, `getUserId`, `isLocked`, `isTty`, `put`, `remove`, `setForegroundJob`, `setLastAccessTime`, `setResultDistributor`, `setUserId`, `tryLock`, `unLock`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/src/main/java/com/taobao/arthas/core/shell/session/Session.java:16
  • `Job` declares 17 abstract methods under just 15 distinct name(s): `getSession`, `id`, `interrupt`, `isRunInBackground`, `line`, `process`, `resume`, `resume`, `run`, `run`, `setTimeoutDate`, `status`, `suspend`, `terminate`, `timeoutDate`, `toBackground`, `toForeground`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 17 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 17 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — core/src/main/java/com/taobao/arthas/core/shell/system/Job.java:16
  • `Process` declares 27 abstract methods: `cacheLocation`, `exitCode`, `getSession`, `getTty`, `interrupt`, `interrupt`, `resume`, `resume`, `resume`, `resume`, `run`, `run`, `setJobId`, `setSession`, `setTty`, `startTime`, `status`, `suspend`, `suspend`, `terminate`, `terminate`, `terminatedHandler`, `times`, `toBackground`, `toBackground`, `toForeground`, `toForeground`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 27 declarations carry 18 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 18 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/src/main/java/com/taobao/arthas/core/shell/system/Process.java:14
  • `ArthasStreamObserver<T>` declares 18 abstract methods: `appendResult`, `end`, `end`, `end`, `getInstrumentation`, `getJobId`, `getListener`, `getPorcessStatus`, `getRequestModel`, `onCompleted`, `onError`, `onNext`, `register`, `setProcessStatus`, `setRequestModel`, `times`, `unregister`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 18 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/observer/ArthasStreamObserver.java:11

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
  • Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Java: methods that only throw a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `updateAdviceListeners` has an empty body — confirm it's an intentional no-op and not an unfinished method. (×2) — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:208, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:182

What to do

  • Clear the softer debt: re-enable or delete @Disabled/@Ignore tests, decide whether each empty method or UnsupportedOperationException is deliberate (and say so in a comment), and replace @SuppressWarnings("all") with targeted, justified suppressions.
M1 · Documentation (README)7.6 / 10Strong✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Describe the projects a newcomer cannot place from the root README: 18 of 35 have no README of their own, in their folder or in their family's project (`agent`, `arthas-agent-attach`, `arthas-external-command-integration-test`, `arthas-model`, `arthas-spring-boot-starter` and 13 more).
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P10 · Library API & versioning9.3 / 10Exemplary✓ Tool-verified

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 1 public type in `com.taobao.arthas.core.advisor` is marked as implementation by its own namespace, folder or name: `SpyImpl` (core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:24, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:24
  • 1 public type in `com.taobao.arthas.core.command` is marked as implementation by its own namespace, folder or name: `CommandExecutorImpl` (core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:40, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:40
  • 5 public types in `com.taobao.arthas.core.distribution.impl` are marked as implementation by their own namespace, folder or name: `CompositeResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/CompositeResultDistributorImpl.java:16, `impl`), `PackingResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/PackingResultDistributorImpl.java:15, `impl`), `ResultConsumerImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/ResultConsumerImpl.java:22, `impl`), `SharingResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/SharingResultDistributorImpl.java:23, `impl`), `TermResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/TermResultDistributorImpl.java:14, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/distribution/impl/CompositeResultDistributorImpl.java:16
  • 1 public type in `com.taobao.arthas.core.security` is marked as implementation by its own namespace, folder or name: `SecurityAuthenticatorImpl` (core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:19, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:19
  • 1 public type in `com.taobao.arthas.core.shell.cli.impl` is marked as implementation by its own namespace, folder or name: `CliTokenImpl` (core/src/main/java/com/taobao/arthas/core/shell/cli/impl/CliTokenImpl.java:13, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/shell/cli/impl/CliTokenImpl.java:13
  • 2 public types in `com.taobao.arthas.core.shell.command.impl` are marked as implementation by their own namespace, folder or name: `AnnotatedCommandImpl` (core/src/main/java/com/taobao/arthas/core/shell/command/impl/AnnotatedCommandImpl.java:18, `impl`), `CommandBuilderImpl` (core/src/main/java/com/taobao/arthas/core/shell/command/impl/CommandBuilderImpl.java:15, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/shell/command/impl/AnnotatedCommandImpl.java:18
  • 9 public types in `com.taobao.arthas.core.shell.command.internal` are marked as implementation by their own namespace, folder or name: `CloseFunction` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/CloseFunction.java:8, `internal`), `GrepHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/GrepHandler.java:16, `internal`), `PlainTextHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/PlainTextHandler.java:11, `internal`), `RedirectHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/RedirectHandler.java:17, `internal`), `StatisticsFunction` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/StatisticsFunction.java:10, `internal`), `StdoutHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/StdoutHandler.java:12, `internal`), `TeeHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/TeeHandler.java:16, `internal`), `TermHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/TermHandler.java:10, `internal`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/shell/command/internal/CloseFunction.java:8
  • 1 public type in `com.taobao.arthas.core.shell.history.impl` is marked as implementation by its own namespace, folder or name: `HistoryManagerImpl` (core/src/main/java/com/taobao/arthas/core/shell/history/impl/HistoryManagerImpl.java:17, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/shell/history/impl/HistoryManagerImpl.java:17
  • 2 public types in `com.taobao.arthas.core.shell.impl` are marked as implementation by their own namespace, folder or name: `ShellImpl` (core/src/main/java/com/taobao/arthas/core/shell/impl/ShellImpl.java:53, `impl`), `ShellServerImpl` (core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:44, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/shell/impl/ShellImpl.java:53
  • 2 public types in `com.taobao.arthas.core.shell.session.impl` are marked as implementation by their own namespace, folder or name: `SessionImpl` (core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionImpl.java:18, `impl`), `SessionManagerImpl` (core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionManagerImpl.java:24, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionImpl.java:18

What to do

  • Hide `com.taobao.arthas.core.advisor` (`SpyImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.command` (`CommandExecutorImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.distribution.impl` (`CompositeResultDistributorImpl`, `PackingResultDistributorImpl`, `ResultConsumerImpl`, `SharingResultDistributorImpl`, `TermResultDistributorImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.security` (`SecurityAuthenticatorImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.shell.cli.impl` (`CliTokenImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.shell.command.impl` (`AnnotatedCommandImpl`, `CommandBuilderImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.shell.command.internal` (`CloseFunction`, `GrepHandler`, `PlainTextHandler`, `RedirectHandler`, `StatisticsFunction`, `StdoutHandler`, `TeeHandler`, `TermHandler`, and 1 more) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.shell.history.impl` (`HistoryManagerImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.shell.impl` (`ShellImpl`, `ShellServerImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `com.taobao.arthas.core.shell.session.impl` (`SessionImpl`, `SessionManagerImpl`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability9.3 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 13/17 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example`, `arthas-spring-boot-starter/src/it/arthas-spring-boot3-starter-example`, `client`, `math-game`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

  • `labs/arthas-grpc-web-proxy/ui/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — labs/arthas-grpc-web-proxy/ui/package.json:10

What to do

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

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

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

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/DefaultToolCallbackProvider.java:93, REDACTED:81, core/src/main/java/com/taobao/arthas/core/util/reflect/ArthasReflectUtils.java:68, …

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

  • Hibernate ddl-auto builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt Flyway or Liquibase, with `ddl-auto` set to `validate`, so every schema change is a versioned file applied the same way in every environment. — labs/arthas-jfr-backend/src/main/resources/application.yml:18

What to do

  • Replace Hibernate ddl-auto with Flyway or Liquibase, with `ddl-auto` set to `validate` so the production schema can evolve safely and reproducibly.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety8.5 / 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.
R10 · Code Duplication8.8 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:2 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:2 — these 2 files are line-for-line copies of one another — 701 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:2
  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:2 — these 2 files are line-for-line copies of one another — 347 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2
  • web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1 · web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:1 — these 2 files are line-for-line copies of one another — 274 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1
  • labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:222 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:560 — 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. — labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:222
  • labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:115 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:453 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:115
  • labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:282 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:373 — the two spans are one implementation copied and then locally edited — 460 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:282
  • labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:369 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:369
  • web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:119 · web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:288 — the two spans are one implementation copied and then locally edited — 118 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:119
  • web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:60 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:106 — the two spans are one implementation copied and then locally edited — 74 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:60
  • web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:17 · web-ui/arthasWebConsole/all/ui/ui/src/views/config/Vmoption.vue:13 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:17
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:22 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:83 — the two spans are one implementation copied and then locally edited — 185 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:22
  • labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:723 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:752 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:723
  • labs/arthas-grpc-web-proxy/ui/src/view/pwdView.vue:48 · labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:94 — the two spans are one implementation copied and then locally edited — 133 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — labs/arthas-grpc-web-proxy/ui/src/view/pwdView.vue:48
  • labs/arthas-jfr-frontend/src/utils/color.ts:84 · labs/arthas-jfr-frontend/src/utils/color.ts:103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — labs/arthas-jfr-frontend/src/utils/color.ts:84
  • labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:333 · labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:351 · labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:369 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:333
  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-component.js:3 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-component.js:3 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-component.js:3
  • web-ui/arthasWebConsole/all/ui/ui/src/components/input/ClassInput.vue:18 · web-ui/arthasWebConsole/all/ui/ui/src/components/input/MethodInput.vue:25 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web-ui/arthasWebConsole/all/ui/ui/src/components/input/ClassInput.vue:18
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:41 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:54 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:68 — 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. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:41
  • web-ui/arthasWebConsole/all/ui/ui/src/views/async/Profiler.vue:82 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Thread.vue:162 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Profiler.vue:82
  • web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:22 · web-ui/arthasWebConsole/all/ui/ui/src/views/config/Sysprop.vue:12 · web-ui/arthasWebConsole/all/ui/ui/src/views/config/Vmoption.vue:18 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:22
  • labs/arthas-jfr-frontend/src/services/jfr.ts:8 · labs/arthas-jfr-frontend/src/services/jfr.ts:26 — 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. — labs/arthas-jfr-frontend/src/services/jfr.ts:8
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassLoader.vue:157 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassLoader.vue:171 — 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. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassLoader.vue:157
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:10 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Memory.vue:10 — the two spans are one implementation copied and then locally edited — 61 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:10
  • web-ui/arthasWebConsole/all/ui/ui/src/views/async/Stack.vue:54 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Tt.vue:140 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Watch.vue:73 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Stack.vue:54
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/HeapDump.vue:9 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Memory.vue:8 — the two spans are one implementation copied and then locally edited — 52 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/HeapDump.vue:9
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:73 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:88 — 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. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:73
  • labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:228 · labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:228
  • labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:609 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:625 — 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. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:609
  • web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:9 · web-ui/arthasWebConsole/all/ui/ui/src/stores/public.ts:5 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:9
  • web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:189 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Trace.vue:96 — the two spans are one implementation copied and then locally edited — 57 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:189
  • labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:120 · labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:149 · labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:169 — all 3 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. — labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:120
  • labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:107 · labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:127 — 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. — labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:107
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:52 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:76 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:91 — all 3 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. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:52
  • labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:592 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:617 — 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. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:592

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries5.1 / 10Adequate✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • web-ui/arthasWebConsole/all/ui/ui/src/machines/transformConfigMachine.ts:2 imports xstate/lib/actions, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web-ui/arthasWebConsole/all/ui/ui/src/machines/transformConfigMachine.ts:2
  • web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:5 imports xstate/lib/waitFor, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:5
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:2 imports highlight.js/lib/common, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:2
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:9 imports xstate/lib/waitFor, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:9
  • web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Ognl.vue:2 imports highlight.js/lib/common, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Ognl.vue:2

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity7.4 / 10Strong✓ Tool-verified

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

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

  • Analysis has cyclomatic complexity 68 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:73
  • draw has cyclomatic complexity 36 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:266
  • toReadableValue has cyclomatic complexity 25 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/utils/format.ts:45
  • FlameStats has cyclomatic complexity 24 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:36
  • colorForFunctionType has cyclomatic complexity 22 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/utils/color.ts:41
  • handleFilterValuesChecked has cyclomatic complexity 19 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:354
  • handleToggleFilterValuesChecked has cyclomatic complexity 18 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:436
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:21
  • (anonymous) has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1155
  • render has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:242, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:242
  • getObject has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:222, labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:560
  • needReportSuccess has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:304
  • touch has cyclomatic complexity 12 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:392, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:392
  • (anonymous) has cyclomatic complexity 12 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Trace.vue:21
  • findFrame has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:884, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:884

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files7.1 / 10Strong✓ 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.

  • labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx has 1203 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1
  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js has 907 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:1
  • labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js has 907 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:1
  • labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue has 638 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:1
  • web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts has 483 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1
  • web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts has 477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:1
  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:1
  • labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
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 — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.7 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
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 ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add a test runner (vitest / jest / playwright) as package.json scripts and run them in CI.
R7 · Dead Code6.3 / 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.

  • Unreachable from the 19 application, 12 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×11) — labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-component.js, …
  • Nothing imports this binding — it is safe to review for removal. (×11) — labs/arthas-jfr-frontend/src/services/jfrService.ts:43, labs/arthas-jfr-frontend/src/services/jfrService.ts:70, labs/arthas-jfr-frontend/src/services/jfrService.ts:76, …
  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×3) — labs/arthas-jfr-frontend/src/pages/Home/index.tsx:7, labs/arthas-jfr-frontend/src/utils/format.ts:154, web-ui/arthasWebConsole/all/ui/ui/src/views/async/Watch.vue:30

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene9.5 / 10Exemplary✓ Tool-verified

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 — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.3 / 10Strong✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts → web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts → web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts — web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:2

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

  • `length` is read from the bytes being parsed at line 101 (`readInt`), then used to size a `new byte[]` at line 102 — and nowhere in its scope is `length` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `length` against the bytes actually remaining and a maximum the format allows before allocating. — labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/GrpcRequest.java:102

What to do

  • Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness7.2 / 10Strong✓ Tool-verified

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

  • `SharingResultDistributorImpl` declares `close()` — so it has told every caller, and every try-with-resources, that it holds something worth releasing — and it creates `sharingResultConsumer` itself (line 33, `new SharingResultConsumerImpl(…)`), which makes that instance its own. But `sharingResultConsumer` is named in none of the methods the disposal search covered: `close` (line 120) — that is `close()` plus every method it calls on `this` BY NAME, so a release reached through a superclass, a callback or a registry is not followed and is worth checking before acting. The field is released nowhere else in the class and is never handed to anything else, so no other owner can be releasing it. On what was read, closing this object releases everything except the one thing it owns: whatever `new SharingResultConsumerImpl(…)` holds — a file descriptor, a socket, a pool's live threads — outlives it, and a long-running process runs out of them one closed instance at a time. Release it in `close()` (`sharingResultConsumer.close()`), or, if it truly does not need releasing, drop the `close()` so the claim and the behaviour agree. — core/src/main/java/com/taobao/arthas/core/distribution/impl/SharingResultDistributorImpl.java:33

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 0/3 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `getVersionByMaven` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — site/docs/.vuepress/plugins/vuepress-plugin-loadVersion/index.js:9
  • `fetchJfrMetadata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — labs/arthas-jfr-frontend/src/services/jfr.ts:3
  • `fetchJfrFlameGraph` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — labs/arthas-jfr-frontend/src/services/jfr.ts:21

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation7.5 / 10Strong✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `trace` at line 48 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 48), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on. — common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:48
  • `trace` at line 52 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 52), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on. — common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:52
  • `trace` at line 66 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 66), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on. — common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:66
  • `trace` at line 70 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 70), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on. — common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:70

What to do

  • In Java, put the construction behind the logger's own check (`if (log.isDebugEnabled())` for SLF4J and Log4j, `if (logger.isLoggable(Level.FINE))` for java.util.logging), or hand the logger a lambda it calls only when the level is on (Log4j 2's `Supplier` overloads, SLF4J 2's `log.atDebug().addArgument(() -> …)`). A `{}` placeholder alone is not the fix: it defers the formatting, not the stream, join or serialisation in the argument.
X24 · Document value interpolated into markup unescaped3.5 / 10Weak✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `keys[i]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:445, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:445
  • `details[keys[i]]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:446, labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:446

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling5.4 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `.catch(_ => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — web-ui/arthasWebConsole/all/ui/ui/src/router/index.ts:15
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×28) — memorycompiler/src/main/java/com/taobao/arthas/compiler/PackageInternalsFinder.java:87, labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/ArthasHomeHandler.java:32, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:94, …
  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×7) — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/util/PathSecurityUtil.java:79, labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/util/PathSecurityUtil.java:159, labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocationsExtractor.java:52, …
  • `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — core/src/main/java/com/taobao/arthas/core/Arthas.java:239, core/src/main/java/com/taobao/arthas/core/util/ClassLoaderUtils.java:178, core/src/main/java/com/taobao/arthas/core/util/DateUtils.java:36, …

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging5.6 / 10Adequate✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info` at line 146 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:146
  • `info` at line 155 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:155
  • `info` at line 162 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:162
  • `info` at line 305 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:305
  • `warn` at line 58 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — REDACTED:58
  • `info` at line 102 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:102
  • `info` at line 79 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ProxyClient.java:79
  • `error` at line 174 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClientSocketClientHandler.java:174
  • `error` at line 75 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:75
  • `info` at line 55 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:55
  • `info` at line 129 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:129
  • `info` at line 150 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:150
  • `info` at line 168 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:168
  • `info` at line 185 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:185
  • `error` at line 188 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:188
  • `error` at line 74 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/EtcdNativeAgentRegistry.java:74
  • `info` at line 51 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/ZookeeperNativeAgentRegistry.java:51
  • `info` at line 46 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/JvmAttachmentHandler.java:46
  • `error` at line 48 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/JvmAttachmentHandler.java:48
  • `error` at line 51 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/ListJvmProcessHandler.java:51
  • `info` at line 268 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:268
  • `warn` at line 121 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/WallClockExtractor.java:121
  • `error` at line 72 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:72
  • `info` at line 128 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:128
  • `warn` at line 138 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:138
  • `warn` at line 120 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/MessageDeframer.java:120
  • `info` at line 47 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/server/GrpcWebProxyServer.java:47
  • `warn` at line 98 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:98
  • `warn` at line 105 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:105
  • `warn` at line 165 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:165
  • `warn` at line 172 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:172
  • `info` at line 435 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:435
  • `info` at line 442 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:442
  • `info` at line 485 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:485
  • `info` at line 54 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/server/GrpcServer.java:54
  • `info` at line 113 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/server/httpServer/NettyHttpStaticFileHandler.java:113
  • `info` at line 115 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/server/httpServer/NettyHttpStaticFileHandler.java:115
  • `info` at line 121 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/server/httpServer/NettyHttpStaticFileHandler.java:121
  • `info` at line 29 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — core/src/main/java/com/taobao/arthas/core/shell/term/impl/Helper.java:29
  • `error` at line 60 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text. — core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:60

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types5.7 / 10Adequate✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 2/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~1.2 `!` null assertions per 1k TypeScript source lines — 6 assertion(s) across the 5201 source line(s) of the 39 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts (3), web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health57%AdequateAcceptable, with room to improve.
Architecture73%StrongSolid.
Maturity75%StrongSolid.
Readiness37%Weak — gated by R4, P7, P8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security62%Checked 5 of 11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility38%Weak — gated by AC1, AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 39 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.

  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • 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.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • 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.
  • 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.
  • D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Java, JavaScript, Python, html not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. 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 — 288 of 288 comment blocks were not judged (255 in a non-Latin script, 33 in a language other than English): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • D25 ADR Conformance — no ADRs to check
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 47 value object(s); 1 repository port(s) loading or saving an aggregate/entity
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (32 CQRS handler(s))
  • ED5 Idempotency — Not assessed, and this one is on us: 32 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a REDACTED, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • 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.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 274 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×133
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 108 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 28 more in this group — see findings.md.
AC2 · Forms & labels · <input> without a programmatic label · ×23
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:15 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:18 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:55 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:9 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:14 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:19 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:24 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:34 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:39 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:8 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:13 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:18 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:23 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:43 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:48 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:70 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:75 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:92 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:158 — 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.
  • <input> without a programmatic label labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:163 — 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.
  • <input> without a programmatic label web-ui/arthasWebConsole/all/ui/ui/src/components/dialog/InputDialog.vue:49 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web-ui/arthasWebConsole/all/ui/ui/src/components/input/SwitchInput.vue:34 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web-ui/arthasWebConsole/all/ui/ui/src/views/async/Tt.vue:246 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D30 · Dependency Vulnerabilities · Critical CVE · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×7
  • Orphaned knowledge labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1 — 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 arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:1 — 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 arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:1 — 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:1 — 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 arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/InMemoryTaskStore.java:1 — 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 labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:1 — 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:1 — 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.
D30 · Dependency Vulnerabilities · High vulnerability · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×3
  • <label> that labels no control REDACTED:213 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:159 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:196 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D10 · Test Quality · No assertions (empty test) · ×3
  • No assertions (empty test): contextLoads arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example/src/test/java/com/example/arthasspringbootstarterexample/ArthasSpringBootStarterExampleApplicationTests.java:10 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): contextLoads arthas-spring-boot-starter/src/it/arthas-spring-boot3-starter-example/src/test/java/com/example/arthasspringboot3starterexample/ArthasSpringBoot3StarterExampleApplicationTests.java:10 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): contextLoads labs/arthas-jfr-backend/src/test/java/org/example/jfranalyzerbackend/JfrAnalyzerBackendApplicationTests.java:10 — Test method has an empty body — it asserts nothing and exercises no code.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:205 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web-ui/arthasWebConsole/all/ui/ui/src/components/NavHeader.vue:209 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative REDACTED:287 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang labs/arthas-grpc-web-proxy/ui/public/index.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
D14 · License Compliance · Banned license · ×1
  • Banned license: com.mysql:mysql-connector-j — `com.mysql:mysql-connector-j` 8.0.33 is published on Maven Central under `GPL-2.0`, which this policy bans, and this repository declares it in a Maven or Gradle manifest. The licence was read from the artifact's POM `<licenses>` block — following `<parent>` where the POM inherits them — and normalised to SPDX before it was judged, because Maven publishes the name as free text (`GNU Affero General Public License v3` is AGPL-3.0). Where a POM lists several licences they are read as a CHOICE, per Maven's own documentation, so this is charged only because EVERY listed licence is banned. Replace the dependency, or record an accepted exception.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:2 — web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts → web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts → web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts
Serious — 847 finding(s)
D30 · Dependency Vulnerabilities · Medium CVE · ×55
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 30 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×48
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:21 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:33 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:58 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:65 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:71 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/EchoImpl.java:77 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/HelloImpl.java:13 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/grpcService/HelloImpl.java:27 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:42 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:48 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:54 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:85 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:91 — // TODO Auto-generated method stub — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/view/GrpcResultViewResolver.java:94 — //TODO 检查model的type是否重复,避免复制代码带来的bug — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:97 — //TODO 检查model的type是否重复,避免复制代码带来的bug — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:34 — // TODO listener 只用查一次,放到 thread local里保存起来就可以了! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:34 — // TODO listener 只用查一次,放到 thread local里保存起来就可以了! — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/objectUtils/JavaObjectConverter.java:105 — // TODO ignore ? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/util/FileUtils.java:94 — // 需要改写 auth command, TODO 更准确应该是用mask去掉密码信息 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/util/affect/EnhancerAffect.java:136 — //TODO removing EnhancerAffect.toString(), replace with ViewRenderUtil.renderEnhancerAffect() — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/shell/term/TermServer.java:34 — // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:49 — // TODO: charset and inputrc from options — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/shell/term/impl/TelnetTermServer.java:45 — // TODO: charset and inputrc from options — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:53 — // TODO: charset and inputrc from options — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/session/HttpSessionManager.java:36 — // TODO 增加从 url中获取 session id 功能? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 23 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×29
  • Swallowed exception (empty catch) web-ui/arthasWebConsole/all/ui/ui/src/router/index.ts:15 — `.catch(_ => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) memorycompiler/src/main/java/com/taobao/arthas/compiler/PackageInternalsFinder.java:87 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/ArthasHomeHandler.java:32 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:94 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/utils/ReflectUtil.java:30 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/Arthas.java:391 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/Arthas.java:412 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/Arthas.java:422 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/Arthas.java:437 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:655 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/util/ArthasBanner.java:154 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/util/IPUtils.java:64 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:206 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:474 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:494 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/util/UserStatUtil.java:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/shell/term/impl/Helper.java:31 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/shell/system/impl/GlobalJobControllerImpl.java:125 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/shell/handlers/shell/ShellLineHandler.java:76 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:218 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:508 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:799 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:813 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:891 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:990 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 4 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×21
  • TooManyMethods: Ansi core/src/main/java/com/taobao/arthas/core/view/Ansi.java:12 — TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StringUtils core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:38 — TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Bootstrap boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:64 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SocketClient client/src/main/java/org/apache/commons/net/SocketClient.java:55 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ArthasBootstrap core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:104 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Telnet client/src/main/java/org/apache/commons/net/telnet/Telnet.java:28 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TimeTunnelCommand core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:52 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Configure core/src/main/java/com/taobao/arthas/core/config/Configure.java:23 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ClassLoaderMetaspaceCommand core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:56 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WatchRequestModel labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/WatchRequestModel.java:14 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ClassLoaderCommand core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:62 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LineCommand core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java:40 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ClassDetailVO core/src/main/java/com/taobao/arthas/core/command/model/ClassDetailVO.java:7 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DefaultTaskManager arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:28 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnsiLog common/src/main/java/com/taobao/arthas/common/AnsiLog.java:23 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WatchCommand core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchCommand.java:35 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CommandProcessImpl core/src/main/java/com/taobao/arthas/core/shell/system/impl/ProcessImpl.java:394 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: McpNettyServer arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:29 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: McpNettyServerExchange arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServerExchange.java:42 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StreamableServerNettySpecification arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServer.java:41 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ProcessImpl core/src/main/java/com/taobao/arthas/core/shell/system/impl/ProcessImpl.java:38 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×21
  • 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) 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-337 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:347-353 — both copies are in the same file, so extract the 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) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:753 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:753-759 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:499-505 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 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-394 | core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:401-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `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 (7 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-121 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:120-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: `Level` names `ch.qos.logback.classic.Level` in one and `org.apache.log4j.Level` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 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-218 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/EnhancerRequestModel.java:76-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/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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:209` calls `appendResult`, `create` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/EnhancerRequestModel.java:74` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) 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-102 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/WatchRpcAdviceListener.java:114-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 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-68 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TraceTool.java:49-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:175 — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:175-181 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:210-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:209` calls `addFlag` and `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java:174` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/ExtHttpTtyConnection.java:75 — core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/ExtHttpTtyConnection.java:75-81 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:160-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/ExtHttpTtyConnection.java:75` 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) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:32 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:32-38 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:35-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClientSocketClientHandler.java:79 — tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClientSocketClientHandler.java:79-85 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ProxyClient.java:57-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClientSocketClientHandler.java:79` 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/command/view/ResultViewResolver.java:102 — core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:102-108 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/view/GrpcResultViewResolver.java:99-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `view` to `ResultView` in one and `GrpcResultView` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:33 — core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:33-39 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:37-43 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java` and `core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:230 — core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:230-236 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/server/httpServer/NettyHttpStaticFileHandler.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) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java:65 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java:65-71 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpRequestHandler.java:47-53 — before extracting anything, compare `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java` and `labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpRequestHandler.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:119 — core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:119-125 | core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java:206-212 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:1070 — core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:1070-1076 | core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:420-426 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:39 — core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:39-45 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/WatchRpcAdviceListener.java:54-60 — 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.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×20
  • Animation without a prefers-reduced-motion guard labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:904 — <div> moves — its inline style sets `animation: pulse 2s infinite` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.badge` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.badge` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.badge` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn` moves (`animation: button-pop var(--animation-btn, .25s) ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn.loading:before` moves (`animation: spin 2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.dropdown .dropdown-content` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.dropdown .dropdown-content` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.dropdown .dropdown-content` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.input` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.input` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.input` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.select` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.select` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.select` moves (`transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.checkbox:checked` moves (`animation: checkmark var(--animation-input, .2s) ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.checkbox:indeterminate` moves (`animation: checkmark var(--animation-input, .2s) ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D10 · Test Quality · No assertions · ×16
  • No assertions: shouldNotLimitArtifactCount core/src/test/java/com/taobao/arthas/core/mcp/tool/function/basic1000/UploadFileToolTest.java:184 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shouldNotLogSuccessfulSameMountNamespaceAttach core/src/test/java/com/taobao/arthas/core/server/ArthasBootstrapTest.java:128 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOpenOutputStreamCannotWrite core/src/test/java/com/taobao/arthas/core/util/FileUtilsTest.java:51 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testOpenOutputStreamIsDirectory core/src/test/java/com/taobao/arthas/core/util/FileUtilsTest.java:42 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testReadFileToString core/src/test/java/com/taobao/arthas/core/util/FileUtilsTest.java:84 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSaveCommandHistory core/src/test/java/com/taobao/arthas/core/util/FileUtilsTest.java:94 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testWriteByteArrayToFile core/src/test/java/com/taobao/arthas/core/util/FileUtilsTest.java:67 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testWriteByteArrayToFileWithAppend core/src/test/java/com/taobao/arthas/core/util/FileUtilsTest.java:75 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: test labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/CorsUtilsTest.java:11 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: simpleReqTest labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/GrpcWebProxyServerTest.java:56 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: streamReqTest labs/arthas-grpc-web-proxy/src/test/java/com/taobao/arthas/grpcweb/proxy/server/GrpcWebProxyServerTest.java:106 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDeserializationWithUnauthorizedClass tunnel-common/src/test/java/com/alibaba/arthas/tunnel/common/SimpleHttpResponseTest.java:49 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: contextLoads tunnel-server/src/test/java/com/alibaba/arthas/tunnel/server/app/ArthasTunnelApplicationTest.java:18 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testBiStream labs/arthas-grpc-server/src/test/java/unittest/grpc/GrpcTest.java:229 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testServerStream labs/arthas-grpc-server/src/test/java/unittest/grpc/GrpcTest.java:194 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testUnary labs/arthas-grpc-server/src/test/java/unittest/grpc/GrpcTest.java:60 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
AC3 · Page structure · Page without a main landmark · ×15
  • Page without a main landmark labs/arthas-grpc-web-proxy/ui/public/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark labs/arthas-jfr-frontend/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/agents.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/console.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/processes.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/native-agent/agents.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/native-agent/console.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/native-agent/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/native-agent/processes.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/tunnel/agents.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/tunnel/apps.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/tunnel/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/ui/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark web-ui/arthasWebConsole/all/ui/ui/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="app">, so there is no content here to wrap — render the <main> from the component mounted into it.
D29 · Static Analysis (SAST) · REDACTED · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×15
  • ClassTooLong: Analysis labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1 — ClassTooLong — 969 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 569 over it, 2.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FlameGraph labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:2 — ClassTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 299 over it, 1.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FlameGraph labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:2 — ClassTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 299 over it, 1.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ClassLoaderCommand core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:62 — ClassTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 240 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ClassLoaderMetaspaceCommand core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:56 — ClassTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 236 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ArthasBootstrap core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:104 — ClassTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 166 over it, 1.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Bootstrap boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:64 — ClassTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 110 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: StringUtils core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:38 — ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DefaultTaskManager arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:28 — ClassTooLong — 444 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 44 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Ansi core/src/main/java/com/taobao/arthas/core/view/Ansi.java:12 — ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 400 significant lines; this is 22 over it, 1.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: McpStreamableHttpRequestHandler arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:46 — ClassTooLong — 421 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 21 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Telnet client/src/main/java/org/apache/commons/net/telnet/Telnet.java:28 — ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 16 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ObjectView core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:27 — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 10 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ProcessImpl core/src/main/java/com/taobao/arthas/core/shell/system/impl/ProcessImpl.java:38 — ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ObjectUtils core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:11 — ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 2 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D6 · Cohesion (LCOM4) · Low cohesion · ×14
  • Low cohesion: Builder (LCOM4 12) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/config/McpServerProperties.java:181 — Builder's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ClassLoaderModel (LCOM4 12) core/src/main/java/com/taobao/arthas/core/command/model/ClassLoaderModel.java:14 — ClassLoaderModel's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TimeFragmentVO (LCOM4 11) core/src/main/java/com/taobao/arthas/core/command/model/TimeFragmentVO.java:9 — TimeFragmentVO's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TimeTunnelModel (LCOM4 9) core/src/main/java/com/taobao/arthas/core/command/model/TimeTunnelModel.java:10 — TimeTunnelModel's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Row (LCOM4 8) core/src/main/java/com/taobao/arthas/core/command/model/ClassLoaderMetaspaceModel.java:58 — Row's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ApiResponse (LCOM4 7) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/ApiResponse.java:7 — ApiResponse's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Builder (LCOM4 6) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/CreateTaskOptions.java:60 — Builder's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Options (LCOM4 5) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerMarkdown.java:23 — Options's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AbstractArthasTool (LCOM4 5) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/AbstractArthasTool.java:21 — AbstractArthasTool's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ShellServerOptions (LCOM4 5) core/src/main/java/com/taobao/arthas/core/shell/ShellServerOptions.java:12 — ShellServerOptions's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ArthasSampleServiceImpl (LCOM4 5) labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/service/impl/ArthasSampleServiceImpl.java:23 — ArthasSampleServiceImpl's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Builder (LCOM4 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/TaskManagerOptions.java:60 — Builder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ClassLoaderMetaspaceModel (LCOM4 4) core/src/main/java/com/taobao/arthas/core/command/model/ClassLoaderMetaspaceModel.java:10 — ClassLoaderMetaspaceModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DumpClassModel (LCOM4 4) core/src/main/java/com/taobao/arthas/core/command/model/DumpClassModel.java:9 — DumpClassModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140-145 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:363-368 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:362` calls `headers`, `set`, `session` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:139` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 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 runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) 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/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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/DumpClassTool.java:42` calls `addParameter` and `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/JadTool.java:40` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 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) 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:405 — core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:405-410 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:264-269 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java:219 — core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java:219-224 | core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:890-895 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/BaseValueExtractor.java:117 — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/BaseValueExtractor.java:117-122 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/CountExtractor.java:96-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) 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-74 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:90-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 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-133 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/view/GrpcResultViewResolver.java:125-130 — 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 (6 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-46 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/ProtocolDetectHandler.java:92-97 — 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) arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example/src/main/java/com/example/arthasspringbootstarterexample/ArthasSpringBootStarterExampleApplication.java:11 — arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example/src/main/java/com/example/arthasspringbootstarterexample/ArthasSpringBootStarterExampleApplication.java:11-16 | arthas-spring-boot-starter/src/it/arthas-spring-boot3-starter-example/src/main/java/com/example/arthasspringboot3starterexample/ArthasSpringBoot3StarterExampleApplication.java:11-16 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×11
  • Swallowed exception (caught, then discarded) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/util/PathSecurityUtil.java:79 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/util/PathSecurityUtil.java:159 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocationsExtractor.java:52 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/Arthas.java:239 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/view/Ansi.java:142 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/util/ClassLoaderUtils.java:178 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/util/DateUtils.java:36 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:103 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:200 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/monitor200/JvmCommand.java:81 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:983 — `catch (Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · MethodTooLong · ×10
  • MethodTooLong: ObjectView.renderObject core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:134 — MethodTooLong — renderObject runs 311 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 211 over it, 3.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Bootstrap.main boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:309 — MethodTooLong — main runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Enhancer.transform core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:150 — MethodTooLong — transform runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: McpStreamableHttpRequestHandler.handlePostRequest arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:304 — MethodTooLong — handlePostRequest runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RetransformCommand.process core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:149 — MethodTooLong — process runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FlameGraph.constructor labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:3 — MethodTooLong — constructor runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FlameGraph.constructor labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:3 — MethodTooLong — constructor runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JFRCommand.process core/src/main/java/com/taobao/arthas/core/command/basic1000/JFRCommand.java:173 — MethodTooLong — process runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TelnetInputStream.__read client/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java:118 — MethodTooLong — __read runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ArthasBootstrap.bind core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:366 — MethodTooLong — bind runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×10
  • Duplicated block (5 lines × 2) boot/src/main/java/com/taobao/arthas/boot/DownloadUtils.java:144 — boot/src/main/java/com/taobao/arthas/boot/DownloadUtils.java:144-148 | core/src/main/java/com/taobao/arthas/core/util/ArthasBanner.java:175-179 — 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 `boot/src/main/java/com/taobao/arthas/boot/DownloadUtils.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/taobao/arthas/core/util/ArthasBanner.java:173` calls `setReadTimeout` and `boot/src/main/java/com/taobao/arthas/boot/DownloadUtils.java:142` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (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 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 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-218 | core/src/main/java/com/taobao/arthas/core/command/klass100/OgnlCommand.java:83-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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 (5 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-175 | core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:140-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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. Note first that the copies are not typed on the same thing: `FileAppender` names `org.apache.log4j.FileAppender` in one and `org.apache.logging.log4j.core.appender.FileAppender` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 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-112 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:113-117 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: `Logger` names `ch.qos.logback.classic.Logger` in one and `org.apache.log4j.Logger` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) core/src/main/java/com/taobao/arthas/core/command/view/LineView.java:18 — core/src/main/java/com/taobao/arthas/core/command/view/LineView.java:18-22 | core/src/main/java/com/taobao/arthas/core/command/view/WatchView.java:20-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `model` to `LineModel` in one and `WatchModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 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-223 | core/src/main/java/com/taobao/arthas/core/mcp/ArthasMcpServer.java:290-294 — both copies are in the same file, so extract the 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.
  • Duplicated block (5 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-37 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java:29-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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 (5 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:267 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:267-271 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:198-202 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `toolSpecification` to `McpServerFeatures.ToolSpecification` in one and `McpStatelessServerFeatures.ToolSpecification` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (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.
D3 · God Classes · FileTooLong · ×9
  • FileTooLong: Analysis/Analysis.tsx labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx — FileTooLong — 1035 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: Analysis (73-1299). The bar is 500 significant lines; this is 535 over it, 2.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: flame-graph/flame-graph-class.js labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js — FileTooLong — 703 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: FlameGraph (2-1035). The bar is 500 significant lines; this is 203 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: FlameGraph/flame-graph-class.js labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js — FileTooLong — 703 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: FlameGraph (2-1035). The bar is 500 significant lines; this is 203 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: klass100/ClassLoaderCommand.java core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java — FileTooLong — 698 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ClassLoaderCommand (62-1067). The bar is 500 significant lines; this is 198 over it, 1.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: klass100/ClassLoaderMetaspaceCommand.java core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java — FileTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ClassLoaderMetaspaceCommand (56-920). The bar is 500 significant lines; this is 183 over it, 1.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: monitor200/ProfilerCommand.java core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java — FileTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ProfilerCommand (73-1110). The bar is 500 significant lines; this is 163 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: server/ArthasBootstrap.java core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java — FileTooLong — 660 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: ArthasBootstrap (104-1062). The bar is 500 significant lines; this is 160 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: boot/Bootstrap.java boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java — FileTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Bootstrap (64-893). The bar is 500 significant lines; this is 63 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: util/StringUtils.java core/src/main/java/com/taobao/arthas/core/util/StringUtils.java — FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: StringUtils (38-998). The bar is 500 significant lines; this is 11 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
  • Members sharing a duplicated core (4 members, 50+ identical tokens) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:243 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:243-286 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:288-318 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:174-211 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:213-240 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:420 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:420-450 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:452-482 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:276-302 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:304-329 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:523 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:523-556 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:558-587 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:366-394 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:396-422 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:280 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:280-320 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:323-374 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:392-412 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:575-606 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:98 — core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:98-138 | core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java:103-144 | core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:125-175 | core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:105-167 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:32 — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:32-49 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java:28-44 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:46-83 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:40-72 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:41 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:41-55 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentDiscoveryFactory.java:41-55 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentProxyRegistryFactory.java:41-55 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/factory/NativeAgentRegistryFactory.java:40-54 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:58 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:58-82 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentDiscoveryFactory.java:58-82 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentProxyRegistryFactory.java:58-82 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/factory/NativeAgentRegistryFactory.java:56-79 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×8
  • Duplicated block (9 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:146 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:146-154 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:553-561 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) 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) REDACTED:144 — REDACTED:144-152 | REDACTED:170-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 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-151 | core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:200-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `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 (9 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-129 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:147-155 — both copies are in the same file, so extract the 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/advisor/AdviceListenerManager.java:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 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-75 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClient.java:102-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:45 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:45-53 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:58-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:45` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:110 — core/src/main/java/com/taobao/arthas/core/command/view/ResultViewResolver.java:110-118 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/view/GrpcResultViewResolver.java:107-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewClass` to `Class<? extends ResultView>` in one and `Class<? extends GrpcResultView>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.1 · ×7
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.badge-primary` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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).
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-outline.btn-primary .badge` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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).
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-outline.btn-primary:hover .badge` sets color: hsl(212 100% 51% / 1) on background-color: hsl(212 100% 90% / 1) — 3.1: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).
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-primary` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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).
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-group>input[type=radio]:checked.btn,.btn-group>.btn-active` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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).
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.menu :where(li:not(.menu-title):not(:empty))>:where(:not(ul).active),.menu :where(li:not(.menu-title):not(:empty))>:where(*:not(ul):active)` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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).
  • Low contrast colour pair in CSS (3.1:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `` sets color: hsl(212 100% 90% / 1) on background-color: hsl(212 100% 51% / 1) — 3.1: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).
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 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-97 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:177-188 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 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-165 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:178-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (12 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:56 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:56-67 | core/src/main/java/com/taobao/arthas/core/mcp/util/McpAuthExtractor.java:64-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:444 — common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:444-455 | common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:488-499 — both copies are in the same file, so extract the 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.
  • Duplicated block (12 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-101 | core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:236-247 — 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 (12 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-38 | core/src/main/java/com/taobao/arthas/core/shell/command/internal/TeeHandler.java:25-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/discovery/impl/ZookeeperNativeAgentProxyDiscovery.java:23 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/discovery/impl/ZookeeperNativeAgentProxyDiscovery.java:23-34 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/discovery/impl/ZookeeperNativeAgentDiscovery.java:26-37 — 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:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 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-149 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:216-223 — both copies are in the same file, so extract the 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 (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 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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:253 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:253-260 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:447-454 — both copies are in the same file, so extract the 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) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ChannelUtils.java:12 — tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ChannelUtils.java:12-19 | tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/ChannelUtils.java:12-19 — before extracting anything, compare `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ChannelUtils.java` and `tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/ChannelUtils.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:127 — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:127-134 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:132-139 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:138` calls `synchronized` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:144` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:159 — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:159-166 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:158-165 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:159` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:141 — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:141-148 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:189-196 — both copies are in the same file, so extract the 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-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:141` 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.
D2 · Cognitive Complexity · Frame · ×6
  • Frame::draw (cognitive 96) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266 — Frame::draw has cognitive complexity 96 (threshold 15). Drivers by points: if/else 25 (65 pts), loops 4 (17 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 54). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Frame::draw (cognitive 96) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:266 — Frame::draw has cognitive complexity 96 (threshold 15). Drivers by points: if/else 25 (65 pts), loops 4 (17 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 54). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Frame::touch (cognitive 26) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:392 — Frame::touch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (4 pts), ternaries 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Frame::touch (cognitive 26) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:392 — Frame::touch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (4 pts), ternaries 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Frame::drawSelf (cognitive 21) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:184 — Frame::drawSelf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Frame::drawSelf (cognitive 21) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:184 — Frame::drawSelf has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · FunctionTooLong · ×6
  • FunctionTooLong: Analysis.Analysis labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:73 — FunctionTooLong — Analysis runs 969 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 869 over it, 9.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: flame-graph-core.Frame labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2 — FunctionTooLong — Frame runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: flame-graph-core.Frame labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:2 — FunctionTooLong — Frame runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ReactFlameGraphWrapper.ReactFlameGraphWrapper labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:21 — FunctionTooLong — ReactFlameGraphWrapper runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: FlameStats.FlameStats labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:36 — FunctionTooLong — FlameStats runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: FileTable.FileTable labs/arthas-jfr-frontend/src/components/FileTable/FileTable.tsx:14 — FunctionTooLong — FileTable runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×6
  • Duplicated block (16 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:244 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:244-259 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:175-190 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `toolSpecification` to `McpServerFeatures.ToolSpecification` in one and `McpStatelessServerFeatures.ToolSpecification` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:35 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/McpAuthExtractor.java:35-50 | core/src/main/java/com/taobao/arthas/core/mcp/util/McpAuthExtractor.java:40-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:109 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:109-124 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:109-124 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 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-176 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:161-176 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:161` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:368 — core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:368-383 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:517-532 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:564 — core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:564-579 | core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:398-413 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×6
  • Duplicated block (13 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-209 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:119-131 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:114` calls `contains` and `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:193` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:220 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:220-232 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:133-145 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) 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-95 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:104-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:83` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:198 — core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:198-210 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:297-309 — both copies are in the same file, so extract the 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:198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `threadInfo` to `ThreadInfo` in one and `BusyThreadInfo` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:130 — core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:130-142 | core/src/main/java/com/taobao/arthas/core/view/MethodInfoView.java:48-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:130` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:79 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:79-91 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:121-133 — before extracting anything, compare `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:76` calls `info` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:118` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
AC6 · Visual & motion safety · Focus outline removed inline · ×5
  • Focus outline removed inline web-ui/arthasWebConsole/all/ui/ui/src/components/dialog/InputDialog.vue:49 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web-ui/arthasWebConsole/all/ui/ui/src/views/async/Tt.vue:246 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web-ui/arthasWebConsole/all/ui/ui/src/views/sync/HeapDump.vue:45 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Ognl.vue:68 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Retransform.vue:68 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:346 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:346-356 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:577-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. 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:346` it begins part-way through the construct above it, so those exact lines 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/command/view/OgnlView.java:16 — core/src/main/java/com/taobao/arthas/core/command/view/OgnlView.java:16-26 | core/src/main/java/com/taobao/arthas/core/command/view/VmToolView.java:17-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `model` to `OgnlModel` in one and `VmToolModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) 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-122 | core/src/main/java/com/taobao/arthas/core/shell/handlers/shell/ShellLineHandler.java:135-145 — both copies are in the same file, so extract the 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 (11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:213 — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:213-223 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:187-197 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:213` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:243 — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:243-253 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:214-224 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:243` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/DefaultToolCallbackProvider.java:93 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:81 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience core/src/main/java/com/taobao/arthas/core/util/reflect/ArthasReflectUtils.java:68 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience memorycompiler/src/main/java/com/taobao/arthas/compiler/PackageInternalsFinder.java:99 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience memorycompiler/src/main/java/com/taobao/arthas/compiler/PackageInternalsFinder.java:172 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R11 · Import Boundaries · Boundary violation [package · ×5
  • Boundary violation [package:third-party-deep-import] web-ui/arthasWebConsole/all/ui/ui/src/machines/transformConfigMachine.ts:2 — web-ui/arthasWebConsole/all/ui/ui/src/machines/transformConfigMachine.ts:2 imports xstate/lib/actions, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:5 — web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:5 imports xstate/lib/waitFor, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:2 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:2 imports highlight.js/lib/common, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:9 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:9 imports xstate/lib/waitFor, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Ognl.vue:2 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Ognl.vue:2 imports highlight.js/lib/common, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×4
  • Focus outline removed in CSS without a :focus replacement site/docs/.vuepress/theme/components/SidebarItem.vue:240 — `.sidebar-tree-toggle:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement site/docs/.vuepress/theme/components/SidebarItems.vue:174 — `.sidebar-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement site/docs/.vuepress/theme/components/SidebarItems.vue:208 — `.sidebar-search-clear:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/xterm-2831e07f.css:32 — `.xterm.focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×4
  • Duplicated block (21 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:133 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:133-153 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:77-97 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:418 — boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:418-438 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:549-569 — both copies are in the same file, so extract the 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:418` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:728 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:728-748 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:474-494 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:246 — core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:246-266 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:345-365 — both copies are in the same file, so extract the 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:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `threadInfo` to `ThreadInfo` in one and `BusyThreadInfo` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 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-423 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:427-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 `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 (14 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:61 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:61-74 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:61-74 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:85 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:85-98 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:85-98 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:23 — core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:23-36 | core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java:74-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×4
  • Duplicated block (7–8 lines × 2) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:152 — core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:152-158 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:147-154 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: `Appender` names `ch.qos.logback.core.Appender` in one and `org.apache.log4j.Appender` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7–8 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-261 | 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–8 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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–8 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×4
  • Duplicated block (7 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-43 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/SysPropTool.java:25-31 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMOptionTool.java:25-31 — 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 3) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java:56 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java:56-62 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpRequestHandler.java:35-41 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpRequestHandler.java:38-44 — before extracting anything, compare `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java` and `labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpRequestHandler.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpRequestHandler.java:56` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:762 — boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:762-768 | client/src/main/java/com/taobao/arthas/client/TelnetConsole.java:445-451 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:198-204 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:49 — core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:49-56 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:60-67 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/WatchRpcAdviceListener.java:64-70 — 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/monitor200/WatchAdviceListener.java:49` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×4
  • Untrusted text written into markup unescaped labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:445 — `keys[i]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:446 — `details[keys[i]]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:445 — `keys[i]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:446 — `details[keys[i]]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
AC2 · Forms & labels · <Select> field component without a label · ×3
  • <Select> field component without a label labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:739 — 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.
  • <Select> field component without a label labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:769 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — 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.
  • <Select> field component without a label labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1043 — 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.
D10 · Test Quality · Test project verifies nothing · ×3
  • Test project verifies nothing: arthas-jfr-backend labs/arthas-jfr-backend/src/test/java/org/example/jfranalyzerbackend/JfrAnalyzerBackendApplicationTests.java:10 — No conventional assertion call was detected in 1 of 1 tests in `arthas-jfr-backend` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
  • Test project verifies nothing: arthas-spring-boot-starter-example arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example/src/test/java/com/example/arthasspringbootstarterexample/ArthasSpringBootStarterExampleApplicationTests.java:10 — No conventional assertion call was detected in 1 of 1 tests in `arthas-spring-boot-starter-example` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
  • Test project verifies nothing: arthas-spring-boot3-starter-example arthas-spring-boot-starter/src/it/arthas-spring-boot3-starter-example/src/test/java/com/example/arthasspringboot3starterexample/ArthasSpringBoot3StarterExampleApplicationTests.java:10 — No conventional assertion call was detected in 1 of 1 tests in `arthas-spring-boot3-starter-example` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 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-150 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:134-150 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 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-111 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:162-178 — both copies are in the same file, so extract the 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 (17 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:221 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:221-237 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:152-168 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:138 — boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:138-152 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:188-202 — both copies are in the same file, so extract the 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:138` 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 (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 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:170` calls `replace`, `matching` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:115` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:36 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:36-50 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:36-50 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:29 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:29-42 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:54-67 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:78-91 — 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:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:51 — core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:51-64 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/TelnetTermServer.java:51-64 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:59-72 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java` and `core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 3) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:29 — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:29-42 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:54-67 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:78-91 — 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:29` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×3
  • Duplicated block (13–14 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:220 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:220-232 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:389-402 — both copies are in the same file, so extract the 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:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–14 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-94 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:129-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/ForwardClientSocketClientHandler.java:84 — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/ForwardClientSocketClientHandler.java:84-97 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClientSocketClientHandler.java:94-106 — 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.
D4 · Code Duplication · Duplicated block (9–11 lines × 4) · ×3
  • Duplicated block (9–11 lines × 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:255 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:255-263 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:290-298 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:186-196 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:215-225 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:255` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–11 lines × 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:422 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:422-430 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:454-462 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:278-288 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:306-316 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:422` it begins part-way through the construct above it, so those 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–11 lines × 4) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:525 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:525-533 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:560-568 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:368-378 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:398-408 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:525` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×3
  • 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:204 — core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:204-215 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:239-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:204` 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) 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-103 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:109-118 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×3
  • 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, 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.
  • Duplicated block (7 lines × 4) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocatedMemoryExtractor.java:96 — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocatedMemoryExtractor.java:96-102 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocationsExtractor.java:147-153 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/BaseValueExtractor.java:133-139 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/CountExtractor.java:112-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `allocations` to `List<TaskAllocatedMemory>` in one and `List<TaskAllocations>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:345 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:345-350 | 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 — 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/task/DefaultTaskManager.java:345` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:351` calls `data` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:399` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java:32 — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java:32-37 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:64-70 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:53-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java:32` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:62` calls `addParameter`, `trim`, `isEmpty` and `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:52` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 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.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×3
  • Duplicated block (8 lines × 2 locations) labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:228 — labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:228 · labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2 locations) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:609 — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:609 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:625 — 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.
  • Duplicated block (8 lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:9 — web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:9 · web-ui/arthasWebConsole/all/ui/ui/src/stores/public.ts:5 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
X2 · Cancellation propagation · Async function without AbortSignal · ×3
  • Async function without AbortSignal: getVersionByMaven site/docs/.vuepress/plugins/vuepress-plugin-loadVersion/index.js:9 — `getVersionByMaven` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchJfrMetadata labs/arthas-jfr-frontend/src/services/jfr.ts:3 — `fetchJfrMetadata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchJfrFlameGraph labs/arthas-jfr-frontend/src/services/jfr.ts:21 — `fetchJfrFlameGraph` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
AC1 · Text alternatives · <canvas> without a text alternative · ×2
  • <canvas> without a text alternative labs/arthas-jfr-frontend/public/flame-graph/flame-graph-component.js:252 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-component.js:252 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC4 · Keyboard semantics · Anchor without href · ×2
  • Anchor without href web-ui/arthasWebConsole/all/native-agent/src/Process.vue:137 — 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.
  • Anchor without href web-ui/arthasWebConsole/all/ui/ui/src/components/routeTo/SelectCmd.vue:16 — 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.4 · ×2
  • Low contrast colour pair in CSS (4.4:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-outline.btn-secondary .badge` sets color: hsl(0 0% 100% / 1) on background-color: hsl(316 70% 50% / 1) — 4.4: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).
  • Low contrast colour pair in CSS (4.4:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-outline.btn-secondary:hover .badge` sets color: hsl(316 70% 50% / 1) on background-color: hsl(0 0% 100% / 1) — 4.4: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).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.6 · ×2
  • Low contrast colour pair in CSS (2.6:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-outline.btn-accent .badge` sets color: hsl(0 0% 100% / 1) on background-color: hsl(175 70% 41% / 1) — 2.6: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).
  • Low contrast colour pair in CSS (2.6:1) labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/css/main-c782b056.css:1 — `.btn-outline.btn-accent:hover .badge` sets color: hsl(175 70% 41% / 1) on background-color: hsl(0 0% 100% / 1) — 2.6: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).
AX2 · Stateful singletons · Stateful singleton · ×2
  • Stateful singleton: ArthasAgent arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/ArthasAgent.java:19 — `ArthasAgent` is a singleton (@Bean: the container shares one instance across every request thread) but mutates instance state outside any lock (instrumentation, arthasHome, errorMessage; e.g. `instrumentation` in `init` at line 77).
  • Stateful singleton: TunnelServer tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelServer.java:35 — `TunnelServer` is a singleton (@Bean: the container shares one instance across every request thread) but mutates instance state outside any lock (path, channel; e.g. `path` in `setPath` at line 231).
D1 · Cyclomatic Complexity · flame-graph-core.Frame (cyclomatic 91) · ×2
  • flame-graph-core.Frame (cyclomatic 91) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2 — flame-graph-core.Frame has cyclomatic complexity 91 (threshold 15). Most of this is not in the body itself: 14 of the 91 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 266, a function literal at line 392, a function literal at line 184, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • flame-graph-core.Frame (cyclomatic 91) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:2 — flame-graph-core.Frame has cyclomatic complexity 91 (threshold 15). Most of this is not in the body itself: 14 of the 91 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 266, a function literal at line 392, a function literal at line 184, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Frame · ×2
  • Frame::draw (cyclomatic 36) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266 — Frame::draw has cyclomatic complexity 36 (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.
  • Frame::draw (cyclomatic 36) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:266 — Frame::draw has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Analysis.Analysis · ×2
  • Analysis.Analysis::handleFilterValuesChecked (cyclomatic 19) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:354 — Analysis.Analysis::handleFilterValuesChecked 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. This shape REPEATS in the file: 2 other methods here (Analysis.Analysis, Analysis.Analysis::handleToggleFilterValuesChecked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Analysis.Analysis::handleToggleFilterValuesChecked (cyclomatic 18) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:436 — Analysis.Analysis::handleToggleFilterValuesChecked 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. This shape REPEATS in the file: 2 other methods here (Analysis.Analysis, Analysis.Analysis::handleFilterValuesChecked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · FlameGraph.constructor (cyclomatic 17) · ×2
  • FlameGraph.constructor (cyclomatic 17) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:3 — FlameGraph.constructor has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 77, 58, 66, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • FlameGraph.constructor (cyclomatic 17) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:3 — FlameGraph.constructor has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 77, 58, 66, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D17 · Explicit Debt · FixmeComment · ×2
  • FixmeComment core/src/main/java/com/taobao/arthas/core/util/reflect/FieldUtils.java:304 — // FIXME is this workaround still needed? lang requires Java 6 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment core/src/main/java/com/taobao/arthas/core/command/basic1000/OptionsCommand.java:168 — // FIXME hack for ongl strict — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · Analysis.Analysis · ×2
  • Analysis.Analysis::handleFilterValuesChecked (cognitive 36) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:354 — Analysis.Analysis::handleFilterValuesChecked has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 7, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (Analysis.Analysis, Analysis.Analysis::handleToggleFilterValuesChecked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • Analysis.Analysis::handleToggleFilterValuesChecked (cognitive 35) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:436 — Analysis.Analysis::handleToggleFilterValuesChecked has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 6, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (Analysis.Analysis, Analysis.Analysis::handleFilterValuesChecked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · 1.run (cognitive 26) · ×2
  • 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 4 (17 pts), loops 3 (6 pts), error handling 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 4 (17 pts), loops 3 (6 pts), error handling 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlameGraph.constructor (cognitive 22) · ×2
  • FlameGraph.constructor (cognitive 22) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:3 — FlameGraph.constructor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 77, 58, 66, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • FlameGraph.constructor (cognitive 22) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:3 — FlameGraph.constructor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 77, 58, 66, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · FlameGraph.genFramesFromLineData (cognitive 21) · ×2
  • FlameGraph.genFramesFromLineData (cognitive 21) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:364 — FlameGraph.genFramesFromLineData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FlameGraph.genFramesFromLineData (cognitive 21) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:364 — FlameGraph.genFramesFromLineData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlameGraph.render (cognitive 17) · ×2
  • FlameGraph.render (cognitive 17) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:242 — FlameGraph.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • FlameGraph.render (cognitive 17) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:242 — FlameGraph.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FlameGraph.findFrame (cognitive 16) · ×2
  • FlameGraph.findFrame (cognitive 16) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:884 — FlameGraph.findFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • FlameGraph.findFrame (cognitive 16) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:884 — FlameGraph.findFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×2
  • Duplicated block (41 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:296 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:296-336 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:193-233 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:296` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (41 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:45 — labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:45-85 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/EtcdNativeAgentRegistry.java:44-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 `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×2
  • Duplicated block (36 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:62 — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:62-97 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:63-98 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (36 lines × 2) labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/RelayHandler.java:22 — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/RelayHandler.java:22-57 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/RelayHandler.java:16-51 — before extracting anything, compare `labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/RelayHandler.java` and `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/RelayHandler.java` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) agent/src/main/java/com/taobao/arthas/agent/ArthasClassloader.java:20 — agent/src/main/java/com/taobao/arthas/agent/ArthasClassloader.java:20-39 | arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/AttachArthasClassloader.java:22-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:173 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:173-192 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:113-132 — before extracting anything, compare `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpNettyServer.java:173` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:161 — core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:161-178 | core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionManagerImpl.java:120-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpRequestHandler.java:21 — labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpRequestHandler.java:21-38 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpRequestHandler.java:24-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×2
  • Duplicated block (15–16 lines × 3) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:102 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:102-117 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:128-142 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:154-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:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 3) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:102 — labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:102-117 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:128-142 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:154-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 `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:324 — core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:324-338 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:411-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:94 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:94-107 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:137-151 — before extracting anything, compare `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 9) · ×2
  • Duplicated block (13 lines × 9) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:440 — core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:440-452 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:464-476 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:488-500 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:512-524 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:536-548 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:560-572 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:584-596 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:608-620 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:632-644 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:440` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `array` to `Object[]` in one and `boolean[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 9) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:279 — core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:279-291 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:314-326 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:349-361 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:384-396 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:419-431 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:454-466 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:489-501 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:524-536 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:558-570 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×2
  • Duplicated block (10–11 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:230 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:230-240 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:320-329 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:413-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:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 3) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:77 — core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:77-86 | core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:91-100 | core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:94-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: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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:78 — core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java:78-88 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/TelnetTermServer.java:73-83 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java:86-96 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/shell/term/impl/HttpTermServer.java` and `core/src/main/java/com/taobao/arthas/core/shell/term/impl/httptelnet/HttpTelnetTermServer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 3) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:80 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:80-90 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:122-132 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:169-179 — before extracting anything, compare `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:76` calls `info` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:118` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:68 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:68-77 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:85-94 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:176-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:410 — boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:410-419 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:468-477 | boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:528-537 — 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 `boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:410` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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–10 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-318 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:235-244 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocationsExtractor.java:138 — labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/AllocationsExtractor.java:138-145 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/BaseValueExtractor.java:124-131 | labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/CountExtractor.java:103-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×2
  • Duplicated block (6–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-553 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:313-319 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/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 (6–7 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 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java` and `core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140-144 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:363-367 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:547-551 — 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 `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:362` calls `headers`, `set`, `session` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:139` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:32 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentHandler.java:32-36 | labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/http/HttpNativeAgentProxyHandler.java:29-33 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:35-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:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: math-game — math-game: abstractness 0.00, instability 0.00, distance 1.00 — an application entry point, so it is concrete by design — the distance is expected; what is worth checking is that other projects depend on it at all, since a host should be a leaf of the graph.
  • Off the main sequence: arthas-model — arthas-model: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×2
  • Duplicated block (13 lines × 2 locations) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-component.js:3 — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-component.js:3 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-component.js:3 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (13 lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/components/input/ClassInput.vue:18 — web-ui/arthasWebConsole/all/ui/ui/src/components/input/ClassInput.vue:18 · web-ui/arthasWebConsole/all/ui/ui/src/components/input/MethodInput.vue:25 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×2
  • Duplicated block (11 lines × 2 locations) labs/arthas-jfr-frontend/src/services/jfr.ts:8 — labs/arthas-jfr-frontend/src/services/jfr.ts:8 · labs/arthas-jfr-frontend/src/services/jfr.ts:26 — 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.
  • Duplicated block (11 lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassLoader.vue:157 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassLoader.vue:157 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassLoader.vue:171 — 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.
R10 · Code Duplication · Duplicated block (7 lines × 3 locations) · ×2
  • Duplicated block (7 lines × 3 locations) labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:120 — labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:120 · labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:149 · labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:169 — all 3 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.
  • Duplicated block (7 lines × 3 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:52 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:52 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:76 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:91 — all 3 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.
R2 · Cyclomatic Complexity · Complex function draw (cyclomatic 36, cognitive 96) · ×2
  • Complex function draw (cyclomatic 36, cognitive 96) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:266 — draw has cyclomatic complexity 36 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function draw (cyclomatic 36, cognitive 96) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:266 — draw has cyclomatic complexity 36 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 13, cognitive 17) · ×2
  • Complex function render (cyclomatic 13, cognitive 17) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:242 — render has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function render (cyclomatic 13, cognitive 17) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:242 — render has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getObject (cyclomatic 13, cognitive 15) · ×2
  • Complex function getObject (cyclomatic 13, cognitive 15) labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:222 — getObject has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function getObject (cyclomatic 13, cognitive 15) labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:560 — getObject has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function touch (cyclomatic 12, cognitive 26) · ×2
  • Complex function touch (cyclomatic 12, cognitive 26) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:392 — touch has cyclomatic complexity 12 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function touch (cyclomatic 12, cognitive 26) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:392 — touch has cyclomatic complexity 12 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function findFrame (cyclomatic 12, cognitive 16) · ×2
  • Complex function findFrame (cyclomatic 12, cognitive 16) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:884 — findFrame has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function findFrame (cyclomatic 12, cognitive 16) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:884 — findFrame has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung web-ui/arthasWebConsole/package.json:34 — 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 was searched, so you can tell an absence from a miss: the 90 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · ObjectView.renderObject (cyclomatic 90) · ×1
  • 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.
D1 · Cyclomatic Complexity · ReactFlameGraphWrapper.ReactFlameGraphWrapper (cyclomatic 68) · ×1
  • ReactFlameGraphWrapper.ReactFlameGraphWrapper (cyclomatic 68) labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:21 — ReactFlameGraphWrapper.ReactFlameGraphWrapper has cyclomatic complexity 68 (threshold 15). Of this number, 17 points are the body's own statements and 51 belong to 17 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Analysis.Analysis (cyclomatic 68) · ×1
  • Analysis.Analysis (cyclomatic 68) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:73 — Analysis.Analysis has cyclomatic complexity 68 (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. This shape REPEATS in the file: 2 other methods here (Analysis.Analysis::handleFilterValuesChecked, Analysis.Analysis::handleToggleFilterValuesChecked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Bootstrap.main (cyclomatic 60) · ×1
  • 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.
D1 · Cyclomatic Complexity · FlameStats.FlameStats (cyclomatic 47) · ×1
  • FlameStats.FlameStats (cyclomatic 47) labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:36 — FlameStats.FlameStats has cyclomatic complexity 47 (threshold 15). Of this number, 24 points are the body's own statements and 23 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Enhancer.transform (cyclomatic 45) · ×1
  • 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.
D1 · Cyclomatic Complexity · ProfilerCommand.executeArgs (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · JFRCommand.process (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · TelnetInputStream.__read (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · RetransformCommand.process (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · ProfilerCommand.process (cyclomatic 28) · ×1
  • ProfilerCommand.process (cyclomatic 28) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:747 — ProfilerCommand.process has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileTable.FileTable (cyclomatic 28) · ×1
  • FileTable.FileTable (cyclomatic 28) labs/arthas-jfr-frontend/src/components/FileTable/FileTable.tsx:14 — FileTable.FileTable has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 34, getColumns, handleDelete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · VmToolCommand.process (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · ArthasBootstrap.bind (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClassLoaderCommand.process (cyclomatic 26) · ×1
  • 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Enhancer.transform (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · ObjectService.query (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · ReflectUtils.defineClass (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · StreamableToolUtils.executeAndCollectResults (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · ObjectUtils.nullSafeEquals (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · ThreadUtil.getFullStacktrace (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · format.toReadableValue (cyclomatic 25) · ×1
  • format.toReadableValue (cyclomatic 25) labs/arthas-jfr-frontend/src/utils/format.ts:45 — format.toReadableValue has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecordedEvent.init (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · TelnetConsole.process (cyclomatic 22) · ×1
  • TelnetConsole.process (cyclomatic 22) client/src/main/java/com/taobao/arthas/client/TelnetConsole.java:213 — TelnetConsole.process 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.
D1 · Cyclomatic Complexity · ClassLoaderCommand.processUrlClasses (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · ThreadUtil.getFullStacktrace (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · color.colorForFunctionType (cyclomatic 22) · ×1
  • color.colorForFunctionType (cyclomatic 22) labs/arthas-jfr-frontend/src/utils/color.ts:41 — color.colorForFunctionType has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · McpStreamableHttpRequestHandler.handlePostRequest (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · ProfilerMarkdown.toMarkdown (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · RedefineCommand.process (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · VMToolTool.vmtool (cyclomatic 20) · ×1
  • VMToolTool.vmtool (cyclomatic 20) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java:18 — VMToolTool.vmtool has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TelnetInputStream.read (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · OSUtils.normalizeArch (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · PropertySource.arrayEquals (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · WildcardMatcher.match (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · BinderUtils.inject (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · ProcessUtils.select (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · ThreadSampler.sample (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CompletionUtils.completeFilePath (cyclomatic 17) · ×1
  • CompletionUtils.completeFilePath (cyclomatic 17) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:91 — 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.
D1 · Cyclomatic Complexity · CompletionUtils.completeMethodName (cyclomatic 17) · ×1
  • CompletionUtils.completeMethodName (cyclomatic 17) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:207 — CompletionUtils.completeMethodName has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JavaObjectConverter.toJavaObject (cyclomatic 17) · ×1
  • 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JsonSchemaGenerator.generateParameterProperties (cyclomatic 16) · ×1
  • 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ResultConsumerHelper.getItemCount (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · ClassLoaderTool.classloader (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · TimeTunnelTool.validateParameters (cyclomatic 16) · ×1
  • 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. This is NOT this file's highest cyclomatic complexity: TimeTunnelTool.normalizeAction (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · GrepHandler.apply (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · HttpApiHandler.processRequest (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · HttpRequestHandler.channelRead0 (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Arthas.attachAgent (cyclomatic 16) · ×1
  • Arthas.attachAgent (cyclomatic 16) core/src/main/java/com/taobao/arthas/core/Arthas.java:101 — Arthas.attachAgent has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TunnelClientSocketClientHandler.channelRead0 (cyclomatic 16) · ×1
  • 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: core/src/main/java/com/taobao/arthas/core/Arthas.java core/src/main/java/com/taobao/arthas/core/Arthas.java:101 — core/src/main/java/com/taobao/arthas/core/Arthas.java changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Arthas.attachAgent at line 101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 10:00:55 +08:00' --until='2026-11-04 10:00:55 +08:00' --full-history --no-merges -- core/src/main/java/com/taobao/arthas/core/Arthas.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D17 · Explicit Debt · HackComment · ×1
  • HackComment client/src/main/java/com/taobao/arthas/client/TelnetConsole.java:274 — // hack for windows dos — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · ObjectView.renderObject (cognitive 303) · ×1
  • ObjectView.renderObject (cognitive 303) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:134 — ObjectView.renderObject has cognitive complexity 303 (threshold 15). Drivers by points: loops 38 (187 pts), if/else 51 (91 pts), boolean chains 13, error handling 2 (8 pts), match/switch 1 (4 pts) (nesting depth added 198). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Bootstrap.main (cognitive 105) · ×1
  • Bootstrap.main (cognitive 105) boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:309 — Bootstrap.main has cognitive complexity 105 (threshold 15). Drivers by points: if/else 51 (91 pts), boolean chains 7, error handling 4 (7 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JFRCommand.process (cognitive 104) · ×1
  • JFRCommand.process (cognitive 104) core/src/main/java/com/taobao/arthas/core/command/basic1000/JFRCommand.java:173 — JFRCommand.process has cognitive complexity 104 (threshold 15). Drivers by points: if/else 35 (66 pts), error handling 10 (31 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Enhancer.transform (cognitive 104) · ×1
  • 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 31 (74 pts), loops 8 (19 pts), error handling 3 (6 pts), boolean chains 5 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ReactFlameGraphWrapper.ReactFlameGraphWrapper (cognitive 90) · ×1
  • ReactFlameGraphWrapper.ReactFlameGraphWrapper (cognitive 90) labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:21 — ReactFlameGraphWrapper.ReactFlameGraphWrapper has cognitive complexity 90 (threshold 15). Drivers by points: if/else 41 (60 pts), boolean chains 16, ternaries 7 (13 pts), loops 1 (nesting depth added 25). Of this number, 19 points are the body's own statements and 71 belong to 17 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelnetInputStream.read (cognitive 67) · ×1
  • 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 12 (40 pts), error handling 4 (20 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Enhancer.transform (cognitive 64) · ×1
  • 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 17 (43 pts), loops 6 (14 pts), error handling 3 (6 pts), boolean chains 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Analysis.Analysis (cognitive 63) · ×1
  • Analysis.Analysis (cognitive 63) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:73 — Analysis.Analysis has cognitive complexity 63 (threshold 15). Drivers by points: if/else 68 (108 pts), ternaries 66 (80 pts), boolean chains 43, error handling 2 (6 pts), loops 2 (nesting depth added 58). 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. This shape REPEATS in the file: 2 other methods here (Analysis.Analysis::handleFilterValuesChecked, Analysis.Analysis::handleToggleFilterValuesChecked) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ObjectUtils.nullSafeEquals (cognitive 56) · ×1
  • ObjectUtils.nullSafeEquals (cognitive 56) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:127 — ObjectUtils.nullSafeEquals has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (45 pts), boolean chains 11 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · format.toReadableValue (cognitive 53) · ×1
  • format.toReadableValue (cognitive 53) labs/arthas-jfr-frontend/src/utils/format.ts:45 — format.toReadableValue has cognitive complexity 53 (threshold 15). Drivers by points: if/else 28 (51 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VmToolCommand.process (cognitive 50) · ×1
  • VmToolCommand.process (cognitive 50) core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:202 — VmToolCommand.process has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (33 pts), ternaries 5 (11 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetransformCommand.process (cognitive 48) · ×1
  • RetransformCommand.process (cognitive 48) core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:149 — RetransformCommand.process has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (32 pts), error handling 4 (8 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ObjectService.query (cognitive 48) · ×1
  • ObjectService.query (cognitive 48) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:53 — ObjectService.query has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (29 pts), error handling 4 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlameStats.FlameStats (cognitive 46) · ×1
  • FlameStats.FlameStats (cognitive 46) labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:36 — FlameStats.FlameStats has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 15 (18 pts), if/else 13, boolean chains 11, loops 2 (4 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 25 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WildcardMatcher.match (cognitive 45) · ×1
  • 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 14 (35 pts), loops 3 (8 pts), 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.
D2 · Cognitive Complexity · GrepHandler.apply (cognitive 44) · ×1
  • 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 9 (23 pts), loops 3 (10 pts), ternaries 2 (9 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ProfilerCommand.executeArgs (cognitive 43) · ×1
  • 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 2 (4 pts), 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.
D2 · Cognitive Complexity · ReflectUtils.defineClass (cognitive 41) · ×1
  • 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 11 (20 pts), error handling 8 (16 pts), 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.
D2 · Cognitive Complexity · StreamableToolUtils.executeAndCollectResults (cognitive 41) · ×1
  • 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 9 (19 pts), error handling 4 (8 pts), boolean chains 7, ternaries 3 (6 pts), 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.
D2 · Cognitive Complexity · ProfilerCommand.process (cognitive 40) · ×1
  • ProfilerCommand.process (cognitive 40) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:747 — ProfilerCommand.process has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24 (33 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TelnetInputStream.__read (cognitive 40) · ×1
  • 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 10 (27 pts), match/switch 4 (11 pts), 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.
D2 · Cognitive Complexity · TelnetConsole.process (cognitive 36) · ×1
  • TelnetConsole.process (cognitive 36) client/src/main/java/com/taobao/arthas/client/TelnetConsole.java:213 — TelnetConsole.process has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (25 pts), error handling 6 (8 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderCommand.processUrlClasses (cognitive 36) · ×1
  • 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 14 (25 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts), 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.
D2 · Cognitive Complexity · ArthasReflectUtils.getClasses (cognitive 36) · ×1
  • ArthasReflectUtils.getClasses (cognitive 36) core/src/main/java/com/taobao/arthas/core/util/reflect/ArthasReflectUtils.java:34 — ArthasReflectUtils.getClasses has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (21 pts), error handling 3 (10 pts), loops 2 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · RecordedEvent.init (cognitive 36) · ×1
  • RecordedEvent.init (cognitive 36) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/model/jfr/RecordedEvent.java:56 — RecordedEvent.init has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RedefineCommand.process (cognitive 35) · ×1
  • RedefineCommand.process (cognitive 35) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:73 — RedefineCommand.process has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 3 (6 pts), loops 3, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreadUtil.getFullStacktrace (cognitive 35) · ×1
  • ThreadUtil.getFullStacktrace (cognitive 35) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:268 — ThreadUtil.getFullStacktrace has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderCommand.process (cognitive 34) · ×1
  • ClassLoaderCommand.process (cognitive 34) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:179 — ClassLoaderCommand.process has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BinderUtils.inject (cognitive 34) · ×1
  • BinderUtils.inject (cognitive 34) core/src/main/java/com/taobao/arthas/core/config/BinderUtils.java:23 — BinderUtils.inject has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Log4jHelper.getLoggers (cognitive 33) · ×1
  • Log4jHelper.getLoggers (cognitive 33) core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:57 — Log4jHelper.getLoggers has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TunnelClientSocketClientHandler.channelRead0 (cognitive 32) · ×1
  • TunnelClientSocketClientHandler.channelRead0 (cognitive 32) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClientSocketClientHandler.java:56 — TunnelClientSocketClientHandler.channelRead0 has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ObjectUtils.nullSafeHashCode (cognitive 31) · ×1
  • ObjectUtils.nullSafeHashCode (cognitive 31) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:179 — ObjectUtils.nullSafeHashCode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (31 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreadUtil.getFullStacktrace (cognitive 31) · ×1
  • ThreadUtil.getFullStacktrace (cognitive 31) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:180 — ThreadUtil.getFullStacktrace has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArthasBootstrap.bind (cognitive 30) · ×1
  • ArthasBootstrap.bind (cognitive 30) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:366 — ArthasBootstrap.bind has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 6, error handling 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HttpRequestHandler.channelRead0 (cognitive 30) · ×1
  • HttpRequestHandler.channelRead0 (cognitive 30) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/HttpRequestHandler.java:56 — HttpRequestHandler.channelRead0 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (27 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileTable.FileTable (cognitive 30) · ×1
  • FileTable.FileTable (cognitive 30) labs/arthas-jfr-frontend/src/components/FileTable/FileTable.tsx:14 — FileTable.FileTable has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 14 (16 pts), if/else 7, boolean chains 6, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 34, getColumns, handleDelete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SharingResultDistributorImpl.distribute (cognitive 29) · ×1
  • SharingResultDistributorImpl.distribute (cognitive 29) core/src/main/java/com/taobao/arthas/core/distribution/impl/SharingResultDistributorImpl.java:70 — SharingResultDistributorImpl.distribute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (7 pts), error handling 2 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · PropertyPlaceholderHelper.parseStringValue (cognitive 29) · ×1
  • PropertyPlaceholderHelper.parseStringValue (cognitive 29) core/src/main/java/com/taobao/arthas/core/env/PropertyPlaceholderHelper.java:130 — PropertyPlaceholderHelper.parseStringValue has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CPUTimeExtractor.buildThreadCPUTime (cognitive 29) · ×1
  • CPUTimeExtractor.buildThreadCPUTime (cognitive 29) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/CPUTimeExtractor.java:211 — CPUTimeExtractor.buildThreadCPUTime has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderView.drawUrlClassStats (cognitive 28) · ×1
  • ClassLoaderView.drawUrlClassStats (cognitive 28) core/src/main/java/com/taobao/arthas/core/command/view/ClassLoaderView.java:63 — ClassLoaderView.drawUrlClassStats has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (7 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShellImpl.<init> (cognitive 28) · ×1
  • ShellImpl.<init> (cognitive 28) core/src/main/java/com/taobao/arthas/core/shell/impl/ShellImpl.java:67 — ShellImpl.<init> has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 1 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StyledUsageFormatter.usage (cognitive 28) · ×1
  • StyledUsageFormatter.usage (cognitive 28) core/src/main/java/com/taobao/arthas/core/util/usage/StyledUsageFormatter.java:42 — StyledUsageFormatter.usage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpStreamableHttpRequestHandler.handlePostRequest (cognitive 27) · ×1
  • McpStreamableHttpRequestHandler.handlePostRequest (cognitive 27) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:304 — McpStreamableHttpRequestHandler.handlePostRequest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 5 (8 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ThreadSampler.sample (cognitive 27) · ×1
  • ThreadSampler.sample (cognitive 27) core/src/main/java/com/taobao/arthas/core/command/monitor200/ThreadSampler.java:34 — ThreadSampler.sample has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 7 (11 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoggerView.renderLoggerInfo (cognitive 27) · ×1
  • LoggerView.renderLoggerInfo (cognitive 27) core/src/main/java/com/taobao/arthas/core/command/view/LoggerView.java:33 — LoggerView.renderLoggerInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · CompletionUtils.completeFilePath (cognitive 27) · ×1
  • CompletionUtils.completeFilePath (cognitive 27) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:91 — CompletionUtils.completeFilePath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DirectoryBrowser.directView (cognitive 27) · ×1
  • DirectoryBrowser.directView (cognitive 27) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:150 — DirectoryBrowser.directView has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MBeanTimerTask.run (cognitive 26) · ×1
  • MBeanTimerTask.run (cognitive 26) core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java:377 — MBeanTimerTask.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Telnet._processDo (cognitive 25) · ×1
  • Telnet._processDo (cognitive 25) client/src/main/java/org/apache/commons/net/telnet/Telnet.java:415 — Telnet._processDo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderCommand.urlStats (cognitive 25) · ×1
  • ClassLoaderCommand.urlStats (cognitive 25) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:644 — ClassLoaderCommand.urlStats has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (5 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VMToolTool.vmtool (cognitive 25) · ×1
  • VMToolTool.vmtool (cognitive 25) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java:18 — VMToolTool.vmtool has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JavaObjectConverter.toJavaObject (cognitive 25) · ×1
  • JavaObjectConverter.toJavaObject (cognitive 25) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/objectUtils/JavaObjectConverter.java:42 — JavaObjectConverter.toJavaObject has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (21 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProcessUtils.select (cognitive 24) · ×1
  • ProcessUtils.select (cognitive 24) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:55 — ProcessUtils.select has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Log4j2Helper.getLoggers (cognitive 24) · ×1
  • Log4j2Helper.getLoggers (cognitive 24) core/src/main/java/com/taobao/arthas/core/command/logger/Log4j2Helper.java:83 — Log4j2Helper.getLoggers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ResultConsumerImpl.pollResults (cognitive 24) · ×1
  • ResultConsumerImpl.pollResults (cognitive 24) core/src/main/java/com/taobao/arthas/core/distribution/impl/ResultConsumerImpl.java:52 — ResultConsumerImpl.pollResults has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompletionUtils.completeMethodName (cognitive 24) · ×1
  • CompletionUtils.completeMethodName (cognitive 24) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:207 — CompletionUtils.completeMethodName has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JobControllerImpl.createCommandProcess (cognitive 24) · ×1
  • JobControllerImpl.createCommandProcess (cognitive 24) core/src/main/java/com/taobao/arthas/core/shell/system/impl/JobControllerImpl.java:178 — JobControllerImpl.createCommandProcess has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TableView.drawRow (cognitive 24) · ×1
  • TableView.drawRow (cognitive 24) core/src/main/java/com/taobao/arthas/core/view/TableView.java:136 — TableView.drawRow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LineCommand.parseLines (cognitive 23) · ×1
  • LineCommand.parseLines (cognitive 23) core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java:272 — LineCommand.parseLines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfilerMarkdown.toMarkdown (cognitive 23) · ×1
  • ProfilerMarkdown.toMarkdown (cognitive 23) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerMarkdown.java:58 — ProfilerMarkdown.toMarkdown has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9, loops 4 (6 pts), if/else 4 (5 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ResultConsumerHelper.getItemCount (cognitive 23) · ×1
  • ResultConsumerHelper.getItemCount (cognitive 23) core/src/main/java/com/taobao/arthas/core/distribution/ResultConsumerHelper.java:35 — ResultConsumerHelper.getItemCount has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderUtils.getClassLoader (cognitive 23) · ×1
  • ClassLoaderUtils.getClassLoader (cognitive 23) core/src/main/java/com/taobao/arthas/core/util/ClassLoaderUtils.java:93 — ClassLoaderUtils.getClassLoader has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreadUtil.findMostBlockingLock (cognitive 23) · ×1
  • ThreadUtil.findMostBlockingLock (cognitive 23) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:99 — ThreadUtil.findMostBlockingLock has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessUtils.findJavaHome (cognitive 22) · ×1
  • ProcessUtils.findJavaHome (cognitive 22) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:228 — ProcessUtils.findJavaHome has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TelnetInputStream.run (cognitive 22) · ×1
  • TelnetInputStream.run (cognitive 22) client/src/main/java/org/apache/commons/net/telnet/TelnetInputStream.java:592 — TelnetInputStream.run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 5 (10 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LogbackHelper.getLoggers (cognitive 22) · ×1
  • LogbackHelper.getLoggers (cognitive 22) core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java:78 — LogbackHelper.getLoggers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Enhancer.enhance (cognitive 22) · ×1
  • Enhancer.enhance (cognitive 22) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:639 — Enhancer.enhance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (4 pts), loops 2 (4 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractArthasTool.executeStreamable (cognitive 22) · ×1
  • AbstractArthasTool.executeStreamable (cognitive 22) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/AbstractArthasTool.java:115 — AbstractArthasTool.executeStreamable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArthasBootstrap.createExternalCommandRegistry (cognitive 22) · ×1
  • ArthasBootstrap.createExternalCommandRegistry (cognitive 22) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:709 — ArthasBootstrap.createExternalCommandRegistry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassInfoView.drawField (cognitive 22) · ×1
  • ClassInfoView.drawField (cognitive 22) core/src/main/java/com/taobao/arthas/core/view/ClassInfoView.java:77 — ClassInfoView.drawField has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Arthas.attachAgent (cognitive 22) · ×1
  • Arthas.attachAgent (cognitive 22) core/src/main/java/com/taobao/arthas/core/Arthas.java:101 — Arthas.attachAgent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JavaObjectConverter.toArrayValue (cognitive 22) · ×1
  • JavaObjectConverter.toArrayValue (cognitive 22) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/objectUtils/JavaObjectConverter.java:114 — JavaObjectConverter.toArrayValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JFRAnalyzerImpl.generateCpuTime (cognitive 22) · ×1
  • JFRAnalyzerImpl.generateCpuTime (cognitive 22) labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:166 — JFRAnalyzerImpl.generateCpuTime has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchClassCommand.process (cognitive 21) · ×1
  • SearchClassCommand.process (cognitive 21) core/src/main/java/com/taobao/arthas/core/command/klass100/SearchClassCommand.java:112 — SearchClassCommand.process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchMethodCommand.process (cognitive 21) · ×1
  • SearchMethodCommand.process (cognitive 21) core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:105 — SearchMethodCommand.process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultConversionService.objectiveClass (cognitive 21) · ×1
  • DefaultConversionService.objectiveClass (cognitive 21) core/src/main/java/com/taobao/arthas/core/env/convert/DefaultConversionService.java:96 — DefaultConversionService.objectiveClass has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringUtils.humanReadableByteCount (cognitive 21) · ×1
  • StringUtils.humanReadableByteCount (cognitive 21) core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:902 — StringUtils.humanReadableByteCount has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GrpcDispatcher.loadGrpcService (cognitive 21) · ×1
  • GrpcDispatcher.loadGrpcService (cognitive 21) labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/GrpcDispatcher.java:47 — GrpcDispatcher.loadGrpcService has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Enhancer.enhance (cognitive 21) · ×1
  • Enhancer.enhance (cognitive 21) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:403 — Enhancer.enhance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts), loops 2 (4 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentBootstrap.main (cognitive 20) · ×1
  • AgentBootstrap.main (cognitive 20) agent/src/main/java/com/taobao/arthas/agent334/AgentBootstrap.java:90 — AgentBootstrap.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 4 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderCommand.getAllClassLoaderInfo (cognitive 20) · ×1
  • ClassLoaderCommand.getAllClassLoaderInfo (cognitive 20) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderCommand.java:731 — ClassLoaderCommand.getAllClassLoaderInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoggerCommand.level (cognitive 20) · ×1
  • LoggerCommand.level (cognitive 20) core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java:148 — LoggerCommand.level has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonitorAdviceListener.finishing (cognitive 20) · ×1
  • MonitorAdviceListener.finishing (cognitive 20) core/src/main/java/com/taobao/arthas/core/command/monitor200/MonitorAdviceListener.java:131 — MonitorAdviceListener.finishing has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreadView.draw (cognitive 20) · ×1
  • ThreadView.draw (cognitive 20) core/src/main/java/com/taobao/arthas/core/command/view/ThreadView.java:23 — ThreadView.draw has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ViewFileTool.loadAllowedRoots (cognitive 20) · ×1
  • ViewFileTool.loadAllowedRoots (cognitive 20) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/basic1000/ViewFileTool.java:172 — ViewFileTool.loadAllowedRoots has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (5 pts), ternaries 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompletionUtils.completeOptions (cognitive 20) · ×1
  • CompletionUtils.completeOptions (cognitive 20) core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:391 — CompletionUtils.completeOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpApiHandler.processRequest (cognitive 20) · ×1
  • HttpApiHandler.processRequest (cognitive 20) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/api/HttpApiHandler.java:116 — HttpApiHandler.processRequest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BasicHttpAuthenticatorHandler.channelRead (cognitive 20) · ×1
  • BasicHttpAuthenticatorHandler.channelRead (cognitive 20) core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/BasicHttpAuthenticatorHandler.java:49 — BasicHttpAuthenticatorHandler.channelRead has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (20 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpProxyClientHandler.channelRead0 (cognitive 20) · ×1
  • HttpProxyClientHandler.channelRead0 (cognitive 20) tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ProxyClient.java:117 — HttpProxyClientHandler.channelRead0 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderMetaspaceCommand.buildRows (cognitive 19) · ×1
  • ClassLoaderMetaspaceCommand.buildRows (cognitive 19) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:308 — ClassLoaderMetaspaceCommand.buildRows has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfilerMarkdown.parseCollapsed (cognitive 19) · ×1
  • ProfilerMarkdown.parseCollapsed (cognitive 19) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerMarkdown.java:194 — ProfilerMarkdown.parseCollapsed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArthasBootstrap.collectCommandNames (cognitive 19) · ×1
  • ArthasBootstrap.collectCommandNames (cognitive 19) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:776 — ArthasBootstrap.collectCommandNames has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultTaskManager.processInboundResponse (cognitive 18) · ×1
  • DefaultTaskManager.processInboundResponse (cognitive 18) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:160 — DefaultTaskManager.processInboundResponse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonSchemaGenerator.generateParameterProperties (cognitive 18) · ×1
  • JsonSchemaGenerator.generateParameterProperties (cognitive 18) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/util/JsonSchemaGenerator.java:91 — JsonSchemaGenerator.generateParameterProperties has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TelnetOutputStream.write (cognitive 18) · ×1
  • TelnetOutputStream.write (cognitive 18) client/src/main/java/org/apache/commons/net/telnet/TelnetOutputStream.java:56 — TelnetOutputStream.write has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OSUtils.normalizeArch (cognitive 18) · ×1
  • OSUtils.normalizeArch (cognitive 18) common/src/main/java/com/taobao/arthas/common/OSUtils.java:84 — OSUtils.normalizeArch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ClassLoaderMetaspaceCommand.readRecording (cognitive 18) · ×1
  • ClassLoaderMetaspaceCommand.readRecording (cognitive 18) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:262 — ClassLoaderMetaspaceCommand.readRecording has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemoryCompilerCommand.process (cognitive 18) · ×1
  • MemoryCompilerCommand.process (cognitive 18) core/src/main/java/com/taobao/arthas/core/command/klass100/MemoryCompilerCommand.java:85 — MemoryCompilerCommand.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PropertySource.arrayEquals (cognitive 18) · ×1
  • PropertySource.arrayEquals (cognitive 18) core/src/main/java/com/taobao/arthas/core/env/PropertySource.java:235 — PropertySource.arrayEquals has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ProcessImpl.updateStatus (cognitive 18) · ×1
  • ProcessImpl.updateStatus (cognitive 18) core/src/main/java/com/taobao/arthas/core/shell/system/impl/ProcessImpl.java:272 — ProcessImpl.updateStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderUtils.getUrls (cognitive 18) · ×1
  • ClassLoaderUtils.getUrls (cognitive 18) core/src/main/java/com/taobao/arthas/core/util/ClassLoaderUtils.java:131 — ClassLoaderUtils.getUrls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IPUtils.getLocalIP (cognitive 18) · ×1
  • IPUtils.getLocalIP (cognitive 18) core/src/main/java/com/taobao/arthas/core/util/IPUtils.java:31 — IPUtils.getLocalIP has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessUtils.findJcmd (cognitive 17) · ×1
  • ProcessUtils.findJcmd (cognitive 17) boot/src/main/java/com/taobao/arthas/boot/ProcessUtils.java:462 — ProcessUtils.findJcmd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReflectUtils.getClass (cognitive 17) · ×1
  • ReflectUtils.getClass (cognitive 17) common/src/main/java/com/taobao/arthas/common/ReflectUtils.java:209 — ReflectUtils.getClass has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (6 pts), if/else 4 (6 pts), loops 3, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HelpCommand.createCommandVO (cognitive 17) · ×1
  • HelpCommand.createCommandVO (cognitive 17) core/src/main/java/com/taobao/arthas/core/command/basic1000/HelpCommand.java:68 — HelpCommand.createCommandVO has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MBeanCommand.completeBeanName (cognitive 17) · ×1
  • MBeanCommand.completeBeanName (cognitive 17) core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java:250 — MBeanCommand.completeBeanName has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArthasBootstrap.destroy (cognitive 17) · ×1
  • ArthasBootstrap.destroy (cognitive 17) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:842 — ArthasBootstrap.destroy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, error handling 3 (6 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · McpServerConfig.<init> (cognitive 16) · ×1
  • McpServerConfig.<init> (cognitive 16) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServerFeatures.java:43 — McpServerConfig.<init> has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 1, if/else 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Telnet._processSuboption (cognitive 16) · ×1
  • Telnet._processSuboption (cognitive 16) client/src/main/java/org/apache/commons/net/telnet/Telnet.java:687 — Telnet._processSuboption has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Telnet.addOptionHandler (cognitive 16) · ×1
  • Telnet.addOptionHandler (cognitive 16) client/src/main/java/org/apache/commons/net/telnet/Telnet.java:1092 — Telnet.addOptionHandler has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (16 pts) (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SocketClient.isAvailable (cognitive 16) · ×1
  • SocketClient.isAvailable (cognitive 16) client/src/main/java/org/apache/commons/net/SocketClient.java:375 — SocketClient.isAvailable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassLoaderMetaspaceCommand.emitMappings (cognitive 16) · ×1
  • ClassLoaderMetaspaceCommand.emitMappings (cognitive 16) core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:207 — ClassLoaderMetaspaceCommand.emitMappings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JadCommand.process (cognitive 16) · ×1
  • JadCommand.process (cognitive 16) core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:125 — JadCommand.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LoggerCommand.loggers (cognitive 16) · ×1
  • LoggerCommand.loggers (cognitive 16) core/src/main/java/com/taobao/arthas/core/command/logger/LoggerCommand.java:204 — LoggerCommand.loggers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancerCommand.enhance (cognitive 16) · ×1
  • EnhancerCommand.enhance (cognitive 16) core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:193 — EnhancerCommand.enhance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ArthasBootstrap.resolveCommandLocationUrls (cognitive 16) · ×1
  • ArthasBootstrap.resolveCommandLocationUrls (cognitive 16) core/src/main/java/com/taobao/arthas/core/server/ArthasBootstrap.java:568 — ArthasBootstrap.resolveCommandLocationUrls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InternalCommandManager.completeSingleCommand (cognitive 16) · ×1
  • InternalCommandManager.completeSingleCommand (cognitive 16) core/src/main/java/com/taobao/arthas/core/shell/system/impl/InternalCommandManager.java:96 — InternalCommandManager.completeSingleCommand has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · CompletionAdaptor.complete (cognitive 16) · ×1
  • CompletionAdaptor.complete (cognitive 16) core/src/main/java/com/taobao/arthas/core/shell/term/impl/CompletionAdaptor.java:45 — CompletionAdaptor.complete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringUtils.delimitedListToStringArray (cognitive 16) · ×1
  • StringUtils.delimitedListToStringArray (cognitive 16) core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:646 — StringUtils.delimitedListToStringArray has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringUtils.tokenizeToStringArray (cognitive 16) · ×1
  • StringUtils.tokenizeToStringArray (cognitive 16) core/src/main/java/com/taobao/arthas/core/util/StringUtils.java:617 — StringUtils.tokenizeToStringArray has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (145 shared lines) · ×1
  • Near-duplicate member pair (145 shared lines) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:151 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:151-369 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:99-260 — These two members are variants of one another: 145 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (68 shared lines) · ×1
  • Near-duplicate member pair (68 shared lines) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:73 — core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:73-170 | core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:149-312 — These two members are variants of one another: 68 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (62 shared lines) · ×1
  • Near-duplicate member pair (62 shared lines) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:181 — core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:181-266 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:268-365 — These two members are variants of one another: 62 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (26 shared lines) · ×1
  • Near-duplicate member pair (26 shared lines) core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:54 — core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommandAdviceListener.java:54-95 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java:76-116 — These two members are variants of one another: 26 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/StackTool.java:51 — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/StackTool.java:51-70 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TraceTool.java:48-71 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:439 — core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:439-461 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:463-485 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:487-509 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:511-533 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:535-557 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:559-581 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:583-605 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:607-629 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:631-653 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:101 — core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:101-124 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:127-150 | core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:153-176 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:101-124 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:127-150 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:153-176 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/DumpClassTool.java:37 — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/DumpClassTool.java:37-57 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/JadTool.java:36-58 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/MemoryCompilerTool.java:31-49 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/RedefineTool.java:24-36 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/RetransformTool.java:24-36 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×1
  • Duplicated block (47 lines × 2) core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:76 — core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:76-122 | core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:197-243 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java` and `core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (36–37 lines × 2) · ×1
  • Duplicated block (36–37 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-274 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:147-183 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/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.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:676 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:676-705 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:432-461 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:676` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:343 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:343-369 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:234-260 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:343` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:232` calls `registerAdviceListener` and `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:342` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20–25 lines × 2) · ×1
  • Duplicated block (20–25 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:559 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:559-578 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:318-342 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:559` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 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-629 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:369-393 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:516 — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:516-539 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java:281-304 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java` and `labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 290 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:27 — labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:27-48 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/ZookeeperNativeAgentRegistry.java:23-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.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.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:216 — core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:216-243 | core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:316-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/util/ThreadUtil.java:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `threadInfo` to `ThreadInfo` in one and `BusyThreadInfo` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:36 — labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:36-54 | labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/ClientStreamExecutor.java:36-54 | labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/ServerStreamExecutor.java:33-51 — before extracting anything, compare `labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java` and `labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/ClientStreamExecutor.java` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/BiStreamExecutor.java:33` calls `getStreamId`, `computeIfAbsent` and `labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/executor/ServerStreamExecutor.java:32` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:87 — core/src/main/java/com/taobao/arthas/core/command/monitor200/DashboardCommand.java:87-105 | core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java:169-186 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (18 lines × 8) · ×1
  • Duplicated block (18 lines × 8) core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:444 — core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:444-461 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:468-485 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:492-509 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:540-557 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:564-581 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:588-605 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:612-629 | core/src/main/java/com/taobao/arthas/core/util/ObjectUtils.java:636-653 — all 8 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/util/ObjectUtils.java:444` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `array` to `Object[]` in one and `boolean[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 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-296 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:324-339 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:626-641 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 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-149 | core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java:261-276 — before extracting anything, compare `core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java` and `core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 10) · ×1
  • Duplicated block (14–15 lines × 10) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:217 — core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:217-231 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:293-307 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:328-342 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:363-377 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:398-412 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:433-447 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:468-482 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:503-517 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:538-552 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:572-585 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:128 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:128-140 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:208-220 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStreamableHttpRequestHandler.java:535-547 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java:141` calls `headers`, `set` and `arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:222` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:239 — core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:239-251 | core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:179-191 | core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:173-184 — 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/command/monitor200/EnhancerCommand.java:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–13 lines × 3) · ×1
  • Duplicated block (4–13 lines × 3) core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:1083 — core/src/main/java/com/taobao/arthas/core/command/monitor200/ProfilerCommand.java:1083-1086 | core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:399-411 | core/src/main/java/com/taobao/arthas/core/shell/cli/CompletionUtils.java:419-429 — 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/monitor200/ProfilerCommand.java:1083` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:70 — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java:70-80 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/StackTool.java:56-66 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TraceTool.java:56-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 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-86 | core/src/main/java/com/taobao/arthas/core/command/monitor200/VmToolCommand.java:218-229 — 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 4) · ×1
  • Duplicated block (20–21 lines × 4) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:62 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:62-82 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentDiscoveryFactory.java:62-82 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentProxyRegistryFactory.java:62-82 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/factory/NativeAgentRegistryFactory.java:60-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:62` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:194 — core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:194-204 | core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:263-271 — both copies are in the same file, so extract the 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/advisor/AdviceListenerManager.java:194` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 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-112 | core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:120-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:112 — core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:112-121 | core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java:114-123 | core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:139-148 | core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:118-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, 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:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 9) · ×1
  • Duplicated block (9 lines × 9) core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:222 — core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:222-231 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:257-265 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:298-307 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:333-342 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:368-377 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:403-412 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:438-447 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:473-482 | core/src/main/java/com/taobao/arthas/core/view/ObjectView.java:508-517 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/view/ObjectView.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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:307 — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:307-315 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:346-354 | arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultTaskManager.java:577-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. 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:307` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 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-107 | core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java:126-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 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-72 | core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:46-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchClassTool.java:52` calls `addFlag` and `core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:45` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 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:124-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClient.java:133` calls `IdleStateHandler` and `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:97` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:82 — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:82-89 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java:124-131 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:133-140 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:171-178 — before extracting anything, compare `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/NativeAgentProxyBootstrap.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/server/NativeAgentManagementWebBootstrap.java:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–8 lines × 3) · ×1
  • Duplicated block (6–8 lines × 3) labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:90 — labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:90-95 | labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:138-145 | labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpNativeAgentHandler.java:106-112 — 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 `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:138` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/http/HttpNativeAgentHandler.java:105` calls `headers`, `set` and `labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/server/handler/http/HttpNativeAgentHandler.java:89` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) 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-109 | core/src/main/java/com/taobao/arthas/core/command/klass100/MemoryCompilerCommand.java:89-93 | core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:111-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/src/main/java/com/taobao/arthas/core/command/klass100/MemoryCompilerCommand.java:93` calls `size` and `core/src/main/java/com/taobao/arthas/core/command/klass100/SearchMethodCommand.java:114` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) core/src/main/java/com/taobao/arthas/core/command/model/OgnlModel.java:1 — core/src/main/java/com/taobao/arthas/core/command/model/OgnlModel.java:1-46 | core/src/main/java/com/taobao/arthas/core/command/model/VmToolModel.java:1-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/taobao/arthas/core/command/model/OgnlModel.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/LocalFrameHandler.java:21 — labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/LocalFrameHandler.java:21-55 | tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/LocalFrameHandler.java:16-50 — before extracting anything, compare `labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/forward/LocalFrameHandler.java` and `tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/LocalFrameHandler.java` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 7) · ×1
  • Duplicated block (6 lines × 7) core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java:214 — core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java:214-219 | core/src/main/java/com/taobao/arthas/core/command/monitor200/MonitorCommand.java:120-125 | core/src/main/java/com/taobao/arthas/core/command/monitor200/StackCommand.java:104-109 | core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:324-329 | core/src/main/java/com/taobao/arthas/core/command/monitor200/TraceCommand.java:147-152 | core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchCommand.java:187-192 | labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/WatchRequestModel.java:83-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
P8 · Schema migrations · Schema created by Hibernate ddl-auto (no migration path) · ×1
  • Schema created by Hibernate ddl-auto (no migration path) labs/arthas-jfr-backend/src/main/resources/application.yml:18 — Hibernate ddl-auto builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt Flyway or Liquibase, with `ddl-auto` set to `validate`, so every schema change is a versioned file applied the same way in every environment.
R10 · Code Duplication · Wholesale file copy (701 identical lines × 2 files) · ×1
  • Wholesale file copy (701 identical lines × 2 files) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:2 — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:2 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:2 — these 2 files are line-for-line copies of one another — 701 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (347 identical lines × 2 files) · ×1
  • Wholesale file copy (347 identical lines × 2 files) labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2 — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:2 · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:2 — these 2 files are line-for-line copies of one another — 347 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (274 identical lines × 2 files) · ×1
  • Wholesale file copy (274 identical lines × 2 files) web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1 — web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1 · web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:1 — these 2 files are line-for-line copies of one another — 274 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (79 lines × 2 locations) · ×1
  • Duplicated block (79 lines × 2 locations) labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:222 — labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:222 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:560 — 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.
R10 · Code Duplication · Duplicated block (63 lines × 2 locations) · ×1
  • Duplicated block (63 lines × 2 locations) labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:115 — labs/arthas-grpc-web-proxy/ui/src/view/vmtoolView.vue:115 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:453 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:282 — labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:282 · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:373 — the two spans are one implementation copied and then locally edited — 460 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (35 lines × 2 locations) · ×1
  • Duplicated block (35 lines × 2 locations) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:369 — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:369 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:119 — web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:119 · web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:288 — the two spans are one implementation copied and then locally edited — 118 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (22 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:60 — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:60 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:106 — the two spans are one implementation copied and then locally edited — 74 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:17 — web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:17 · web-ui/arthasWebConsole/all/ui/ui/src/views/config/Vmoption.vue:13 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (20 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:22 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:22 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:83 — the two spans are one implementation copied and then locally edited — 185 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:723 — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:723 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:752 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (18 matched lines × 2 locations) labs/arthas-grpc-web-proxy/ui/src/view/pwdView.vue:48 — labs/arthas-grpc-web-proxy/ui/src/view/pwdView.vue:48 · labs/arthas-grpc-web-proxy/ui/src/view/syspropView.vue:94 — the two spans are one implementation copied and then locally edited — 133 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) labs/arthas-jfr-frontend/src/utils/color.ts:84 — labs/arthas-jfr-frontend/src/utils/color.ts:84 · labs/arthas-jfr-frontend/src/utils/color.ts:103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (15 lines × 3 locations) · ×1
  • Duplicated block (15 lines × 3 locations) labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:333 — labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:333 · labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:351 · labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:369 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (13 lines × 3 locations) · ×1
  • Duplicated block (13 lines × 3 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:41 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:41 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:54 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Mbean.vue:68 — 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.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (12 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/async/Profiler.vue:82 — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Profiler.vue:82 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Thread.vue:162 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (12 lines × 3 locations) · ×1
  • Duplicated block (12 lines × 3 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:22 — web-ui/arthasWebConsole/all/ui/ui/src/views/config/Options.vue:22 · web-ui/arthasWebConsole/all/ui/ui/src/views/config/Sysprop.vue:12 · web-ui/arthasWebConsole/all/ui/ui/src/views/config/Vmoption.vue:18 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (11 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:10 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Jad.vue:10 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Memory.vue:10 — the two spans are one implementation copied and then locally edited — 61 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (10 lines × 3 locations) · ×1
  • Duplicated block (10 lines × 3 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/async/Stack.vue:54 — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Stack.vue:54 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Tt.vue:140 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Watch.vue:73 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (10 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/HeapDump.vue:9 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/HeapDump.vue:9 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Memory.vue:8 — the two spans are one implementation copied and then locally edited — 52 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:73 — web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:73 · web-ui/arthasWebConsole/all/ui/ui/src/views/sync/ClassInfo.vue:88 — 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.
R10 · Code Duplication · Duplicated block with local edits (8 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (8 matched lines × 2 locations) web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:189 — web-ui/arthasWebConsole/all/ui/ui/src/views/async/Monitor.vue:189 · web-ui/arthasWebConsole/all/ui/ui/src/views/async/Trace.vue:96 — the two spans are one implementation copied and then locally edited — 57 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×1
  • Duplicated block (7 lines × 2 locations) labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:107 — labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:107 · labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:127 — 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.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:592 — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:592 · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:617 — 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.
R2 · Cyclomatic Complexity · Complex function Analysis (cyclomatic 68, cognitive 65) · ×1
  • Complex function Analysis (cyclomatic 68, cognitive 65) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:73 — Analysis has cyclomatic complexity 68 and cognitive complexity 65; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function toReadableValue (cyclomatic 25, cognitive 53) · ×1
  • Complex function toReadableValue (cyclomatic 25, cognitive 53) labs/arthas-jfr-frontend/src/utils/format.ts:45 — toReadableValue has cyclomatic complexity 25 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function FlameStats (cyclomatic 24, cognitive 21) · ×1
  • Complex function FlameStats (cyclomatic 24, cognitive 21) labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:36 — FlameStats has cyclomatic complexity 24 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function colorForFunctionType (cyclomatic 22, cognitive 14) · ×1
  • Complex function colorForFunctionType (cyclomatic 22, cognitive 14) labs/arthas-jfr-frontend/src/utils/color.ts:41 — colorForFunctionType has cyclomatic complexity 22 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleFilterValuesChecked (cyclomatic 19, cognitive 36) · ×1
  • Complex function handleFilterValuesChecked (cyclomatic 19, cognitive 36) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:354 — handleFilterValuesChecked has cyclomatic complexity 19 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleToggleFilterValuesChecked (cyclomatic 18, cognitive 35) · ×1
  • Complex function handleToggleFilterValuesChecked (cyclomatic 18, cognitive 35) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:436 — handleToggleFilterValuesChecked has cyclomatic complexity 18 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 21) · ×1
  • Complex function (anonymous) (cyclomatic 17, cognitive 21) labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:21 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 14, cognitive 13) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 13) labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1155 — (anonymous) has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function needReportSuccess (cyclomatic 13, cognitive 14) · ×1
  • Complex function needReportSuccess (cyclomatic 13, cognitive 14) web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:304 — needReportSuccess has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 12, cognitive 21) · ×1
  • Complex function (anonymous) (cyclomatic 12, cognitive 21) web-ui/arthasWebConsole/all/ui/ui/src/views/async/Trace.vue:21 — (anonymous) has cyclomatic complexity 12 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx · ×1
  • labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx: 1203 lines of code labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx:1 — labs/arthas-jfr-frontend/src/pages/Analysis/Analysis.tsx has 1203 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js · ×1
  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js: 907 lines of code labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js:1 — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-class.js has 907 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js · ×1
  • labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js: 907 lines of code labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js:1 — labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js has 907 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue · ×1
  • labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue: 638 lines of code labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue:1 — labs/arthas-grpc-web-proxy/ui/src/view/watchView.vue has 638 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts · ×1
  • web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts: 483 lines of code web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1 — web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts has 483 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts · ×1
  • web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts: 477 lines of code web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:1 — web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts has 477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js · ×1
  • labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js: 476 lines of code labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js:1 — labs/arthas-jfr-frontend/public/flame-graph/flame-graph-core.js has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js · ×1
  • labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js: 476 lines of code labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js:1 — labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 109 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R6 · Tooling · No test script · ×1
  • No test script — test ✗ · lint ✓ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~1042 LoC) · ×1
  • Dead file (~1042 LoC) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-class.js — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~527 LoC) · ×1
  • Dead file (~527 LoC) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-core.js — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~348 LoC) · ×1
  • Dead file (~348 LoC) labs/arthas-jfr-frontend/src/components/FlameGraph/flame-graph-component.js — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~179 LoC) · ×1
  • Dead file (~179 LoC) labs/arthas-jfr-frontend/src/utils/color.ts — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~55 LoC) · ×1
  • Dead file (~55 LoC) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Retransform.vue — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~46 LoC) · ×1
  • Dead file (~46 LoC) web-ui/arthasWebConsole/all/ui/ui/src/views/sync/Memory.vue — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~36 LoC) · ×1
  • Dead file (~36 LoC) labs/arthas-jfr-frontend/src/services/jfr.ts — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~20 LoC) · ×1
  • Dead file (~20 LoC) web-ui/arthasWebConsole/all/ui/ui/src/components/input/SwitchInput.vue — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~13 LoC) · ×1
  • Dead file (~13 LoC) web-ui/arthasWebConsole/all/ui/ui/src/components/show/ResTable.vue — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~12 LoC) · ×1
  • Dead file (~12 LoC) web-ui/arthasWebConsole/all/ui/ui/src/components/show/OptionConfigMenu.vue — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~11 LoC) · ×1
  • Dead file (~11 LoC) web-ui/arthasWebConsole/all/ui/ui/src/components/input/PlayStop.vue — no import path from any entry point (19 application, 12 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'core-js' · ×1
  • Unused dependency 'core-js' — Declared in labs/arthas-grpc-web-proxy/ui/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X15 · Unvalidated length from an untrusted reader · Length read from the parsed input is spent without ever being bounded · ×1
  • Length read from the parsed input is spent without ever being bounded labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/GrpcRequest.java:102 — `length` is read from the bytes being parsed at line 101 (`readInt`), then used to size a `new byte[]` at line 102 — and nowhere in its scope is `length` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `length` against the bytes actually remaining and a maximum the format allows before allocating.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×1
  • Owned disposable field is never released core/src/main/java/com/taobao/arthas/core/distribution/impl/SharingResultDistributorImpl.java:33 — `SharingResultDistributorImpl` declares `close()` — so it has told every caller, and every try-with-resources, that it holds something worth releasing — and it creates `sharingResultConsumer` itself (line 33, `new SharingResultConsumerImpl(…)`), which makes that instance its own. But `sharingResultConsumer` is named in none of the methods the disposal search covered: `close` (line 120) — that is `close()` plus every method it calls on `this` BY NAME, so a release reached through a superclass, a callback or a registry is not followed and is worth checking before acting. The field is released nowhere else in the class and is never handed to anything else, so no other owner can be releasing it. On what was read, closing this object releases everything except the one thing it owns: whatever `new SharingResultConsumerImpl(…)` holds — a file descriptor, a socket, a pool's live threads — outlives it, and a long-running process runs out of them one closed instance at a time. Release it in `close()` (`sharingResultConsumer.close()`), or, if it truly does not need releasing, drop the `close()` so the claim and the behaviour agree.
Minor — 273 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×130
  • Orphaned file arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServer.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/ToolCallbackCreateTaskHandler.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/model/jfr/RecordedEvent.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/CPUTimeExtractor.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-server/src/main/java/com/taobao/arthas/grpc/server/handler/GrpcDispatcher.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServerFeatures.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file web-ui/arthasWebConsole/all/ui/ui/src/stores/fetch.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/main/java/com/taobao/arthas/core/command/view/MBeanView.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/main/java/com/taobao/arthas/core/distribution/impl/SharingResultDistributorImpl.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/DemoBootstrap.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-jfr-frontend/src/components/FlameGraph/FlameStats.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/WatchRequestModel.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/objectUtils/JavaObjectConverter.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/main/java/com/taobao/arthas/core/command/view/TraceView.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/ObjectService.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/SpyImpl.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionManagerImpl.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 105 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:146 — `info` at line 146 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:155 — `info` at line 155 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:162 — `info` at line 162 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/TunnelSocketFrameHandler.java:305 — `info` at line 305 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging REDACTED:58 — `warn` at line 58 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:102 — `info` at line 102 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ProxyClient.java:79 — `info` at line 79 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClientSocketClientHandler.java:174 — `error` at line 174 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/EtcdNativeAgentProxyRegistry.java:75 — `error` at line 75 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/registry/impl/ZookeeperNativeAgentProxyRegistry.java:55 — `info` at line 55 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:129 — `info` at line 129 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:150 — `info` at line 150 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:168 — `info` at line 168 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:185 — `info` at line 185 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/server/NativeAgentBootstrap.java:188 — `error` at line 188 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/EtcdNativeAgentRegistry.java:74 — `error` at line 74 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/registry/impl/ZookeeperNativeAgentRegistry.java:51 — `info` at line 51 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/JvmAttachmentHandler.java:46 — `info` at line 46 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/JvmAttachmentHandler.java:48 — `error` at line 48 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/core/ListJvmProcessHandler.java:51 — `error` at line 51 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java:268 — `info` at line 268 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/extractor/WallClockExtractor.java:121 — `warn` at line 121 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:72 — `error` at line 72 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:128 — `info` at line 128 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • Interpolated log message defeats structured logging labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/proxy/GrpcWebRequestHandler.java:138 — `warn` at line 138 is handed a message assembled at the call — a string concatenated with a value, or `String.format` — through SLF4J or log4j 2, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or `log.atInfo().addKeyValue("order_id", orderId).log("order moved")` with SLF4J 2's fluent API. An exception goes last, as the throwable argument, not into the text.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java:61 — `!"ws".equalsIgnoreCase(scheme) && !"wss".equalsIgnoreCase(scheme)` appears character-identically in 2 files — tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/ForwardClient.java, tunnel-client/src/main/java/com/alibaba/arthas/tunnel/client/TunnelClient.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:598 — `!GlobalOptions.isUnsafe && clazz.getClassLoader() == null` appears character-identically in 3 files — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java, core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:523 — `!classPath.mkdirs() && !classPath.exists()` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java:71 — `!line.trim().isEmpty() && line.contains("=")` appears character-identically in 4 files — labs/cluster-management/native-agent-management-web/src/main/java/com/alibaba/arthas/nat/agent/management/web/factory/NativeAgentProxyDiscoveryFactory.java, labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentDiscoveryFactory.java, labs/cluster-management/native-agent-proxy/src/main/java/com/alibaba/arthas/nat/agent/proxy/factory/NativeAgentProxyRegistryFactory.java, labs/cluster-management/native-agent/src/main/java/com/alibaba/arthas/nat/agent/factory/NativeAgentRegistryFactory.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate common/src/main/java/com/taobao/arthas/common/FileUtils.java:124 — `!parent.mkdirs() && !parent.isDirectory()` appears character-identically in 2 files — common/src/main/java/com/taobao/arthas/common/FileUtils.java, core/src/main/java/com/taobao/arthas/core/util/FileUtils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/basic1000/Base64Command.java:163 — `!process.session().isTty() && sizeLimit > maxSizeLimitOfNonTty` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/command/basic1000/Base64Command.java, core/src/main/java/com/taobao/arthas/core/command/basic1000/CatCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java:47 — `action == null || action.trim().isEmpty()` appears character-identically in 3 files — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java:79 — `appenders != null && !appenders.isEmpty()` appears character-identically in 3 files — core/src/main/java/com/taobao/arthas/core/command/logger/Log4jHelper.java, core/src/main/java/com/taobao/arthas/core/command/logger/LogbackHelper.java, core/src/main/java/com/taobao/arthas/core/command/view/LoggerView.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java:147 — `classLoader != null && hashCode != null && !Integer.toHexString(classLoader.hashCode()).equals(hashCode)` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:37 — `classLoaderClass != null && !classLoaderClass.trim().isEmpty()` appears character-identically in 11 files — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/ClassLoaderTool.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java:35 — `classLoaderHash != null && !classLoaderHash.trim().isEmpty()` appears character-identically in 10 files — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/GetStaticTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/OgnlTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/jvm300/VMToolTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/ClassLoaderTool.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java:215 — `classNameExcludeMatcher == null && getExcludeClassPattern() != null` appears character-identically in 7 files — core/src/main/java/com/taobao/arthas/core/command/monitor200/LineCommand.java, core/src/main/java/com/taobao/arthas/core/command/monitor200/MonitorCommand.java, core/src/main/java/com/taobao/arthas/core/command/monitor200/StackCommand.java, core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java:220 — `clazz == null || clazz.getClassLoader() == null` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java, core/src/main/java/com/taobao/arthas/core/util/StringUtils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:609 — `clazz.isInterface() && !GlobalOptions.isSupportDefaultMethod` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:105 — `code == null && classLoaderClass != null` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/Assert.java:27 — `collection == null || collection.isEmpty()` appears character-identically in 2 files — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/Assert.java, arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/util/Utils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:100 — `directory != null && !FileUtils.isDirectoryOrNotExist(directory)` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java:232 — `effect.cCnt() == 0 || effect.mCnt() == 0` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/model/EnhancerRequestModel.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultCreateTaskContext.java:139 — `exchange != null && exchange.getTransportContext() != null` appears character-identically in 2 files — arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/DefaultCreateTaskContext.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/util/McpToolUtils.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java:175 — `file.isHidden() || !file.exists() || file.isDirectory() || !file.isFile()` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/shell/term/impl/http/DirectoryBrowser.java, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/server/httpServer/NettyHttpStaticFileHandler.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java:107 — `hashCode == null && classLoaderClass != null` appears character-identically in 6 files — core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/MemoryCompilerCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/RedefineCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/RetransformCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java:125 — `matchedClasses == null || matchedClasses.isEmpty()` appears character-identically in 3 files — core/src/main/java/com/taobao/arthas/core/command/klass100/DumpClassCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/GetStaticCommand.java, core/src/main/java/com/taobao/arthas/core/command/klass100/JadCommand.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java:166 — `matchingClasses != null && !matchingClasses.contains(classBeingRedefined)` appears character-identically in 2 files — core/src/main/java/com/taobao/arthas/core/advisor/Enhancer.java, labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/Enhancer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java:67 — `methodPattern != null && !methodPattern.trim().isEmpty()` appears character-identically in 5 files — core/src/main/java/com/taobao/arthas/core/mcp/tool/function/klass100/SearchMethodTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/MonitorTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/StackTool.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TraceTool.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate agent/src/main/java/com/taobao/arthas/agent/ArthasClassloader.java:26 — `name != null && (name.startsWith("sun.") || name.startsWith("java."))` appears character-identically in 2 files — agent/src/main/java/com/taobao/arthas/agent/ArthasClassloader.java, arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/AttachArthasClassloader.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D30 · Dependency Vulnerabilities · Low CVE · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
P10 · Library API & versioning · Implementation type on the public API · ×10
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:24 — 1 public type in `com.taobao.arthas.core.advisor` is marked as implementation by its own namespace, folder or name: `SpyImpl` (core/src/main/java/com/taobao/arthas/core/advisor/SpyImpl.java:24, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:40 — 1 public type in `com.taobao.arthas.core.command` is marked as implementation by its own namespace, folder or name: `CommandExecutorImpl` (core/src/main/java/com/taobao/arthas/core/command/CommandExecutorImpl.java:40, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/distribution/impl/CompositeResultDistributorImpl.java:16 — 5 public types in `com.taobao.arthas.core.distribution.impl` are marked as implementation by their own namespace, folder or name: `CompositeResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/CompositeResultDistributorImpl.java:16, `impl`), `PackingResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/PackingResultDistributorImpl.java:15, `impl`), `ResultConsumerImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/ResultConsumerImpl.java:22, `impl`), `SharingResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/SharingResultDistributorImpl.java:23, `impl`), `TermResultDistributorImpl` (core/src/main/java/com/taobao/arthas/core/distribution/impl/TermResultDistributorImpl.java:14, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:19 — 1 public type in `com.taobao.arthas.core.security` is marked as implementation by its own namespace, folder or name: `SecurityAuthenticatorImpl` (core/src/main/java/com/taobao/arthas/core/security/SecurityAuthenticatorImpl.java:19, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/shell/cli/impl/CliTokenImpl.java:13 — 1 public type in `com.taobao.arthas.core.shell.cli.impl` is marked as implementation by its own namespace, folder or name: `CliTokenImpl` (core/src/main/java/com/taobao/arthas/core/shell/cli/impl/CliTokenImpl.java:13, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/shell/command/impl/AnnotatedCommandImpl.java:18 — 2 public types in `com.taobao.arthas.core.shell.command.impl` are marked as implementation by their own namespace, folder or name: `AnnotatedCommandImpl` (core/src/main/java/com/taobao/arthas/core/shell/command/impl/AnnotatedCommandImpl.java:18, `impl`), `CommandBuilderImpl` (core/src/main/java/com/taobao/arthas/core/shell/command/impl/CommandBuilderImpl.java:15, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/shell/command/internal/CloseFunction.java:8 — 9 public types in `com.taobao.arthas.core.shell.command.internal` are marked as implementation by their own namespace, folder or name: `CloseFunction` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/CloseFunction.java:8, `internal`), `GrepHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/GrepHandler.java:16, `internal`), `PlainTextHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/PlainTextHandler.java:11, `internal`), `RedirectHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/RedirectHandler.java:17, `internal`), `StatisticsFunction` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/StatisticsFunction.java:10, `internal`), `StdoutHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/StdoutHandler.java:12, `internal`), `TeeHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/TeeHandler.java:16, `internal`), `TermHandler` (core/src/main/java/com/taobao/arthas/core/shell/command/internal/TermHandler.java:10, `internal`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/shell/history/impl/HistoryManagerImpl.java:17 — 1 public type in `com.taobao.arthas.core.shell.history.impl` is marked as implementation by its own namespace, folder or name: `HistoryManagerImpl` (core/src/main/java/com/taobao/arthas/core/shell/history/impl/HistoryManagerImpl.java:17, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/shell/impl/ShellImpl.java:53 — 2 public types in `com.taobao.arthas.core.shell.impl` are marked as implementation by their own namespace, folder or name: `ShellImpl` (core/src/main/java/com/taobao/arthas/core/shell/impl/ShellImpl.java:53, `impl`), `ShellServerImpl` (core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java:44, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionImpl.java:18 — 2 public types in `com.taobao.arthas.core.shell.session.impl` are marked as implementation by their own namespace, folder or name: `SessionImpl` (core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionImpl.java:18, `impl`), `SessionManagerImpl` (core/src/main/java/com/taobao/arthas/core/shell/session/impl/SessionManagerImpl.java:24, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
D10 · Test Quality · No direct assertions · ×7
  • No direct assertions: testCountInstancesMemoryLeak arthas-vmtool/src/test/java/arthas/VmToolTest.java:111 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testGetAllLoadedClassesMemoryLeak arthas-vmtool/src/test/java/arthas/VmToolTest.java:131 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testGetInstancesMemoryLeak arthas-vmtool/src/test/java/arthas/VmToolTest.java:68 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testIsSnapshot arthas-vmtool/src/test/java/arthas/VmToolTest.java:39 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testMallocStats arthas-vmtool/src/test/java/arthas/VmToolTest.java:222 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testMallocTrim arthas-vmtool/src/test/java/arthas/VmToolTest.java:216 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testSumInstancesMemoryLeak arthas-vmtool/src/test/java/arthas/VmToolTest.java:91 — No conventional assertion call was detected, and 7 of 13 tests in `arthas-vmtool` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
AX6 · Interface segregation · Fat interface · ×5
  • Fat interface: CommandProcess (26 abstract methods) core/src/main/java/com/taobao/arthas/core/shell/command/CommandProcess.java:20 — `CommandProcess` declares 26 abstract methods: `appendResult`, `args`, `argsTokens`, `backgroundHandler`, `cacheLocation`, `commandLine`, `echoTips`, `end`, `end`, `end`, `endHandler`, `foregroundHandler`, `interruptHandler`, `isForeground`, `isRunning`, `register`, `resizehandler`, `resume`, `resumeHandler`, `session`, `stdinHandler`, `suspend`, `suspendHandler`, `times`, `unregister`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 26 declarations carry 24 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 24 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Session (21 abstract methods) core/src/main/java/com/taobao/arthas/core/shell/session/Session.java:16 — `Session` declares 21 abstract methods: `get`, `getCommandResolvers`, `getCreateTime`, `getForegroundJob`, `getInstrumentation`, `getLastAccessTime`, `getLock`, `getPid`, `getResultDistributor`, `getSessionId`, `getUserId`, `isLocked`, `isTty`, `put`, `remove`, `setForegroundJob`, `setLastAccessTime`, `setResultDistributor`, `setUserId`, `tryLock`, `unLock`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Job (17 abstract methods) core/src/main/java/com/taobao/arthas/core/shell/system/Job.java:16 — `Job` declares 17 abstract methods under just 15 distinct name(s): `getSession`, `id`, `interrupt`, `isRunInBackground`, `line`, `process`, `resume`, `resume`, `run`, `run`, `setTimeoutDate`, `status`, `suspend`, `terminate`, `timeoutDate`, `toBackground`, `toForeground`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 17 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 17 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
  • Fat interface: Process (27 abstract methods) core/src/main/java/com/taobao/arthas/core/shell/system/Process.java:14 — `Process` declares 27 abstract methods: `cacheLocation`, `exitCode`, `getSession`, `getTty`, `interrupt`, `interrupt`, `resume`, `resume`, `resume`, `resume`, `run`, `run`, `setJobId`, `setSession`, `setTty`, `startTime`, `status`, `suspend`, `suspend`, `terminate`, `terminate`, `terminatedHandler`, `times`, `toBackground`, `toBackground`, `toForeground`, `toForeground`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 27 declarations carry 18 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 18 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ArthasStreamObserver<T> (18 abstract methods) labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/observer/ArthasStreamObserver.java:11 — `ArthasStreamObserver<T>` declares 18 abstract methods: `appendResult`, `end`, `end`, `end`, `getInstrumentation`, `getJobId`, `getListener`, `getPorcessStatus`, `getRequestModel`, `onCompleted`, `onError`, `onNext`, `register`, `setProcessStatus`, `setRequestModel`, `times`, `unregister`, `write`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 18 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
X7 · Silent fallback defaults · Silent fallback default in catch · ×5
  • Silent fallback default in catch common/src/main/java/com/taobao/arthas/common/SocketUtils.java:57 — `findTcpListenProcess` swallows every exception into `return -1` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:531 — `safeFileSize` swallows every exception into `return -1L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java:590 — `safeLong` swallows every exception into `return -1L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch core/src/main/java/com/taobao/arthas/core/command/monitor200/JvmCommand.java:81 — `invokeFileDescriptor` swallows every exception into `return -1` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch core/src/main/java/com/taobao/arthas/core/util/DateUtils.java:36 — `getStartDateTime` swallows every exception into `return "unknown"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×4
  • Diagnostic log message is built whether or not it is wanted common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:48 — `trace` at line 48 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 48), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:52 — `trace` at line 52 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 52), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:66 — `trace` at line 66 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 66), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted common/src/main/java/com/taobao/arthas/common/ExecutingCommand.java:70 — `trace` at line 70 is called with an argument built by `Arrays.toString(cmdToRunWithArgs)` (line 70), whose cost grows with the collection it walks. Java evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because trace is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled`/`isTraceEnabled` test, no debug flag, no lambda or `Supplier` the logger calls only when the level is on.
IC1 · Incompleteness & stubs · Empty method body · ×2
  • Empty method body core/src/main/java/com/taobao/arthas/core/advisor/AdviceListenerManager.java:208 — `updateAdviceListeners` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body labs/arthas-grpc-web-proxy/src/main/java/com/taobao/arthas/grpcweb/grpc/service/advisor/AdviceListenerManager.java:182 — `updateAdviceListeners` has an empty body — confirm it's an intentional no-op and not an unfinished method.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 13 significant file(s) lose their only recent owner: core/src/main/java/com/taobao/arthas/core/command/klass100/ClassLoaderMetaspaceCommand.java, boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/basic1000/UploadFileTool.java, client/src/main/java/com/taobao/arthas/client/TelnetConsole.java, core/src/main/java/com/taobao/arthas/core/command/monitor200/EnhancerCommand.java, core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/ProfilerTool.java, core/src/main/java/com/taobao/arthas/core/shell/command/internal/GrepHandler.java, core/src/main/java/com/taobao/arthas/core/command/BuiltinCommandPack.java (+5 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (22 single-owned of 316 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 316 of the 900 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: core/src/main/java/com/taobao/arthas/core/command/basic1000/JFRCommand.java, core/src/main/java/com/taobao/arthas/core/shell/impl/ShellServerImpl.java, arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/config/McpServerProperties.java, arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/task/TaskDefaults.java, core/src/main/java/com/taobao/arthas/core/command/view/ViewRenderUtil.java, agent/src/main/java/com/taobao/arthas/agent334/AgentBootstrap.java, core/src/main/java/com/taobao/arthas/core/util/TypeRenderUtils.java, core/src/main/java/com/taobao/arthas/core/util/metrics/RateCounter.java.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 3 of 28 project(s) overshoot their size bounds, lowering Project Cohesion to 8.2/10. The most over is `core` (48095 LoC, 496 module-visible types across 60 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 130 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpStatelessNettyServer.java, arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/McpServer.java, labs/arthas-jfr-backend/src/main/java/org/example/jfranalyzerbackend/service/impl/JFRAnalyzerImpl.java, web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts, labs/arthas-jfr-frontend/src/components/FlameGraph/ReactFlameGraphWrapper.tsx, web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts, arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/tool/ToolCallbackCreateTaskHandler.java, arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpStatelessHttpRequestHandler.java (and 122 more) (137 orphaned of 376 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 376 of the 900 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 13/17 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `arthas-spring-boot-starter/src/it/arthas-spring-boot-starter-example`, `arthas-spring-boot-starter/src/it/arthas-spring-boot3-starter-example`, `client`, `math-game`.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation labs/arthas-grpc-web-proxy/ui/package.json:10 — `labs/arthas-grpc-web-proxy/ui/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
R7 · Dead Code · Unused export 'analyzeJFRFile' · ×1
  • Unused export 'analyzeJFRFile' labs/arthas-jfr-frontend/src/services/jfrService.ts:43 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'validateJFRFile' · ×1
  • Unused export 'validateJFRFile' labs/arthas-jfr-frontend/src/services/jfrService.ts:70 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getSupportedDimensions' · ×1
  • Unused export 'getSupportedDimensions' labs/arthas-jfr-frontend/src/services/jfrService.ts:76 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'calculateSelfTime' · ×1
  • Unused export 'calculateSelfTime' labs/arthas-jfr-frontend/src/utils/format.ts:172 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getUnitConfig' · ×1
  • Unused export 'getUnitConfig' labs/arthas-jfr-frontend/src/utils/format.ts:194 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'formatPercentage' · ×1
  • Unused export 'formatPercentage' labs/arthas-jfr-frontend/src/utils/format.ts:205 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'smartFormatValue' · ×1
  • Unused export 'smartFormatValue' labs/arthas-jfr-frontend/src/utils/format.ts:211 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'getReadableRange' · ×1
  • Unused export 'getReadableRange' labs/arthas-jfr-frontend/src/utils/format.ts:222 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'bytesToMB' · ×1
  • Unused export 'bytesToMB' labs/arthas-jfr-frontend/src/utils/format.ts:240 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'bytesToKB' · ×1
  • Unused export 'bytesToKB' labs/arthas-jfr-frontend/src/utils/format.ts:245 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'bytesToGB' · ×1
  • Unused export 'bytesToGB' labs/arthas-jfr-frontend/src/utils/format.ts:250 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused module-local declaration 'HomeComponent' · ×1
  • Unused module-local declaration 'HomeComponent' labs/arthas-jfr-frontend/src/pages/Home/index.tsx:7 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'getBestUnit' · ×1
  • Unused module-local declaration 'getBestUnit' labs/arthas-jfr-frontend/src/utils/format.ts:154 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'tranOgnl' · ×1
  • Unused module-local declaration 'tranOgnl' web-ui/arthasWebConsole/all/ui/ui/src/views/async/Watch.vue:30 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/3 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 2/4 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~1.2 `!` null assertions per 1k TypeScript source lines — 6 assertion(s) across the 5201 source line(s) of the 39 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: web-ui/arthasWebConsole/all/ui/ui/src/machines/consoleMachine.ts (3), web-ui/arthasWebConsole/all/ui/ui/src/machines/perRequestMachine.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X7 · Silent fallback defaults · Pending state with no failure state · ×1
  • Pending state with no failure state labs/arthas-jfr-frontend/src/components/FileUpload/FileUpload.tsx:90 — The view draws `取消上传` under `uploading`, but `uploading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand core/src/main/java/com/taobao/arthas/core/command/monitor200/MBeanCommand.java:258 — `lastToken.startsWith("--")` can never decide this `||` — every value satisfying `lastToken.startsWith("--")` also satisfies `lastToken.startsWith("-")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Minor — 225 finding(s)
D12 · Dependency Hygiene · Outdated (compile) · ×104
  • Outdated (compile): io.netty:netty-common — io.netty:netty-common 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-resolver — io.netty:netty-resolver 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-codec — io.netty:netty-codec 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-transport — io.netty:netty-transport 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-codec-http — io.netty:netty-codec-http 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-transport-native-unix-common — io.netty:netty-transport-native-unix-common 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-buffer — io.netty:netty-buffer 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): io.netty:netty-handler — io.netty:netty-handler 4.1.132.Final → 4.2.20.Final available.
  • Outdated (compile): com.fasterxml.jackson.core:jackson-core — com.fasterxml.jackson.core:jackson-core 2.18.1 → 2.23.0 available.
  • Outdated (compile): com.fasterxml.jackson.datatype:jackson-datatype-jsr310 — com.fasterxml.jackson.datatype:jackson-datatype-jsr310 2.18.1 → 2.23.0 available.
  • Outdated (compile): com.fasterxml.jackson.core:jackson-annotations — com.fasterxml.jackson.core:jackson-annotations 2.18.1 → 2.23 available.
  • Outdated (compile): com.alibaba.fastjson2:fastjson2 — com.alibaba.fastjson2:fastjson2 2.0.64 → 2.0.66 available.
  • Outdated (compile): com.fasterxml.jackson.core:jackson-databind — com.fasterxml.jackson.core:jackson-databind 2.18.1 → 2.23.0 available.
  • Outdated (compile): com.alibaba.arthas:arthas-repackage-logger — com.alibaba.arthas:arthas-repackage-logger 0.0.20 → 0.0.21 available.
  • Outdated (compile): com.fifesoft:rsyntaxtextarea — com.fifesoft:rsyntaxtextarea 3.3.4 → 4.0.1 available.
  • Outdated (compile): ognl:ognl — ognl:ognl 3.3.5 → 3.4.17 available.
  • Outdated (compile): com.alibaba:repackage-asm — com.alibaba:repackage-asm 0.0.20 → 0.0.21 available.
  • Outdated (compile): org.javassist:javassist — org.javassist:javassist 3.29.0-GA → 3.33.0-GA available.
  • Outdated (compile): org.springframework.boot:spring-boot-configuration-processor — org.springframework.boot:spring-boot-configuration-processor 2.7.18 → 4.1.2 available.
  • Outdated (compile): io.netty:netty-codec-http2 — io.netty:netty-codec-http2 4.1.72.Final → 4.2.20.Final available.
  • Outdated (compile): com.google.protobuf:protobuf-java — com.google.protobuf:protobuf-java 3.19.2 → 4.36.2 available.
  • Outdated (compile): com.fasterxml.jackson.datatype:jackson-datatype-jsr310 — com.fasterxml.jackson.datatype:jackson-datatype-jsr310 2.21.2 → 2.23.0 available.
  • Outdated (compile): org.springframework.boot:spring-boot-actuator — org.springframework.boot:spring-boot-actuator 3.5.14 → 4.1.2 available.
  • Outdated (compile): io.projectreactor.netty:reactor-netty-core — io.projectreactor.netty:reactor-netty-core 1.2.17 → 1.3.8 available.
  • Outdated (compile): org.springframework.boot:spring-boot-configuration-processor — org.springframework.boot:spring-boot-configuration-processor 3.5.14 → 4.1.2 available.
  • + 79 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (provided) · ×59
  • Outdated (provided): org.slf4j:slf4j-api — org.slf4j:slf4j-api 1.7.36 → 2.0.20 available.
  • Outdated (provided): net.bytebuddy:byte-buddy-agent — net.bytebuddy:byte-buddy-agent 1.18.3 → 1.18.17 available.
  • Outdated (provided): org.apache.logging.log4j:log4j-core — org.apache.logging.log4j:log4j-core 2.12.4 → 2.26.1 available.
  • Outdated (provided): org.apache.logging.log4j:log4j-api — org.apache.logging.log4j:log4j-api 2.12.4 → 2.26.1 available.
  • Outdated (provided): org.springframework:spring-beans — org.springframework:spring-beans 5.3.31 → 7.0.10 available.
  • Outdated (provided): org.springframework.boot:spring-boot-starter — org.springframework.boot:spring-boot-starter 2.7.18 → 4.1.2 available.
  • Outdated (provided): org.springframework.boot:spring-boot-starter-logging — org.springframework.boot:spring-boot-starter-logging 2.7.18 → 4.1.2 available.
  • Outdated (provided): com.fasterxml.jackson.core:jackson-databind — com.fasterxml.jackson.core:jackson-databind 2.13.5 → 2.23.0 available.
  • Outdated (provided): org.springframework:spring-expression — org.springframework:spring-expression 5.3.31 → 7.0.10 available.
  • Outdated (provided): org.springframework.boot:spring-boot-starter-web — org.springframework.boot:spring-boot-starter-web 2.7.18 → 4.1.2 available.
  • Outdated (provided): jakarta.annotation:jakarta.annotation-api — jakarta.annotation:jakarta.annotation-api 1.3.5 → 3.0.0 available.
  • Outdated (provided): org.springframework.boot:spring-boot-starter-actuator — org.springframework.boot:spring-boot-starter-actuator 2.7.18 → 4.1.2 available.
  • Outdated (provided): org.springframework.boot:spring-boot-actuator — org.springframework.boot:spring-boot-actuator 2.7.18 → 4.1.2 available.
  • Outdated (provided): org.apache.tomcat.embed:tomcat-embed-el — org.apache.tomcat.embed:tomcat-embed-el 9.0.83 → 11.0.27 available.
  • Outdated (provided): org.springframework.boot:spring-boot-starter-tomcat — org.springframework.boot:spring-boot-starter-tomcat 2.7.18 → 4.1.2 available.
  • Outdated (provided): com.fasterxml.jackson.datatype:jackson-datatype-jsr310 — com.fasterxml.jackson.datatype:jackson-datatype-jsr310 2.13.5 → 2.23.0 available.
  • Outdated (provided): org.apache.tomcat.embed:tomcat-embed-websocket — org.apache.tomcat.embed:tomcat-embed-websocket 9.0.83 → 11.0.27 available.
  • Outdated (provided): org.apache.logging.log4j:log4j-api — org.apache.logging.log4j:log4j-api 2.17.2 → 2.26.1 available.
  • Outdated (provided): com.fasterxml.jackson.core:jackson-annotations — com.fasterxml.jackson.core:jackson-annotations 2.13.5 → 2.23 available.
  • Outdated (provided): org.apache.tomcat.embed:tomcat-embed-core — org.apache.tomcat.embed:tomcat-embed-core 9.0.83 → 11.0.27 available.
  • Outdated (provided): org.springframework:spring-webmvc — org.springframework:spring-webmvc 5.3.31 → 7.0.10 available.
  • Outdated (provided): io.micrometer:micrometer-core — io.micrometer:micrometer-core 1.9.17 → 1.17.2 available.
  • Outdated (provided): org.springframework:spring-context — org.springframework:spring-context 5.3.31 → 7.0.10 available.
  • Outdated (provided): org.springframework:spring-core — org.springframework:spring-core 5.3.31 → 7.0.10 available.
  • Outdated (provided): org.springframework.boot:spring-boot — org.springframework.boot:spring-boot 2.7.18 → 4.1.2 available.
  • + 34 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (test) · ×56
  • Outdated (test): org.junit.jupiter:junit-jupiter-engine — org.junit.jupiter:junit-jupiter-engine 5.10.0 → 6.1.3 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter — org.junit.jupiter:junit-jupiter 5.10.0 → 6.1.3 available.
  • Outdated (test): org.hamcrest:hamcrest-core — org.hamcrest:hamcrest-core 1.3 → 3.0 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-api — org.junit.jupiter:junit-jupiter-api 5.10.0 → 6.1.3 available.
  • Outdated (test): net.bytebuddy:byte-buddy — net.bytebuddy:byte-buddy 1.18.3 → 1.18.17 available.
  • Outdated (test): org.junit.platform:junit-platform-engine — org.junit.platform:junit-platform-engine 1.10.0 → 6.1.3 available.
  • Outdated (test): org.junit.platform:junit-platform-commons — org.junit.platform:junit-platform-commons 1.10.0 → 6.1.3 available.
  • Outdated (test): org.assertj:assertj-core — org.assertj:assertj-core 3.24.2 → 3.27.7 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-params — org.junit.jupiter:junit-jupiter-params 5.10.0 → 6.1.3 available.
  • Outdated (test): org.junit.vintage:junit-vintage-engine — org.junit.vintage:junit-vintage-engine 5.10.0 → 6.1.3 available.
  • Outdated (test): ch.qos.logback:logback-classic — ch.qos.logback:logback-classic 1.2.13 → 1.6.6 available.
  • Outdated (test): ch.qos.logback:logback-core — ch.qos.logback:logback-core 1.2.13 → 1.6.6 available.
  • Outdated (test): org.objenesis:objenesis — org.objenesis:objenesis 3.3 → 3.6 available.
  • Outdated (test): org.mockito:mockito-core — org.mockito:mockito-core 4.11.0 → 5.24.0 available.
  • Outdated (test): org.jboss.modules:jboss-modules — org.jboss.modules:jboss-modules 1.11.0.Final → 2.3.0 available.
  • Outdated (test): org.zeroturnaround:zt-zip — org.zeroturnaround:zt-zip 1.16 → 1.18.3 available.
  • Outdated (test): org.opentest4j:opentest4j — org.opentest4j:opentest4j 1.2.0 → 1.3.0 available.
  • Outdated (test): org.ow2.asm:asm — org.ow2.asm:asm 9.3 → 9.11.1 available.
  • Outdated (test): org.mockito:mockito-junit-jupiter — org.mockito:mockito-junit-jupiter 4.5.1 → 5.24.0 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-api — org.junit.jupiter:junit-jupiter-api 5.8.2 → 6.1.3 available.
  • Outdated (test): org.springframework:spring-test — org.springframework:spring-test 5.3.31 → 7.0.10 available.
  • Outdated (test): jakarta.activation:jakarta.activation-api — jakarta.activation:jakarta.activation-api 1.2.2 → 2.1.4 available.
  • Outdated (test): org.springframework.boot:spring-boot-starter-test — org.springframework.boot:spring-boot-starter-test 2.7.18 → 4.1.2 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-params — org.junit.jupiter:junit-jupiter-params 5.8.2 → 6.1.3 available.
  • Outdated (test): com.jayway.jsonpath:json-path — com.jayway.jsonpath:json-path 2.7.0 → 3.0.0 available.
  • + 31 more in this group — see findings.md.
D5 · Coupling · Off the main sequence · ×3
  • Off the main sequence: arthas-tunnel-common — arthas-tunnel-common: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: native-agent-common — native-agent-common: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: arthas-common — arthas-common: abstractness 0.05, instability 0.00, distance 0.95 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
D10 · Test Quality · Skipped (documented) · ×2
  • Skipped (documented): shouldRetransformOrdinaryClassWithLambdaInName core/src/test/java/com/taobao/arthas/core/util/InstrumentationUtilsTest.java:20 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
  • Skipped (documented): shouldStillSkipGeneratedLambdaClass core/src/test/java/com/taobao/arthas/core/util/InstrumentationUtilsTest.java:44 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
D12 · Dependency Hygiene · Outdated (runtime) · ×1
  • Outdated (runtime): jakarta.xml.bind:jakarta.xml.bind-api — jakarta.xml.bind:jakarta.xml.bind-api 4.0.4 → 4.0.5 available.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-de796ff3daa5435dbee9ea2195ad5ab6/history.json --exit-code 0 --source .3artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-de796ff3daa5435dbee9ea2195ad5ab6/tree.json --exit-code 0 --source .2artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .102artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .229artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) — `labs/cluster-management/native-agent-management-web/src/main/resources/native-agent/static/js/console-35a3b78f.js` — so the PII/GDPR sweep did not cover them at all.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1c5b6-94b9-7195-b1ee-2d5144ae05d0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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