Skip to content

SONARJAVA-7236 PoC: replace the ECJ parser with semsitter - #6415

Draft
rombirli wants to merge 114 commits into
masterfrom
rombirli/semsitter-ecj-replacement-v2
Draft

rombirli wants to merge 114 commits into
masterfrom
rombirli/semsitter-ecj-replacement-v2

Conversation

@rombirli

@rombirli rombirli commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Part of SONARJAVA-7234

Draft, do not merge. The plugin now extracts its packaged SemSitter bridge automatically. This build archives the bridge for the build host; prebuilt archives for the other supported operating systems are still pending.

Summary

  • Drops the jdt-package (ECJ) dependency.
  • Adds semsitter-bridge, a Cargo crate pinned to semsitter d606e04b766dc4f506c20c3c37f26d1511b5f065. One scan plus the semantic dump produces a tree-sitter Java CST with symbols, resolved uses and graph facts attached by byte span.
  • Speaks JSONL on stdin/stdout (analyze, cst, types, parse, quit) and the same operations from the CLI. SemsitterBridge is the Java client.
  • Translates that CST into the SonarJava AST and semantic model, and wires JParser / JParserConfig. One bridge process scans the batch, then each file is translated. JDK return type parameters (List.get → the type argument) are kept.
  • Packages the bridge as an xz resource in the plugin JAR, extracts it to the temporary directory, and runs it without sonar.java.semsitter.bridge or SEMSITTER_BRIDGE.

Still to come on this PR

  • Build and package prebuilt bridge archives for every supported operating system.
  • Fix non-model build issues until an analysis can run across the validation suite. Unit tests and ruling are not expected to all pass.

Test plan

  • java-frontend main sources compile
  • Sample A.java / B.java translate: fields, this, List.get → String, and B calling A.run resolve
  • Package plugin JAR and parse a source without bridge configuration, using the extracted bridge
  • Package every supported OS and get the Build check green
  • /pvf only after that build is green

Summary by Gitar

  • Bridge transport:
    • Adds protobuf wire format and shared-memory transport between the Java frontend and the SemSitter bridge
  • Type and symbol model:
    • Replaces ECJ bindings with SemSitter-backed symbols, types and annotation values
    • Evaluates constant values of static final fields and keeps deprecation on per-call method views
    • Resolves local and anonymous classes as type symbols and substitutes type variables in parameter types
  • Semantic fixes:
    • Resolves overloads by parameter types and binds compact source methods to their implicit class
    • Marks effectively final locals and parameters and reports unused imports as compiler warnings
    • Ascribes call arguments against receiver-substituted parameters
  • Dependencies and packaging:
    • Adds xz-compressed bridge resource and extracts it at runtime to the temp directory
    • Adds commons-compress and xz dependencies with license files
  • Expression typing:
    • Types switch expressions, untyped lambda parameters, and qualified this/super bindings
    • Emits generic classpath supertypes and keeps written qualified names of unresolved types
  • Error recovery:
    • Translates the tree recovered after a syntax error instead of failing the file
  • Build and tooling:
    • Adds archive-bridge.sh to regenerate the prebuilt bridge archive for the build host
    • Adds a Cargo crate pinned to a SemSitter revision with tests and a JSONL/CLI server

This will update automatically on new commits.

Main sources still compile against empty trees and symbols. Tests are expected to fail until a semsitter parser fills them in.
Run one SemSitter scan (with the classpath) and its semantic dump over the
batch, then parse each file with tree-sitter-java and attach symbols,
resolved occurrences, graph call targets and graph facts by byte span.
…uery it

Rust: a serve mode answering analyze, cst, parse and quit requests, and cst
and parse commands printing the CST of files. Java: SemsitterBridge client.
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

SONARJAVA-7236

@datadog-sonarsource

datadog-sonarsource Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Pipelines

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 8 Pipeline jobs failed

Build | Build and Unit Test on Windows — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

Build | Plugin QA (LATEST_RELEASE, false) — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

Build | Ruling QA (warp-custom-ubuntu-24-04, only-sonarqube-project, LATEST_RELEASE) — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

View all 8 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 40f655e | Docs | View more details | Give us feedback!

@rombirli

Copy link
Copy Markdown
Contributor Author

/pvf

@github-actions

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6417

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Ruling Diff Summary

Detected changes in 143 rule files: 5813 issues removed, 6054 issues added.

S104 (java) on eclipse-jetty - 22 issues removed, 22 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (file-level)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (line 1)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java (file-level)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java (line 1)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java (file-level)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java (line 1)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (file-level)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 1)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java (file-level)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java)
S109 (java) on eclipse-jetty - 0 issues removed, 17 issues added

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (line 108)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (line 109)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (line 150)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java (line 91)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/Request.java (line 1283)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/Request.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java (line 113)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/DateCache.java (line 108)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/DateCache.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/MemoryUtils.java (line 33)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/MemoryUtils.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/Utf8Appendable.java (line 251)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/Utf8Appendable.java)
S112 (java) on eclipse-jetty - 2 issues removed, 52 issues added

Removed jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 359)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 139)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 187)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 328)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java (line 920)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java (line 978)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java (line 1014)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java (line 237)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java (line 335)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java (line 400)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java (line 771)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java (line 73)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/FileSessionDataStore.java (line 357)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/FileSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java (line 104)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java (line 143)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/HouseKeeper.java)
S1130 (java) on eclipse-jetty - 10 issues removed, 852 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java (line 197)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java (line 89)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java (line 102)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java (line 126)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java)

Removed jetty-http/src/test/java/org/eclipse/jetty/http/HttpCookieTest.java (line 114)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpCookieTest.java)

Removed jetty-http/src/test/java/org/eclipse/jetty/http/HttpURITest.java (line 33)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpURITest.java)

Removed jetty-http/src/test/java/org/eclipse/jetty/http/HttpURITest.java (line 247)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpURITest.java)

Removed jetty-http/src/test/java/org/eclipse/jetty/http/HttpURITest.java (line 267)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpURITest.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java (line 296)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/IncludeExcludeConnectionStatistics.java (line 33)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/IncludeExcludeConnectionStatistics.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/IncludeExcludeConnectionStatistics.java (line 43)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/IncludeExcludeConnectionStatistics.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/IncludeExcludeConnectionStatistics.java (line 53)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/IncludeExcludeConnectionStatistics.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (line 149)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (line 154)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (line 183)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)
S1144 (java) on eclipse-jetty - 1 issues removed, 24 issues added

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpStatus.java (line 179)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpStatus.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java (line 304)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (line 309)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java (line 279)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java (line 284)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java (line 289)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java (line 433)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 991)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 1007)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 1024)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelListeners.java (line 260)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelListeners.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelListeners.java (line 273)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelListeners.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java (line 852)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java (line 65)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java (line 286)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java)
S1161 (java) on eclipse-jetty - 0 issues removed, 3 issues added

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 1284)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java (line 609)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java (line 184)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/AbstractEndPoint.java)
S1162 (java) on eclipse-jetty - 1 issues removed, 0 issues added

Removed jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerCollection.java (line 150)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/HandlerCollection.java)
S117 (java) on eclipse-jetty - 0 issues removed, 29 issues added

Added jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java (line 372)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/GZIPContentDecoderTest.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java (line 150)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/Dispatcher.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java (line 226)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java (line 227)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java (line 647)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java (line 788)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java (line 789)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java (line 1344)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java (line 56)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java (line 81)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/IdleTimeoutHandler.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java (line 58)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java (line 59)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java (line 60)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java (line 1578)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java (line 597)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java)
S1172 (java) on eclipse-jetty - 3 issues removed, 0 issues added

Removed jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java (line 112)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java)

Removed jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java (line 93)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java)

Removed jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java (line 334)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLSelectChannelConnectorLoadTest.java)
S1181 (java) on eclipse-jetty - 17 issues removed, 4 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java (line 1594)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/PreEncodedHttpField.java (line 55)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/PreEncodedHttpField.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java (line 221)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java (line 249)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java (line 335)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/NegotiatingClientConnection.java (line 76)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/NegotiatingClientConnection.java)

Removed jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java (line 168)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/AsyncRequestLogWriter.java (line 86)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/AsyncRequestLogWriter.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java (line 346)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/CustomRequestLog.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/ForwardedRequestCustomizer.java (line 394)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/ForwardedRequestCustomizer.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 414)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 516)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java (line 878)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java (line 596)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java (line 627)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java)
S1185 (java) on eclipse-jetty - 6 issues removed, 0 issues added

Removed jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java (line 508)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/AcceptRateLimit.java (line 269)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/AcceptRateLimit.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java (line 85)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java (line 91)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/HotSwapHandler.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java (line 142)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java (line 148)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java)
S1226 (java) on eclipse-jetty - 0 issues removed, 194 issues added - new ruling file

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpCookie.java (line 519)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpCookie.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpField.java (line 156)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpField.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java (line 562)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java (line 802)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java (line 806)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java (line 812)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java (line 185)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java (line 187)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java (line 189)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java (line 94)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java (line 96)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java (line 98)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ArrayByteBufferPool.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java (line 225)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java (line 97)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java (line 277)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java)
S125 (java) on eclipse-jetty - 0 issues removed, 4 issues added

Added jetty-server/src/test/java/org/eclipse/jetty/server/AsyncRequestReadTest.java (line 136)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/AsyncRequestReadTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/ShutdownMonitorTest.java (line 219)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ShutdownMonitorTest.java)
S131 (java) on eclipse-jetty - 0 issues removed, 1 issues added

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java (line 149)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java)
S1451 (java) on eclipse-jetty - 438 issues removed, 438 issues added

Removed jetty-http/src/main/java/module-info.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/module-info.java)

Added jetty-http/src/main/java/module-info.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/module-info.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/BadMessageException.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/BadMessageException.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/BadMessageException.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/BadMessageException.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/ComplianceViolation.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/ComplianceViolation.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/ComplianceViolation.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/ComplianceViolation.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CompressedContentFormat.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/CookieCompliance.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCompliance.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/CookieCompliance.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCompliance.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java)
S1604 (java) on eclipse-jetty - 1 issues removed, 0 issues added

Removed jetty-util/src/main/java/org/eclipse/jetty/util/MemoryUtils.java (line 37)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/MemoryUtils.java)
S1612 (java) on eclipse-jetty - 1 issues removed, 0 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java (line 213)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java)
S1643 (java) on eclipse-jetty - 0 issues removed, 3 issues added

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java (line 176)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java (line 181)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java (line 186)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java)
S1698 (java) on eclipse-jetty - 0 issues removed, 12 issues added

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 115)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 135)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 165)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java (line 131)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/PathMappings.java)
S1699 (java) on eclipse-jetty - 0 issues removed, 1 issues added

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java (line 159)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java)
S1939 (java) on eclipse-jetty - 4 issues removed, 0 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 514)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/QuotedQualityCSV.java (line 41)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/QuotedQualityCSV.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessSet.java (line 33)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/InetAccessSet.java)

Removed jetty-util/src/main/java/org/eclipse/jetty/util/InetAddressSet.java (line 39)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/InetAddressSet.java)
S1948 (java) on eclipse-jetty - 0 issues removed, 1 issues added

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionData.java (line 58)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionData.java)
S2109 (java) on eclipse-jetty - 0 issues removed, 1 issues added - new ruling file

Added jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MetaData.java (line 240)

(source file not found at this revision: jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MetaData.java)
S2142 (java) on eclipse-jetty - 6 issues removed, 0 issues added

Removed jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java (line 674)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java (line 735)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 279)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 305)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/Server.java (line 493)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/Server.java)

Removed jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java (line 281)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java)
S2143 (java) on eclipse-jetty - 6 issues removed, 6 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateGenerator.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java (line 1)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/DateParser.java)

Removed jetty-util-ajax/src/main/java/org/eclipse/jetty/util/ajax/JSONDateConvertor.java (file-level)

(source file not found at this revision: jetty-util-ajax/src/main/java/org/eclipse/jetty/util/ajax/JSONDateConvertor.java)

Added jetty-util-ajax/src/main/java/org/eclipse/jetty/util/ajax/JSONDateConvertor.java (line 1)

(source file not found at this revision: jetty-util-ajax/src/main/java/org/eclipse/jetty/util/ajax/JSONDateConvertor.java)

Removed jetty-util/src/main/java/org/eclipse/jetty/util/DateCache.java (file-level)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/DateCache.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/DateCache.java (line 1)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/DateCache.java)

Removed jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java (file-level)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java (line 1)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/RolloverFileOutputStream.java)

Removed jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java (file-level)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java (line 1)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java)
S2160 (java) on eclipse-jetty - 0 issues removed, 3 issues added

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/RegexPathSpec.java (line 24)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/RegexPathSpec.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java (line 26)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/ServletPathSpec.java)

Added jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/UriTemplatePathSpec.java (line 41)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/pathmap/UriTemplatePathSpec.java)
S2175 (java) on eclipse-jetty - 0 issues removed, 2 issues added - new ruling file

Added jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java (line 105)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java (line 157)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java)
S2184 (java) on eclipse-jetty - 0 issues removed, 2 issues added

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java (line 1166)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java (line 866)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java)
S2185 (java) on eclipse-jetty - 0 issues removed, 1 issues added - new ruling file

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java (line 1166)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionHandler.java)
S2187 (java) on eclipse-jetty - 0 issues removed, 30 issues added - new ruling file

Added jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterLenientTest.java (line 37)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterLenientTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java (line 38)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorServerHTTPTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/HttpURIParseTest.java (line 35)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/HttpURIParseTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/pathmap/ServletPathSpecMatchListTest.java (line 36)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/pathmap/ServletPathSpecMatchListTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/pathmap/ServletPathSpecOrderTest.java (line 35)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/pathmap/ServletPathSpecOrderTest.java)

Added jetty-http/src/test/java/org/eclipse/jetty/http/pathmap/UriTemplatePathSpecBadSpecsTest.java (line 32)

(source file not found at this revision: jetty-http/src/test/java/org/eclipse/jetty/http/pathmap/UriTemplatePathSpecBadSpecsTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/AsyncCompletionTest.java (line 71)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/AsyncCompletionTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/DelayedServerTest.java (line 33)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/DelayedServerTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java (line 51)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToAsyncCommitTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToCommitTest.java (line 45)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/HttpManyWaysToCommitTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartCaptureTest.java (line 59)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/MultiPartCaptureTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/ProxyConnectionTest.java (line 40)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ProxyConnectionTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorAsyncContextTest.java (line 26)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorAsyncContextTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorCloseTest.java (line 24)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorCloseTest.java)

Added jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorHttpServerTest.java (line 26)

(source file not found at this revision: jetty-server/src/test/java/org/eclipse/jetty/server/ServerConnectorHttpServerTest.java)
S2209 (java) on eclipse-jetty - 0 issues removed, 2 issues added - new ruling file

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java (line 901)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/security/Credential.java (line 81)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/security/Credential.java)
S2221 (java) on eclipse-jetty - 4 issues removed, 31 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java (line 208)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/CookieCutter.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java (line 252)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelListeners.java (line 124)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelListeners.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java (line 305)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/LocalConnector.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java (line 211)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java (line 362)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java (line 739)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java (line 842)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionCache.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java (line 184)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java (line 228)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java (line 250)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/AbstractSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java (line 96)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java (line 169)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/CachingSessionDataStore.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java (line 306)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/session/FileSessionDataStore.java (line 232)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/FileSessionDataStore.java)
S2293 (java) on eclipse-jetty - 1 issues removed, 0 issues added

Removed jetty-util/src/main/java/org/eclipse/jetty/util/thread/Sweeper.java (line 92)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/thread/Sweeper.java)
S2325 (java) on eclipse-jetty - 6 issues removed, 0 issues added

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java (line 1301)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java)

Removed jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java (line 1064)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java (line 351)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHttpOutputInterceptor.java (line 234)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHttpOutputInterceptor.java)

Removed jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionContext.java (line 111)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/session/SessionContext.java)

Removed jetty-slf4j-impl/src/main/java/org/eclipse/jetty/logging/StdErrAppender.java (line 188)

(source file not found at this revision: jetty-slf4j-impl/src/main/java/org/eclipse/jetty/logging/StdErrAppender.java)
S2387 (java) on eclipse-jetty - 0 issues removed, 8 issues added - new ruling file

Added jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java (line 47)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/NetworkTrafficSocketChannelEndPoint.java (line 35)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/NetworkTrafficSocketChannelEndPoint.java)

Added jetty-io/src/main/java/org/eclipse/jetty/io/SocketChannelEndPoint.java (line 44)

(source file not found at this revision: jetty-io/src/main/java/org/eclipse/jetty/io/SocketChannelEndPoint.java)

Added jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelOverHttp.java (line 51)

(source file not found at this revision: jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelOverHttp.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/component/StopLifeCycle.java (line 29)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/component/StopLifeCycle.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/resource/JarFileResource.java (line 39)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/resource/JarFileResource.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java (line 48)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/thread/ReservedThreadExecutor.java)

Added jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/EatWhatYouKill.java (line 60)

(source file not found at this revision: jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/EatWhatYouKill.java)

... and 108 more rules with changes (diff too large to display fully)

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

📊 Performance Validation complete
🆕 99274 new · 🗑️ 3511495 lost issues
View dashboard

@rombirli

Copy link
Copy Markdown
Contributor Author

/pvf

Comment on lines +44 to +57
String bridgeName = bridgeName(platform);
Path bridgePath = targetDir.resolve(bridgeName);
if (!Files.exists(bridgePath)) {
String archiveName = archiveName(platform);
String resourcePath = "/bridge/" + archiveName;
try (InputStream stream = BridgeExtractor.class.getResourceAsStream(resourcePath)) {
if (stream == null) {
throw new IllegalStateException("Bridge resource not found");
}
extractArchive(targetDir, bridgePath, stream, resourcePath, bridgeName);
}
}
return bridgePath;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Security: Bridge runs from a predictable shared tmp path and is trusted if present

JParser.bridgePath() always uses ${java.io.tmpdir}/sonar-java/semsitter-bridge/bridge, and BridgeExtractor.extract skips extraction and returns that path whenever any file already exists there (if (!Files.exists(bridgePath))). On Linux/macOS, java.io.tmpdir is usually the world-writable /tmp. Another local user can create /tmp/sonar-java/semsitter-bridge/bridge first, and then every analysis by any other user executes that binary under the victim's account (CWE-377/CWE-427). The extractor never checks who owns the file, never verifies its hash against the embedded archive, and the directory is not private.

Fix: extract into a per-user, private, versioned directory (for example under the scanner working dir or user.home, created with 0700). Alternatively, verify a checksum of the existing file against the packaged resource before running it.

Was this helpful? React with 👍 / 👎

}
String bridgeName = bridgeName(platform);
Path bridgePath = targetDir.resolve(bridgeName);
if (!Files.exists(bridgePath)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Bug: Concurrent extraction shares one staging file; chmod runs after publish

Every JVM writes to the same staging file bridge.ext with REPLACE_EXISTING, so two concurrent analyses can interleave. For example, JVM A moves the file that JVM B is still writing into bridge, then runs a truncated binary. ATOMIC_MOVE onto an existing target also fails on Windows. Separately, Files.copy creates the file without the execute bit, and permissions are only set after the atomic move. In that window another process sees bridge exists and gets Permission denied when it runs it. If the JVM dies between the move and setPermissions, the non-executable file stays there forever, because extract never re-extracts an existing path.

Fix: use a unique temp file per process (Files.createTempFile(target, ...)), set its permissions before the move, and treat an already-existing target after the move as success.

Was this helpful? React with 👍 / 👎

Comment on lines +178 to +188
final Result parseFile(InputFile inputFile) {
PerformanceMeasure.Duration parseDuration = PerformanceMeasure.start("JParser");
try {
if (bridge == null) {
return new Result(JParser.parse(javaVersion.effectiveJavaVersionAsString(), inputFile.filename(), inputFile.contents()));
}
action.accept(inputFile, result);
JsonObject document = bridge.cst(inputFile.path().toAbsolutePath().toString());
JSema sema = new JSema();
sema.ingestDocument(document);
sema.ingestTypes(bridge.types(sema.referencedTypeNames()));
return new Result(SemsitterTranslator.translate(sema, document));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Bug: Batch parsing reads files from disk and ignores InputFile contents/charset

The old JParserConfig passed inputFile.contents() and inputFile.charset() to the parser. Now parseFile sends only the path (bridge.cst(path)), and the bridge reads the bytes from disk itself (std::fs::read / String::from_utf8_lossy). As a result, sonar.sourceEncoding is ignored: an ISO-8859-1 or windows-1252 source gets U+FFFD in literal and comment token text, and its UTF-16 columns no longer match what the scanner reports. In SonarLint, where InputFile.contents() is the unsaved editor buffer, the analysis runs on stale on-disk content, so issues land on the wrong lines.

Fix: send the decoded contents with the request (or at least the charset), and have the bridge use them.

Was this helpful? React with 👍 / 👎

Comment thread semsitter-bridge/src/lib.rs Resolved
firstTokenAfter(e.getExpression(), TerminalToken.TokenNameDOT),
i
);
public static JavaTree.CompilationUnitTreeImpl parse(String version, String unitName, String source) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Cross-Repo: sonar-java-symbolic-execution test utils no longer compile against JParser

Fix here and in SonarSource/sonar-java-symbolic-execution

Breaks in: SonarSource/sonar-java-symbolic-execution - java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java - JParserTestUtils.parse

This PR removes the ECJ-based JParser.parse(ASTParser, String, String, String) and JParserConfig#astParser(). JParser.parse now takes (version, unitName, source) and starts a SemSitter bridge itself. In SonarSource/sonar-java-symbolic-execution, java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java (JParserTestUtils.parse) builds an ASTParser via JParserConfig...astParser() and passes it to the old overload. As soon as that repo builds against this java-frontend, it stops compiling, and with it every symbolic-execution test that uses the helper. The removal is deliberate (the PR drops ECJ), so the consumer has to move. The tests will also need a runnable bridge, either the packaged one or SEMSITTER_BRIDGE.

Here: Optionally keep a deprecated shim with the old arity (minus the ASTParser) so callers have a migration path, and record the API removal in the changelog/release notes so the symbolic-execution repo can be updated in step.

There: In JParserTestUtils.parse, drop the ASTParser/JParserConfig.astParser() construction and call the new three-argument JParser.parse; make sure the test environment can find the bridge (packaged resource or SEMSITTER_BRIDGE).

In SonarSource/sonar-java-symbolic-execution - java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java:

public static CompilationUnitTree parse(String unitName, String source, List<File> classpath) {
  return JParser.parse(JParserConfig.MAXIMUM_SUPPORTED_JAVA_VERSION.effectiveJavaVersionAsString(), unitName, source);
}

Was this helpful? React with 👍 / 👎


private static void ascribe(Tree tree, Type type) {
if (tree instanceof AbstractTypedTree typed && type != null) {
typed.type = type;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Cross-PR: Translator's direct field assignments break against #6416's Supplier fields

Breaks when this PR and #6416 both merge into master, in either order. The translator then fails to compile against #6416's tree fields.

How

  1. SemsitterTranslator.java:1657 assigns typed.type = type. Lines 1291, 1417, 1419, 1421, 948, 1153 and 1414 assign typeSymbol, methodSymbol, variableSymbol and symbol directly as eager values.
  2. #6416 changes AbstractTypedTree.java:26 so type is Supplier<Type>. It also makes VariableTreeImpl.variableSymbol, ClassTreeImpl.typeSymbol and MethodTreeImpl.methodSymbol Suppliers, and IdentifierTreeImpl/ImportTreeImpl now use symbolSupplier.
  3. A Type or Symbol value cannot be assigned to a Supplier<...> field, so SemsitterTranslator stops compiling. #6416's SemanticValues also drops the null-field fallback that this PR's symbolType()/symbol() rely on.

Fix

  • This PR: If #6416 lands first, rebase the translator onto its Supplier fields (e.g. typed.type = () -> type), or route the assignments through setters so the field shape does not matter.
  • #6416: Agree on one tree-binding shape with this PR. Either keep eager fields or provide setters, so the SemSitter translator does not have to know the storage type.

Compared b0aba6f with #6416 at 12688a4

Was this helpful? React with 👍 / 👎

private final Map<String, JType> rawTypes = new HashMap<>();
final Map<String, Tree> declarations = new HashMap<>();
final Map<String, List<IdentifierTree>> usages = new HashMap<>();
private final Set<JProblem> undefinedTypes = new HashSet<>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Cross-PR: Undefined types from SemSitter vanish if scanner reads ast.undefinedTypes() · #6416

Breaks when both PRs merge and JavaAstScanner uses #6416's ast.undefinedTypes() while the semantic model is this PR's JSema.

How

  1. JSema.java:232 records missing types in JSema.undefinedTypes, and the current JavaAstScanner.java:169 reads ast.sema.undefinedTypes().
  2. #6416 changes the scanner to read ast.undefinedTypes() from CompilationUnitTreeImpl (JavaTree.java). On its side, JParser fills that set from ECJ errors.
  3. Neither SemsitterTranslator.translate nor JParserConfig.parseFile copies the JSema set onto the tree, so the scanner always gets an empty set. Undefined-type logging and telemetry silently drop to zero.

Fix

  • This PR: In SemsitterTranslator.translate (or after ingestTypes in parseFile), copy sema.undefinedTypes() onto the compilation unit if it adopts #6416's field.
  • #6416: Nothing needed beyond keeping CompilationUnitTreeImpl.undefinedTypes writable by other frontends.

Compared b0aba6f with #6416 at 12688a4

Was this helpful? React with 👍 / 👎

@github-actions

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6417

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

📊 Performance Validation complete
🆕 4 new · 🗑️ 3598443 lost issues
View dashboard

A new expression whose type reference is not a constructor used to leave a class or enum-field symbol on the identifier, and rules that cast it aborted the analysis.
…range

Leaf primitive types and braces nested under a block were turned into tokens at the wrong place, so highlighting and issue ranges fell outside the line.
scoped_type_identifier was not a type kind, so a generic type like Map.Entry<K, V> reached type() with a null child and the translator threw.
Top-level methods were emitted as compilation-unit members, so visitors that look up the enclosing class crashed on Java 25 compact files.
The scanner drops issues whose location has no text range, which discarded every file-level finding such as S105.
@rombirli

rombirli commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/pvf

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6417

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

📊 Performance Validation complete
🆕 62085 new · 🗑️ 353045 lost issues
View dashboard

Projects with unexpected PVF results:

  • crate
  • guava
  • guava_java9
  • initializr
  • netflix-conductor
  • org.activiti-activiti-root
  • org.apache.wicket-wicket-parent

@rombirli rombirli changed the title SONARJAVA-7236 PoC: replace the ECJ parser with semsitter V2 SONARJAVA-7236 PoC: replace the ECJ parser with semsitter Nov 2, 2026
Methods declared in a local or anonymous class were owned by a field symbol, so
owner() could not be cast to a TypeSymbol and enclosingClass() returned null.
This crashed S2061 on guava and S5961 on wicket, which aborts the whole
analysis under fail-fast.
Only a parameter that was itself a type variable was substituted, so a parameter
such as ContextConsumer<A> stayed raw and left a lambda with no type arguments.
This crashed S2699 on activiti, initializr and netflix-conductor. The receiver is
now also matched against the declaring type through its supertypes, so a method
inherited from a generic base class resolves its arguments.
…d parameters

Arguments were typed from the declared parameters, so a lambda passed to a generic
method kept a raw target type when the receiver supplied the type arguments.
Picks up the generic parameter types emitted for classpath members.
@rombirli

rombirli commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/pvf

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6417

…error

A syntax error used to discard the file and fail the analysis. The recovered
tree is now checked, and a parse error is reported only when nothing is left
to analyze, so the other files keep going.
@rombirli

rombirli commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/pvf

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6417

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

📊 Performance Validation complete
🆕 66421 new · 🗑️ 171137 lost issues
View dashboard

Projects with unexpected PVF results:

  • crate
  • org.activiti-activiti-root

A public class loaded from a jar had no modifiers, so isPublic() was false. S3242 then sorted an empty inheritance chain and aborted activiti.
@gitar-bot

gitar-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
CI failed: Two PR-related failures: the Custom Rules and License Check job failed because the license plugin rejects org.tukaani:xz:1.10 (0BSD license), and the SonarQube 6.5 ruling test reported 3,475 issue differences versus expected results after the ECJ-to-semsitter parser swap. JaCoCo instrumentation warnings were non-fatal.

Overview

Two distinct failure patterns across 2 unique error templates (16 logs analyzed of 123 total; other templates not included in these findings). Both failures are linked to this PR's changes, and the analysis points to a dependency/license policy issue and a ruling-regression that needs investigation.

Failures

License check rejects XZ for Java dependency (confidence: high)

  • Type: dependency
  • Affected jobs: 125426111916 (Custom Rules and License Check)
  • Related to change: yes
  • Root cause: license-maven-plugin:aggregate-add-third-party found org.tukaani:xz:1.10 under the 0BSD license, which is not in the included-license whitelist, and failed the build with "There are some forbidden licenses used". The PR adds 0BSD and XZ license files and changes the plugin POM, linking the failure to this change. JaCoCo "Unsupported class file major version 70" messages were non-fatal and did not cause the failure.
  • Suggested fix: Check the 0BSD status in the license policy. If approved, register 0BSD in the license-check configuration; otherwise remove or replace org.tukaani:xz:1.10 with an approved alternative. Keep the third-party license notices.

SonarQube 6.5 ruling differences (confidence: high)

  • Type: test
  • Affected jobs: 125426111745 (Test Analyze)
  • Related to change: yes
  • Root cause: JavaRulingTest.sonarqube_server failed at JavaRulingTest.java:569 in assertNoDifferences with 3,475 issue differences against its/ruling/src/test/resources/expected/sonarqube-6.5. The analysis itself completed. The logged AI CodeFix token URL warning is unrelated to the test failure. The PR replaces the ECJ parser with semsitter (JParser rewrite, SemsitterTranslator), which directly affects the rulings. The log does not show which differences are defects and which are intended.
  • Suggested fix: Download the uploaded actual_warp-custom-windows-2022-m_only-sonarqube-project ruling artifact and diff it against the expected SonarQube 6.5 results. Fix semsitter translation or semantic discrepancies. Update expected ruling files only for verified intentional changes. Note that PR Update ruling results for PR #6415 #6417 already updates ruling expectations for commons-beanutils and eclipse-jetty, but not sonarqube-6.5, so check whether it covers these differences.

Summary

  • Change-related failures: 2 (license policy rejection of xz 0BSD dependency; 3,475 ruling differences from the parser replacement)
  • Infrastructure/flaky failures: 0
  • Recommended action: Resolve the 0BSD license policy entry or swap the dependency, then triage the 3,475 ruling differences in the actual artifact, fixing semsitter regressions and updating expectations only for verified intentional changes.
Code Review ⚠️ Changes requested 2 closed / 13 findings

🔴 High risk · Replacing ECJ with SemSitter across Java parsing and semantic attribution could misread syntax or symbols, changing rule findings throughout project analysis.

Replaces the ECJ parser with a SemSitter-backed bridge and translation layer, dropping the jdt-package dependency and wiring JParser/JParserConfig to the new bridge. Changes are requested because of several open issues: the bridge is extracted to a predictable shared tmp path and trusted if present, concurrent extraction can corrupt or leave a non-executable binary, and batch parsing ignores InputFile contents and charset. Other open findings include removed JParser.parse overload breaking sonar-java-symbolic-execution test utils, enum constructor usages no longer recorded (S1144 false positives), array-last-param heuristic marking non-varargs library methods as varargs (ArrayForVarArgCheck false positives), an implicit-class fallback that can add a spurious undefined-type problem, and merge conflicts with #6416 around Supplier fields, directSuperTypes, undefined types, and JDT-dependent helpers.

Resolved in this session: top-level methods and fields are now wrapped in an implicit class, and column computation no longer scales quadratically on long lines.

⚠️ Security: Bridge runs from a predictable shared tmp path and is trusted if present

📄 java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:44-57 📄 java-frontend/src/main/java/org/sonar/java/model/JParser.java:60-62 🔗 CWE-377 📄 java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:45-56 📄 java-frontend/src/main/java/org/sonar/java/model/JParser.java:61

JParser.bridgePath() always uses ${java.io.tmpdir}/sonar-java/semsitter-bridge/bridge, and BridgeExtractor.extract skips extraction and returns that path whenever any file already exists there (if (!Files.exists(bridgePath))). On Linux/macOS, java.io.tmpdir is usually the system temp directory, which is world-writable. Another local user can create ${java.io.tmpdir}/sonar-java/semsitter-bridge/bridge first, and then every analysis by any other user executes that binary under the victim's account (CWE-377/CWE-427). The extractor never checks who owns the file, never verifies its hash against the embedded archive, and the directory is not private.

Fix: extract into a per-user, private, versioned directory (for example under the scanner working dir or user.home, created with 0700). Alternatively, verify a checksum of the existing file against the packaged resource before running it.

⚠️ Bug: Concurrent extraction shares one staging file; chmod runs after publish

📄 java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:46 📄 java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:72-86

Every JVM writes to the same staging file bridge.ext with REPLACE_EXISTING, so two concurrent analyses can interleave. For example, JVM A moves the file that JVM B is still writing into bridge, then runs a truncated binary. ATOMIC_MOVE onto an existing target also fails on Windows. Separately, Files.copy creates the file without the execute bit, and permissions are only set after the atomic move. In that window another process sees bridge exists and gets Permission denied when it runs it. If the JVM dies between the move and setPermissions, the non-executable file stays there forever, because extract never re-extracts an existing path.

Fix: use a unique temp file per process (Files.createTempFile(target, ...)), set its permissions before the move, and treat an already-existing target after the move as success.

⚠️ Bug: Batch parsing reads files from disk and ignores InputFile contents/charset

📄 java-frontend/src/main/java/org/sonar/java/model/JParserConfig.java:178-188 📄 java-frontend/src/main/java/org/sonar/java/model/JParserConfig.java:196-205 📄 semsitter-bridge/src/lib.rs:76-82 📄 semsitter-bridge/src/lib.rs:187-189

The old JParserConfig passed inputFile.contents() and inputFile.charset() to the parser. Now parseFile sends only the path (bridge.cst(path)), and the bridge reads the bytes from disk itself (std::fs::read / String::from_utf8_lossy). As a result, sonar.sourceEncoding is ignored: an ISO-8859-1 or windows-1252 source gets U+FFFD in literal and comment token text, and its UTF-16 columns no longer match what the scanner reports. In SonarLint, where InputFile.contents() is the unsaved editor buffer, the analysis runs on stale on-disk content, so issues land on the wrong lines.

Fix: send the decoded contents with the request (or at least the charset), and have the bridge use them.

⚠️ Cross-Repo: sonar-java-symbolic-execution test utils no longer compile against JParser

📄 java-frontend/src/main/java/org/sonar/java/model/JParser.java:36

Fix here and in SonarSource/sonar-java-symbolic-execution

Breaks in: SonarSource/sonar-java-symbolic-execution - java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java - JParserTestUtils.parse

This PR removes the ECJ-based JParser.parse(ASTParser, String, String, String) and JParserConfig#astParser(). JParser.parse now takes (version, unitName, source) and starts a SemSitter bridge itself. In SonarSource/sonar-java-symbolic-execution, java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java (JParserTestUtils.parse) builds an ASTParser via JParserConfig...astParser() and passes it to the old overload. As soon as that repo builds against this java-frontend, it stops compiling, and with it every symbolic-execution test that uses the helper. The removal is deliberate (the PR drops ECJ), so the consumer has to move. The tests will also need a runnable bridge, either the packaged one or SEMSITTER_BRIDGE.

Here: Optionally keep a deprecated shim with the old arity (minus the ASTParser) so callers have a migration path, and record the API removal in the changelog/release notes so the symbolic-execution repo can be updated in step.

There: In JParserTestUtils.parse, drop the ASTParser/JParserConfig.astParser() construction and call the new three-argument JParser.parse; make sure the test environment can find the bridge (packaged resource or SEMSITTER_BRIDGE).

In SonarSource/sonar-java-symbolic-execution - java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java:

public static CompilationUnitTree parse(String unitName, String source, List<File> classpath) {
  return JParser.parse(JParserConfig.MAXIMUM_SUPPORTED_JAVA_VERSION.effectiveJavaVersionAsString(), unitName, source);
}
⚠️ Cross-PR: Translator's direct field assignments break against #6416's Supplier fields

📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1657 📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1291 📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1414-1421 📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:948-949 📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1153

Breaks when this PR and #6416 both merge into master, in either order. The translator then fails to compile against #6416's tree fields.

How

  1. SemsitterTranslator.java:1657 assigns typed.type = type. Lines 1291, 1417, 1419, 1421, 948, 1153 and 1414 assign typeSymbol, methodSymbol, variableSymbol and symbol directly as eager values.
  2. #6416 changes AbstractTypedTree.java:26 so type is Supplier<Type>. It also makes VariableTreeImpl.variableSymbol, ClassTreeImpl.typeSymbol and MethodTreeImpl.methodSymbol Suppliers, and IdentifierTreeImpl/ImportTreeImpl now use symbolSupplier.
  3. A Type or Symbol value cannot be assigned to a Supplier<...> field, so SemsitterTranslator stops compiling. #6416's SemanticValues also drops the null-field fallback that this PR's symbolType()/symbol() rely on.

Fix

  • This PR: If #6416 lands first, rebase the translator onto its Supplier fields (e.g. typed.type = () -> type), or route the assignments through setters so the field shape does not matter.
  • #6416: Agree on one tree-binding shape with this PR. Either keep eager fields or provide setters, so the SemSitter translator does not have to know the storage type.

Compared b0aba6f with #6416 at 12688a4

⚠️ Bug: Enum constants no longer count as uses of their constructor

📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:318-332 📄 java-frontend/src/main/java/org/sonar/java/model/expression/NewClassTreeImpl.java:166-172

This commit removes the sema.use(constructor, name) call from enumConstant(). Nothing else records the constructor use: bindDeclaration only sets name.symbol to the enum constant's variable symbol, and JSymbol.usages() reads only sema.usages. So every enum constructor now has an empty usages() list. For example, in enum Color { RED(1); private Color(int v) {} }, UnusedPrivateMethodCheck.isUnusedPrivate returns true and isConstructorWithParameters is true, so S1144 will wrongly report the constructor as unused. NewClassTree.methodSymbol() on the enum constant's NewClassTreeImpl now also always returns UNKNOWN_METHOD. ECJ bound this identifier to the constructor binding (old JParser: identifier.binding = excludeRecovery(e.resolveConstructorBinding(), ...); usage(identifier.binding, identifier)). The fix is to keep recording the constructor use (sema.use(constructor, name)) even though the identifier keeps the variable symbol, or to give the enum constant's NewClassTreeImpl its own constructor identifier bound to the resolved MethodSymbol.

Keep recording the enum constant as a use of its constructor.
Node nameNode = nameNode(node);
String constructor = nameNode == null ? null : nameNode.valueTarget();
if (constructor != null) {
  sema.use(constructor, name);
}
EnumConstantTreeImpl tree = new EnumConstantTreeImpl(modifiers(node), name, new NewClassTreeImpl(name, args, classBody), separator);
bindDeclaration(tree, nameNode, name);
⚠️ Bug: Array-last-param heuristic marks non-varargs methods as varargs

📄 java-frontend/src/main/java/org/sonar/java/model/JMethodSymbol.java:244-258 📄 java-frontend/src/main/java/org/sonar/java/model/JSema.java:536-545

isVarArgsMethod() now returns true for any symbol with no source declaration whose last parameter type is an array (JMethodSymbol.java:259). It does this even when the bridge sent "varargs": false, which classpath_type always sends (semsitter-bridge/src/types.rs:160). So library methods like Arrays.sort(int[]) or String.valueOf(char[]) are reported as varargs. Checks that rely on this flag then give wrong results: ArrayForVarArgCheck would flag Arrays.sort(new int[]{3,1}) with "Remove this array creation and simply pass the elements", which is a false positive and its fix would not compile, and ConfusingVarargCheck and ThreadAsRunnableArgumentCheck are affected too. The new varargs fallback in JSema.matches (JSema.java:544-545) has the same problem: it matches any member whose last parameter is an array and ignores the member's varargs flag. The heuristic seems to exist because jdk_type_info emits no varargs key (types.rs:203-212). Fix: emit varargs for JDK members in the bridge and trust the flag. At minimum, use the array heuristic only when the member has no varargs key, never as an override of an explicit false.

In JSema.matches, respect an explicit varargs flag when present (and similarly store 'varargs known' on JMethodSymbol so isVarArgsMethod only falls back to the heuristic when the flag is absent).
boolean lastIsArray = declaredCount > 0 && declaredParams.get(declaredCount - 1).isArray();
boolean varargsMember = member.has("varargs") ? truth(member, "varargs") : lastIsArray;
return allowVarargs && varargsMember && parsed.arity >= declaredCount - 1;
⚠️ Cross-PR: #6416's new Ecj* helpers won't compile once JDT is removed

📄 java-frontend/pom.xml:1

Breaks when this PR and #6416 both merge into the same branch and this PR's removal of jdt-package from java-frontend/pom.xml is kept during conflict resolution.

How

  1. java-frontend/pom.xml no longer declares jdt-package or any org.eclipse dependency, and no main source in java-frontend imports org.eclipse.jdt.
  2. #6416 adds java-frontend/src/main/java/org/sonar/java/model/EcjTreeBindings.java, EcjSemanticAttachment, EcjSymbolMetadata and EcjDiagnosticProvider, which import IBinding, ITypeBinding, IMethodBinding and related JDT types.
  3. These are new files that this PR's edits never touch, so git merges them without conflict. Its hunks in JParser, JSema, JSymbol and JMethodSymbol then reference those helpers.
  4. With no JDT on the classpath, java-frontend fails to compile.

Fix

  • This PR: Coordinate with #6416. Either state that the two PoCs are mutually exclusive, or rebase on #6416 and port its frontend-neutral API (lazy attachments, defaultValue, directSuperTypes) to the SemSitter model.
  • #6416: If it lands first or alongside this PR, keep its ECJ-specific code (the Ecj* files and the hunks that call them) behind a seam that can be deleted, so this PR can drop it along with the JDT dependency.

Compared 36ef140 with #6416 at 12688a4

💡 Cross-PR: Undefined types from SemSitter vanish if scanner reads ast.undefinedTypes() · #6416

📄 java-frontend/src/main/java/org/sonar/java/model/JSema.java:52 📄 java-frontend/src/main/java/org/sonar/java/model/JSema.java:186-187 📄 java-frontend/src/main/java/org/sonar/java/model/JSema.java:232

Breaks when both PRs merge and JavaAstScanner uses #6416's ast.undefinedTypes() while the semantic model is this PR's JSema.

How

  1. JSema.java:232 records missing types in JSema.undefinedTypes, and the current JavaAstScanner.java:169 reads ast.sema.undefinedTypes().
  2. #6416 changes the scanner to read ast.undefinedTypes() from CompilationUnitTreeImpl (JavaTree.java). On its side, JParser fills that set from ECJ errors.
  3. Neither SemsitterTranslator.translate nor JParserConfig.parseFile copies the JSema set onto the tree, so the scanner always gets an empty set. Undefined-type logging and telemetry silently drop to zero.

Fix

  • This PR: In SemsitterTranslator.translate (or after ingestTypes in parseFile), copy sema.undefinedTypes() onto the compilation unit if it adopts #6416's field.
  • #6416: Nothing needed beyond keeping CompilationUnitTreeImpl.undefinedTypes writable by other frontends.

Compared b0aba6f with #6416 at 12688a4

💡 Cross-PR: Merging #6416's JUtils would empty directSuperTypes for SemSitter types

📄 java-frontend/src/main/java/org/sonar/java/model/JUtils.java:143-151

Breaks when both this PR and #6416 merge, and the JUtils conflict is resolved by keeping #6416's delegation to Type.directSuperTypes().

How

  1. In this PR, JUtils.directSuperTypes builds its result from symbol.superClass() and symbol.interfaces() (java-frontend/src/main/java/org/sonar/java/model/JUtils.java:143-151).
  2. #6416 adds Type.directSuperTypes() as a default method that returns an empty set, and only the ECJ-backed JType overrides it. JUtils.directSuperTypes then delegates to that method.
  3. This PR's SemSitter-backed JType does not override the new default, so after such a merge every call returns an empty set. Checks that walk supertypes would change behaviour without any compile error. (defaultValue returns null on both sides, so only directSuperTypes is affected.)

Fix

  • This PR: if #6416 lands first, override directSuperTypes() in the SemSitter JType, using the current superClass/interfaces logic.
  • #6416: move the superClass/interfaces-based logic into the Type.directSuperTypes() default (or JUtils) so it does not depend on the ECJ JType.

Compared d245514 with #6416 at 12688a4

💡 Edge Case: Implicit-class fallback creates an unknown type and logs an undefined type

📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1615-1629 📄 java-frontend/src/main/java/org/sonar/java/model/JSema.java:190-204 📄 java-frontend/src/main/java/org/sonar/java/model/JSema.java:217-231

The fallback in bindImplicitClass runs when no compact method has a known owner. It calls sema.resolve(implicitClassName), and resolve sends a plain name with no # or < to JSema.typeSymbol, which always returns a JTypeSymbol. So the instanceof JTypeSymbol named check always passes. The types are already loaded at this point (JParserConfig calls ingestTypes before translate). If the file's simple name, e.g. Main, is not in typeInfos, typeSymbol marks a new symbol unknown and adds an UNDEFINED_TYPE JProblem. The implicit class then gets bound to that unknown type, its unowned methods get it as owner, and the file reports a type it never references as undefined. The first loop rejects owner.isUnknown(), but the fallback has no such check. Fix: look the name up without creating a symbol, or check !named.isUnknown() before calling resolve, so this lookup cannot add an undefined-type problem.

Only fall back to an already known, resolved type symbol so the lookup never creates one
if (implicitClass == null && !implicitClassName.isEmpty() && sema.referencedTypeNames().contains(implicitClassName)
    && sema.resolve(implicitClassName) instanceof JTypeSymbol named && !named.isUnknown()) {
  implicitClass = named;
}
✅ 2 closed
✅ Bug: Top-level methods/fields never get wrapped in an IMPLICIT_CLASS

📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:171-185 📄 java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:218-222
compilationUnit passes every non-package/import child to addMember(types, child). addMember adds top-level method_declaration and field_declaration nodes, which the pinned tree-sitter-java grammar accepts (compact source files such as void main() {}), straight into types. Because types is then non-empty, the types.isEmpty() fallback that builds the IMPLICIT_CLASS never runs. The compilation unit ends up with MethodTree/VariableTree entries in types(), which breaks the ClassTree contract that checks and visitors rely on. This is a regression from the ECJ frontend, which produced an implicit class.

Fix: in the first loop, add only type declarations to types and collect other members separately, then wrap those members in an IMPLICIT_CLASS whenever any exist.

✅ Performance: Column computation is quadratic on long lines

📄 semsitter-bridge/src/lib.rs:267-268 📄 semsitter-bridge/src/lib.rs:349-353
node_json calls Lines::position twice per CST node. Each call decodes the whole prefix from the start of the line to the offset (from_utf8_lossy plus encode_utf16().count()), so it costs O(line length). On generated or minified sources with very long lines (big array initializers, embedded data), a line of length L with N nodes costs O(N·L), which is effectively quadratic in file size.

Fix: cache per-line UTF-16 offsets, or walk forward incrementally from the previous position on the same line.

🤖 Prompt for agents
Code Review: Replaces the ECJ parser with a SemSitter-backed bridge and translation layer, dropping the `jdt-package` dependency and wiring `JParser`/`JParserConfig` to the new bridge. Changes are requested because of several open issues: the bridge is extracted to a predictable shared tmp path and trusted if present, concurrent extraction can corrupt or leave a non-executable binary, and batch parsing ignores `InputFile` contents and charset. Other open findings include removed `JParser.parse` overload breaking `sonar-java-symbolic-execution` test utils, enum constructor usages no longer recorded (S1144 false positives), array-last-param heuristic marking non-varargs library methods as varargs (`ArrayForVarArgCheck` false positives), an implicit-class fallback that can add a spurious undefined-type problem, and merge conflicts with #6416 around Supplier fields, `directSuperTypes`, undefined types, and JDT-dependent helpers.
  
  Resolved in this session: top-level methods and fields are now wrapped in an implicit class, and column computation no longer scales quadratically on long lines.

1. ⚠️ Security: Bridge runs from a predictable shared tmp path and is trusted if present
   Files: java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:44-57, java-frontend/src/main/java/org/sonar/java/model/JParser.java:60-62, java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:45-56, java-frontend/src/main/java/org/sonar/java/model/JParser.java:61

   `JParser.bridgePath()` always uses `${java.io.tmpdir}/sonar-java/semsitter-bridge/bridge`, and `BridgeExtractor.extract` skips extraction and returns that path whenever any file already exists there (`if (!Files.exists(bridgePath))`). On Linux/macOS, `java.io.tmpdir` is usually the system temp directory, which is world-writable. Another local user can create `${java.io.tmpdir}/sonar-java/semsitter-bridge/bridge` first, and then every analysis by any other user executes that binary under the victim's account (CWE-377/CWE-427). The extractor never checks who owns the file, never verifies its hash against the embedded archive, and the directory is not private.
   
   Fix: extract into a per-user, private, versioned directory (for example under the scanner working dir or `user.home`, created with 0700). Alternatively, verify a checksum of the existing file against the packaged resource before running it.

2. ⚠️ Bug: Concurrent extraction shares one staging file; chmod runs after publish
   Files: java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:46, java-frontend/src/main/java/org/sonar/java/semsitter/BridgeExtractor.java:72-86

   Every JVM writes to the same staging file `bridge.ext` with `REPLACE_EXISTING`, so two concurrent analyses can interleave. For example, JVM A moves the file that JVM B is still writing into `bridge`, then runs a truncated binary. `ATOMIC_MOVE` onto an existing target also fails on Windows. Separately, `Files.copy` creates the file without the execute bit, and permissions are only set after the atomic move. In that window another process sees `bridge` exists and gets `Permission denied` when it runs it. If the JVM dies between the move and `setPermissions`, the non-executable file stays there forever, because `extract` never re-extracts an existing path.
   
   Fix: use a unique temp file per process (`Files.createTempFile(target, ...)`), set its permissions before the move, and treat an already-existing target after the move as success.

3. ⚠️ Bug: Batch parsing reads files from disk and ignores InputFile contents/charset
   Files: java-frontend/src/main/java/org/sonar/java/model/JParserConfig.java:178-188, java-frontend/src/main/java/org/sonar/java/model/JParserConfig.java:196-205, semsitter-bridge/src/lib.rs:76-82, semsitter-bridge/src/lib.rs:187-189

   The old `JParserConfig` passed `inputFile.contents()` and `inputFile.charset()` to the parser. Now `parseFile` sends only the path (`bridge.cst(path)`), and the bridge reads the bytes from disk itself (`std::fs::read` / `String::from_utf8_lossy`). As a result, `sonar.sourceEncoding` is ignored: an ISO-8859-1 or windows-1252 source gets U+FFFD in literal and comment token text, and its UTF-16 columns no longer match what the scanner reports. In SonarLint, where `InputFile.contents()` is the unsaved editor buffer, the analysis runs on stale on-disk content, so issues land on the wrong lines.
   
   Fix: send the decoded contents with the request (or at least the charset), and have the bridge use them.

4. ⚠️ Cross-Repo: sonar-java-symbolic-execution test utils no longer compile against JParser
   Files: java-frontend/src/main/java/org/sonar/java/model/JParser.java:36

   **Fix here and in [`SonarSource/sonar-java-symbolic-execution`](https://github.com/SonarSource/sonar-java-symbolic-execution)**
   
   **Breaks in:** [`SonarSource/sonar-java-symbolic-execution`](https://github.com/SonarSource/sonar-java-symbolic-execution) - [`java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java`](https://github.com/SonarSource/sonar-java-symbolic-execution/blob/HEAD/java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java) - `JParserTestUtils.parse`
   
   This PR removes the ECJ-based `JParser.parse(ASTParser, String, String, String)` and `JParserConfig#astParser()`. `JParser.parse` now takes `(version, unitName, source)` and starts a SemSitter bridge itself. In SonarSource/sonar-java-symbolic-execution, `java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java` (`JParserTestUtils.parse`) builds an `ASTParser` via `JParserConfig...astParser()` and passes it to the old overload. As soon as that repo builds against this java-frontend, it stops compiling, and with it every symbolic-execution test that uses the helper. The removal is deliberate (the PR drops ECJ), so the consumer has to move. The tests will also need a runnable bridge, either the packaged one or `SEMSITTER_BRIDGE`.
   
   **Here:** Optionally keep a deprecated shim with the old arity (minus the ASTParser) so callers have a migration path, and record the API removal in the changelog/release notes so the symbolic-execution repo can be updated in step.
   
   **There:** In JParserTestUtils.parse, drop the ASTParser/JParserConfig.astParser() construction and call the new three-argument JParser.parse; make sure the test environment can find the bridge (packaged resource or SEMSITTER_BRIDGE).
   
   In SonarSource/sonar-java-symbolic-execution - `java-symbolic-execution/java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java`:
   
   ````
   public static CompilationUnitTree parse(String unitName, String source, List<File> classpath) {
     return JParser.parse(JParserConfig.MAXIMUM_SUPPORTED_JAVA_VERSION.effectiveJavaVersionAsString(), unitName, source);
   }
   ````

5. ⚠️ Cross-PR: Translator's direct field assignments break against [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s Supplier fields
   Files: java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1657, java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1291, java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1414-1421, java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:948-949, java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1153

   **Breaks when** this PR and [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) both merge into master, in either order. The translator then fails to compile against [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s tree fields.
   
   **How**
   
   1. `SemsitterTranslator.java:1657` assigns `typed.type = type`. Lines 1291, 1417, 1419, 1421, 948, 1153 and 1414 assign `typeSymbol`, `methodSymbol`, `variableSymbol` and `symbol` directly as eager values.
   2. [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) changes `AbstractTypedTree.java:26` so `type` is `Supplier<Type>`. It also makes `VariableTreeImpl.variableSymbol`, `ClassTreeImpl.typeSymbol` and `MethodTreeImpl.methodSymbol` Suppliers, and `IdentifierTreeImpl`/`ImportTreeImpl` now use `symbolSupplier`.
   3. A `Type` or `Symbol` value cannot be assigned to a `Supplier<...>` field, so `SemsitterTranslator` stops compiling. [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s `SemanticValues` also drops the null-field fallback that this PR's `symbolType()`/`symbol()` rely on.
   
   **Fix**
   
   - **This PR:** If [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) lands first, rebase the translator onto its Supplier fields (e.g. `typed.type = () -> type`), or route the assignments through setters so the field shape does not matter.
   - **[#6416](<https://github.com/SonarSource/sonar-java/pull/6416>):** Agree on one tree-binding shape with this PR. Either keep eager fields or provide setters, so the SemSitter translator does not have to know the storage type.
   
   _Compared `b0aba6f` with [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) at `12688a4`_

6. 💡 Cross-PR: Undefined types from SemSitter vanish if scanner reads ast.undefinedTypes() · [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)
   Files: java-frontend/src/main/java/org/sonar/java/model/JSema.java:52, java-frontend/src/main/java/org/sonar/java/model/JSema.java:186-187, java-frontend/src/main/java/org/sonar/java/model/JSema.java:232

   **Breaks when** both PRs merge and `JavaAstScanner` uses [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s `ast.undefinedTypes()` while the semantic model is this PR's `JSema`.
   
   **How**
   
   1. `JSema.java:232` records missing types in `JSema.undefinedTypes`, and the current `JavaAstScanner.java:169` reads `ast.sema.undefinedTypes()`.
   2. [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) changes the scanner to read `ast.undefinedTypes()` from `CompilationUnitTreeImpl` (`JavaTree.java`). On its side, JParser fills that set from ECJ errors.
   3. Neither `SemsitterTranslator.translate` nor `JParserConfig.parseFile` copies the `JSema` set onto the tree, so the scanner always gets an empty set. Undefined-type logging and telemetry silently drop to zero.
   
   **Fix**
   
   - **This PR:** In `SemsitterTranslator.translate` (or after `ingestTypes` in `parseFile`), copy `sema.undefinedTypes()` onto the compilation unit if it adopts [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s field.
   - **[#6416](<https://github.com/SonarSource/sonar-java/pull/6416>):** Nothing needed beyond keeping `CompilationUnitTreeImpl.undefinedTypes` writable by other frontends.
   
   _Compared `b0aba6f` with [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) at `12688a4`_

7. ⚠️ Bug: Enum constants no longer count as uses of their constructor
   Files: java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:318-332, java-frontend/src/main/java/org/sonar/java/model/expression/NewClassTreeImpl.java:166-172

   This commit removes the `sema.use(constructor, name)` call from `enumConstant()`. Nothing else records the constructor use: `bindDeclaration` only sets `name.symbol` to the enum constant's variable symbol, and `JSymbol.usages()` reads only `sema.usages`. So every enum constructor now has an empty `usages()` list. For example, in `enum Color { RED(1); private Color(int v) {} }`, `UnusedPrivateMethodCheck.isUnusedPrivate` returns true and `isConstructorWithParameters` is true, so S1144 will wrongly report the constructor as unused. `NewClassTree.methodSymbol()` on the enum constant's `NewClassTreeImpl` now also always returns `UNKNOWN_METHOD`. ECJ bound this identifier to the constructor binding (old `JParser`: `identifier.binding = excludeRecovery(e.resolveConstructorBinding(), ...); usage(identifier.binding, identifier)`). The fix is to keep recording the constructor use (`sema.use(constructor, name)`) even though the identifier keeps the variable symbol, or to give the enum constant's `NewClassTreeImpl` its own constructor identifier bound to the resolved `MethodSymbol`.

   Fix (Keep recording the enum constant as a use of its constructor.):
   Node nameNode = nameNode(node);
   String constructor = nameNode == null ? null : nameNode.valueTarget();
   if (constructor != null) {
     sema.use(constructor, name);
   }
   EnumConstantTreeImpl tree = new EnumConstantTreeImpl(modifiers(node), name, new NewClassTreeImpl(name, args, classBody), separator);
   bindDeclaration(tree, nameNode, name);

8. 💡 Cross-PR: Merging [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s JUtils would empty directSuperTypes for SemSitter types
   Files: java-frontend/src/main/java/org/sonar/java/model/JUtils.java:143-151

   **Breaks when** both this PR and [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) merge, and the `JUtils` conflict is resolved by keeping [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s delegation to `Type.directSuperTypes()`.
   
   **How**
   
   1. In this PR, `JUtils.directSuperTypes` builds its result from `symbol.superClass()` and `symbol.interfaces()` (`java-frontend/src/main/java/org/sonar/java/model/JUtils.java:143-151`).
   2. [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) adds `Type.directSuperTypes()` as a default method that returns an empty set, and only the ECJ-backed `JType` overrides it. `JUtils.directSuperTypes` then delegates to that method.
   3. This PR's SemSitter-backed `JType` does not override the new default, so after such a merge every call returns an empty set. Checks that walk supertypes would change behaviour without any compile error. (`defaultValue` returns `null` on both sides, so only `directSuperTypes` is affected.)
   
   **Fix**
   
   - **This PR:** if [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) lands first, override `directSuperTypes()` in the SemSitter `JType`, using the current superClass/interfaces logic.
   - **[#6416](<https://github.com/SonarSource/sonar-java/pull/6416>):** move the superClass/interfaces-based logic into the `Type.directSuperTypes()` default (or `JUtils`) so it does not depend on the ECJ `JType`.
   
   _Compared `d245514` with [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) at `12688a4`_

9. ⚠️ Bug: Array-last-param heuristic marks non-varargs methods as varargs
   Files: java-frontend/src/main/java/org/sonar/java/model/JMethodSymbol.java:244-258, java-frontend/src/main/java/org/sonar/java/model/JSema.java:536-545

   `isVarArgsMethod()` now returns true for any symbol with no source declaration whose last parameter type is an array (JMethodSymbol.java:259). It does this even when the bridge sent `"varargs": false`, which `classpath_type` always sends (semsitter-bridge/src/types.rs:160). So library methods like `Arrays.sort(int[])` or `String.valueOf(char[])` are reported as varargs. Checks that rely on this flag then give wrong results: `ArrayForVarArgCheck` would flag `Arrays.sort(new int[]{3,1})` with "Remove this array creation and simply pass the elements", which is a false positive and its fix would not compile, and `ConfusingVarargCheck` and `ThreadAsRunnableArgumentCheck` are affected too. The new varargs fallback in `JSema.matches` (JSema.java:544-545) has the same problem: it matches any member whose last parameter is an array and ignores the member's `varargs` flag. The heuristic seems to exist because `jdk_type_info` emits no `varargs` key (types.rs:203-212). Fix: emit `varargs` for JDK members in the bridge and trust the flag. At minimum, use the array heuristic only when the member has no `varargs` key, never as an override of an explicit `false`.

   Fix (In JSema.matches, respect an explicit varargs flag when present (and similarly store 'varargs known' on JMethodSymbol so isVarArgsMethod only falls back to the heuristic when the flag is absent).):
   boolean lastIsArray = declaredCount > 0 && declaredParams.get(declaredCount - 1).isArray();
   boolean varargsMember = member.has("varargs") ? truth(member, "varargs") : lastIsArray;
   return allowVarargs && varargsMember && parsed.arity >= declaredCount - 1;

10. 💡 Edge Case: Implicit-class fallback creates an unknown type and logs an undefined type
   Files: java-frontend/src/main/java/org/sonar/java/model/SemsitterTranslator.java:1615-1629, java-frontend/src/main/java/org/sonar/java/model/JSema.java:190-204, java-frontend/src/main/java/org/sonar/java/model/JSema.java:217-231

   The fallback in `bindImplicitClass` runs when no compact method has a known owner. It calls `sema.resolve(implicitClassName)`, and `resolve` sends a plain name with no `#` or `<` to `JSema.typeSymbol`, which always returns a `JTypeSymbol`. So the `instanceof JTypeSymbol named` check always passes. The types are already loaded at this point (`JParserConfig` calls `ingestTypes` before `translate`). If the file's simple name, e.g. `Main`, is not in `typeInfos`, `typeSymbol` marks a new symbol unknown and adds an `UNDEFINED_TYPE` JProblem. The implicit class then gets bound to that unknown type, its unowned methods get it as owner, and the file reports a type it never references as undefined. The first loop rejects `owner.isUnknown()`, but the fallback has no such check. Fix: look the name up without creating a symbol, or check `!named.isUnknown()` before calling `resolve`, so this lookup cannot add an undefined-type problem.

   Fix (Only fall back to an already known, resolved type symbol so the lookup never creates one):
   if (implicitClass == null && !implicitClassName.isEmpty() && sema.referencedTypeNames().contains(implicitClassName)
       && sema.resolve(implicitClassName) instanceof JTypeSymbol named && !named.isUnknown()) {
     implicitClass = named;
   }

11. ⚠️ Cross-PR: [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>)'s new Ecj* helpers won't compile once JDT is removed
   Files: java-frontend/pom.xml:1

   **Breaks when** this PR and [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) both merge into the same branch and this PR's removal of `jdt-package` from `java-frontend/pom.xml` is kept during conflict resolution.
   
   **How**
   
   1. `java-frontend/pom.xml` no longer declares `jdt-package` or any `org.eclipse` dependency, and no main source in `java-frontend` imports `org.eclipse.jdt`.
   2. [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) adds `java-frontend/src/main/java/org/sonar/java/model/EcjTreeBindings.java`, `EcjSemanticAttachment`, `EcjSymbolMetadata` and `EcjDiagnosticProvider`, which import `IBinding`, `ITypeBinding`, `IMethodBinding` and related JDT types.
   3. These are new files that this PR's edits never touch, so git merges them without conflict. Its hunks in `JParser`, `JSema`, `JSymbol` and `JMethodSymbol` then reference those helpers.
   4. With no JDT on the classpath, `java-frontend` fails to compile.
   
   **Fix**
   
   - **This PR:** Coordinate with [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>). Either state that the two PoCs are mutually exclusive, or rebase on [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) and port its frontend-neutral API (lazy attachments, `defaultValue`, `directSuperTypes`) to the SemSitter model.
   - **[#6416](<https://github.com/SonarSource/sonar-java/pull/6416>):** If it lands first or alongside this PR, keep its ECJ-specific code (the Ecj* files and the hunks that call them) behind a seam that can be deleted, so this PR can drop it along with the JDT dependency.
   
   _Compared `36ef140` with [#6416](<https://github.com/SonarSource/sonar-java/pull/6416>) at `12688a4`_

Verification Rules 1/2 met Repos 4 inspected · PRs 1 inspected
Rules 1 failed 1 passed 1 not applicable

❌ Internal artifact registries - semsitter-bridge/archive-bridge.sh runs cargo vendor (crates.io), apk add, apt-get install and rustup target add against public registries with no Repox config, and Cargo.toml pulls a git fork of tree-sitter-java; route these through Repox or get a reviewed exception.
✅ Repository license compliance

Functional validation No results

Broader impact Repos 4 inspected PRs 1 inspected
Cross-repo 4 repositories inspected 1 open impact

SonarSource/sonar-java-symbolic-execution Inspected
SonarSource/sonarlint-intellij Inspected
SonarSource/sonarlint-vscode Inspected
SonarSource/sonarqube Inspected

Cross-PR 1 PR inspected 4 open impacts

PR 6416: SONARJAVA-7252 Decouple the Java frontend from Eclipse JDT core Inspected

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.
Unblock → Override a blocking verdict and allow merging.

Comment with these commands to change the behavior for this request:

Auto-apply Compact Unblock
gitar auto-apply:on         
gitar display:verbose         
gitar unblock         

Was this helpful? React with 👍 / 👎 | Gitar

@rombirli

rombirli commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/pvf

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6417

@hashicorp-vault-sonar-prod

Copy link
Copy Markdown
Contributor

📊 Performance Validation complete
🆕 67446 new · 🗑️ 79916 lost issues
View dashboard

Projects with unexpected PVF results:

  • crate

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants