Skip to content

SONARJAVA-7236 PoC: replace the ECJ parser with semsitter (OLD) - #6407

Closed
rombirli wants to merge 5 commits into
masterfrom
rombirli/semsitter-ecj-replacement
Closed

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

Conversation

@rombirli

Copy link
Copy Markdown
Contributor

Part of SONARJAVA-7234

Draft, do not merge. Stops before a Java grammar.

Summary

  • Drops the jdt-package (ECJ) dependency. Parser and semantic types are empty stubs. Main sources compile. Tests are not expected to pass.
  • Adds semsitter-sample, a Cargo crate pinned to semsitter udg-model at d606e04b766dc4f506c20c3c37f26d1511b5f065, with one tree-sitter rule (source_file matches hello). cargo test in that directory passes.
  • Java grammar and unit tests are not in this PR.

How SonarSource uses semsitter

  • sonar-context-augmentation depends on udg-gen from github.com/SonarSource/semsitter (git rev pin, optional navigation feature) plus tree-sitter grammars. Cargo needs GitHub auth for the private repo (gh auth setup-git, or CARGO_NET_GIT_FETCH_WITH_CLI=true).
  • sonar-skunk depends on udg-model the same way (different rev). Its Java side is a JNI bridge; the project graph still uses an inactive stub.
  • sonarqube-mcp-server only toggles SONAR_CAG_USE_SEMSITTER.
  • This PoC pins udg-model only, over SSH, so it does not pull udg-gen default features (lang-delphi needs private sonar-skunk).

Test plan

  • mvn -pl java-frontend,java-checks,java-checks-common,java-jsp,sonar-java-plugin -am compile -DskipTests (check-list process-classes first, so GeneratedCheckList exists)
  • cargo test in semsitter-sample
  • Java grammar and frontend unit tests (next step, not this PR)

Main sources still compile against empty trees and symbols. Tests are expected to fail until a semsitter parser fills them in.
Pin udg-model and prove a single tree-sitter rule parses, before attempting a Java grammar.
@hashicorp-vault-sonar-prod

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

Copy link
Copy Markdown
Contributor

SONARJAVA-7236

@datadog-sonarsource

datadog-sonarsource Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Pipelines

❌ Errors

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

🚦 3 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 | Build

View more details · View in GitHub Actions

Build | Ruling Update and Notify

View more details · View in GitHub Actions

Useful? React with 👍 / 👎

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

The shaded jdt-package was most of the 19 MB minimum. The plugin is now about 11 MB.
Comment on lines -27 to +41

private ModifierTree convertModifier(org.eclipse.jdt.core.dom.Modifier node) {
switch (node.getKeyword().toString()) {
case "public":
return new ModifierKeywordTreeImpl(Modifier.PUBLIC, firstTokenIn(node, TerminalToken.TokenNamepublic));
case "protected":
return new ModifierKeywordTreeImpl(Modifier.PROTECTED, firstTokenIn(node, TerminalToken.TokenNameprotected));
case "private":
return new ModifierKeywordTreeImpl(Modifier.PRIVATE, firstTokenIn(node, TerminalToken.TokenNameprivate));
case "static":
return new ModifierKeywordTreeImpl(Modifier.STATIC, firstTokenIn(node, TerminalToken.TokenNamestatic));
case "abstract":
return new ModifierKeywordTreeImpl(Modifier.ABSTRACT, firstTokenIn(node, TerminalToken.TokenNameabstract));
case "final":
return new ModifierKeywordTreeImpl(Modifier.FINAL, firstTokenIn(node, TerminalToken.TokenNamefinal));
case "native":
return new ModifierKeywordTreeImpl(Modifier.NATIVE, firstTokenIn(node, TerminalToken.TokenNamenative));
case "synchronized":
return new ModifierKeywordTreeImpl(Modifier.SYNCHRONIZED, firstTokenIn(node, TerminalToken.TokenNamesynchronized));
case "transient":
return new ModifierKeywordTreeImpl(Modifier.TRANSIENT, firstTokenIn(node, TerminalToken.TokenNametransient));
case "volatile":
return new ModifierKeywordTreeImpl(Modifier.VOLATILE, firstTokenIn(node, TerminalToken.TokenNamevolatile));
case "strictfp":
return new ModifierKeywordTreeImpl(Modifier.STRICTFP, firstTokenIn(node, TerminalToken.TokenNamestrictfp));
case "default":
return new ModifierKeywordTreeImpl(Modifier.DEFAULT, firstTokenIn(node, TerminalToken.TokenNamedefault));
case "sealed":
return new ModifierKeywordTreeImpl(Modifier.SEALED, firstTokenIn(node, TerminalToken.TokenNameRestrictedIdentifiersealed));
case "non-sealed": {
return new ModifierKeywordTreeImpl(Modifier.NON_SEALED, firstTokenIn(node, TerminalToken.TokenNamenon_sealed));
column++;
}
default:
throw new IllegalStateException(node.getKeyword().toString());
}
}

private static final TerminalToken ANY_TOKEN = TerminalToken.TokenNameInvalid;

private static final Map<Object, Op> operators = new HashMap<>();

private static class Op {
final Tree.Kind kind;

/**
* {@link TerminalToken}
*/
final TerminalToken tokenType;

Op(Tree.Kind kind, TerminalToken tokenType) {
this.kind = kind;
this.tokenType = tokenType;
}
}

static {
operators.put(PrefixExpression.Operator.PLUS, new Op(Tree.Kind.UNARY_PLUS, TerminalToken.TokenNamePLUS));
operators.put(PrefixExpression.Operator.MINUS, new Op(Tree.Kind.UNARY_MINUS, TerminalToken.TokenNameMINUS));
operators.put(PrefixExpression.Operator.NOT, new Op(Tree.Kind.LOGICAL_COMPLEMENT, TerminalToken.TokenNameNOT));
operators.put(PrefixExpression.Operator.COMPLEMENT, new Op(Tree.Kind.BITWISE_COMPLEMENT, TerminalToken.TokenNameTWIDDLE));
operators.put(PrefixExpression.Operator.DECREMENT, new Op(Tree.Kind.PREFIX_DECREMENT, TerminalToken.TokenNameMINUS_MINUS));
operators.put(PrefixExpression.Operator.INCREMENT, new Op(Tree.Kind.PREFIX_INCREMENT, TerminalToken.TokenNamePLUS_PLUS));

operators.put(PostfixExpression.Operator.DECREMENT, new Op(Tree.Kind.POSTFIX_DECREMENT, TerminalToken.TokenNameMINUS_MINUS));
operators.put(PostfixExpression.Operator.INCREMENT, new Op(Tree.Kind.POSTFIX_INCREMENT, TerminalToken.TokenNamePLUS_PLUS));

operators.put(InfixExpression.Operator.TIMES, new Op(Tree.Kind.MULTIPLY, TerminalToken.TokenNameMULTIPLY));
operators.put(InfixExpression.Operator.DIVIDE, new Op(Tree.Kind.DIVIDE, TerminalToken.TokenNameDIVIDE));
operators.put(InfixExpression.Operator.REMAINDER, new Op(Tree.Kind.REMAINDER, TerminalToken.TokenNameREMAINDER));
operators.put(InfixExpression.Operator.PLUS, new Op(Tree.Kind.PLUS, TerminalToken.TokenNamePLUS));
operators.put(InfixExpression.Operator.MINUS, new Op(Tree.Kind.MINUS, TerminalToken.TokenNameMINUS));
operators.put(InfixExpression.Operator.LEFT_SHIFT, new Op(Tree.Kind.LEFT_SHIFT, TerminalToken.TokenNameLEFT_SHIFT));
operators.put(InfixExpression.Operator.RIGHT_SHIFT_SIGNED, new Op(Tree.Kind.RIGHT_SHIFT, TerminalToken.TokenNameRIGHT_SHIFT));
operators.put(InfixExpression.Operator.RIGHT_SHIFT_UNSIGNED, new Op(Tree.Kind.UNSIGNED_RIGHT_SHIFT, TerminalToken.TokenNameUNSIGNED_RIGHT_SHIFT));
operators.put(InfixExpression.Operator.LESS, new Op(Tree.Kind.LESS_THAN, TerminalToken.TokenNameLESS));
operators.put(InfixExpression.Operator.GREATER, new Op(Tree.Kind.GREATER_THAN, TerminalToken.TokenNameGREATER));
operators.put(InfixExpression.Operator.LESS_EQUALS, new Op(Tree.Kind.LESS_THAN_OR_EQUAL_TO, TerminalToken.TokenNameLESS_EQUAL));
operators.put(InfixExpression.Operator.GREATER_EQUALS, new Op(Tree.Kind.GREATER_THAN_OR_EQUAL_TO, TerminalToken.TokenNameGREATER_EQUAL));
operators.put(InfixExpression.Operator.EQUALS, new Op(Tree.Kind.EQUAL_TO, TerminalToken.TokenNameEQUAL_EQUAL));
operators.put(InfixExpression.Operator.NOT_EQUALS, new Op(Tree.Kind.NOT_EQUAL_TO, TerminalToken.TokenNameNOT_EQUAL));
operators.put(InfixExpression.Operator.XOR, new Op(Tree.Kind.XOR, TerminalToken.TokenNameXOR));
operators.put(InfixExpression.Operator.OR, new Op(Tree.Kind.OR, TerminalToken.TokenNameOR));
operators.put(InfixExpression.Operator.AND, new Op(Tree.Kind.AND, TerminalToken.TokenNameAND));
operators.put(InfixExpression.Operator.CONDITIONAL_OR, new Op(Tree.Kind.CONDITIONAL_OR, TerminalToken.TokenNameOR_OR));
operators.put(InfixExpression.Operator.CONDITIONAL_AND, new Op(Tree.Kind.CONDITIONAL_AND, TerminalToken.TokenNameAND_AND));

operators.put(Assignment.Operator.ASSIGN, new Op(Tree.Kind.ASSIGNMENT, TerminalToken.TokenNameEQUAL));
operators.put(Assignment.Operator.PLUS_ASSIGN, new Op(Tree.Kind.PLUS_ASSIGNMENT, TerminalToken.TokenNamePLUS_EQUAL));
operators.put(Assignment.Operator.MINUS_ASSIGN, new Op(Tree.Kind.MINUS_ASSIGNMENT, TerminalToken.TokenNameMINUS_EQUAL));
operators.put(Assignment.Operator.TIMES_ASSIGN, new Op(Tree.Kind.MULTIPLY_ASSIGNMENT, TerminalToken.TokenNameMULTIPLY_EQUAL));
operators.put(Assignment.Operator.DIVIDE_ASSIGN, new Op(Tree.Kind.DIVIDE_ASSIGNMENT, TerminalToken.TokenNameDIVIDE_EQUAL));
operators.put(Assignment.Operator.BIT_AND_ASSIGN, new Op(Tree.Kind.AND_ASSIGNMENT, TerminalToken.TokenNameAND_EQUAL));
operators.put(Assignment.Operator.BIT_OR_ASSIGN, new Op(Tree.Kind.OR_ASSIGNMENT, TerminalToken.TokenNameOR_EQUAL));
operators.put(Assignment.Operator.BIT_XOR_ASSIGN, new Op(Tree.Kind.XOR_ASSIGNMENT, TerminalToken.TokenNameXOR_EQUAL));
operators.put(Assignment.Operator.REMAINDER_ASSIGN, new Op(Tree.Kind.REMAINDER_ASSIGNMENT, TerminalToken.TokenNameREMAINDER_EQUAL));
operators.put(Assignment.Operator.LEFT_SHIFT_ASSIGN, new Op(Tree.Kind.LEFT_SHIFT_ASSIGNMENT, TerminalToken.TokenNameLEFT_SHIFT_EQUAL));
operators.put(Assignment.Operator.RIGHT_SHIFT_SIGNED_ASSIGN, new Op(Tree.Kind.RIGHT_SHIFT_ASSIGNMENT, TerminalToken.TokenNameRIGHT_SHIFT_EQUAL));
operators.put(Assignment.Operator.RIGHT_SHIFT_UNSIGNED_ASSIGN, new Op(Tree.Kind.UNSIGNED_RIGHT_SHIFT_ASSIGNMENT, TerminalToken.TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL));
InternalSyntaxToken eof = new InternalSyntaxToken(line, column, "", Collections.emptyList(), true);

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: Removed JParser.parse(ASTParser,…) breaks sonar-java-symbolic-execution tests

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 replaces the four-argument JParser.parse(ASTParser, String, String, String) with a three-argument parse(version, unitName, source) that returns an empty compilation unit. It also removes the ECJ astParser() factory from JParserConfig. In SonarSource/sonar-java-symbolic-execution, JParserTestUtils.parse (java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java) calls JParserConfig.Mode.FILE_BY_FILE.create(...).astParser() and then the four-argument JParser.parse. Once that repo bumps sonar.java.version (pinned today to 8.44.0.48651) to a release with this change, its test helper won't compile. Even after porting it to the new signature, every parsed tree would be empty and have no semantics, so all SE tests built on it would stop checking anything. The PR is a draft PoC and the break is on purpose. The SE repo still needs a coordinated migration before it adopts this frontend.

Here: Before releasing this frontend, record the removal of JParser.parse(ASTParser, …) and JParserConfig.astParser() in the changelog or migration notes, and tell sonar-java-symbolic-execution about the new three-argument entry point. Coordinate the release so the SE repo does not bump to it until the new parser returns real trees.

There: In JParserTestUtils.parse, drop the astParser() call and use the three-argument JParser.parse(version, unitName, source). Keep sonar.java.version on the current release until the semsitter-based parser produces populated trees with semantics.

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) {
  return JParser.parse(JParserConfig.MAXIMUM_SUPPORTED_JAVA_VERSION.effectiveJavaVersionAsString(), unitName, source);
}

Was this helpful? React with 👍 / 👎

@github-actions

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6409

@github-actions

Copy link
Copy Markdown
Contributor

Ruling Diff Summary

Detected changes in 18 rule files: 0 issues removed, 15708 issues added.

S1220 (java) on commons-beanutils - 0 issues removed, 246 issues added - new ruling file

Added src/main/java/org/apache/commons/beanutils2/BaseDynaBeanMapDecorator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BasicDynaBean.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BasicDynaClass.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanAccessLanguageException.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanComparator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanIntrospectionData.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanIntrospector.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanMap.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanPredicate.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanPropertyValueChangeClosure.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanPropertyValueEqualsPredicate.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanToPropertyValueTransformer.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanUtils.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanUtilsBean.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanUtilsBean2.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software
S2309 (java) on commons-beanutils - 0 issues removed, 100 issues added - new ruling file

Added src/main/java/org/apache/commons/beanutils2/BaseDynaBeanMapDecorator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BasicDynaBean.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BasicDynaClass.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanAccessLanguageException.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanComparator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanIntrospectionData.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanIntrospector.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanMap.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanPredicate.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanPropertyValueChangeClosure.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanPropertyValueEqualsPredicate.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanToPropertyValueTransformer.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanUtils.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanUtilsBean.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software

Added src/main/java/org/apache/commons/beanutils2/BeanUtilsBean2.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Licensed to the Apache Software Foundation (ASF) under one or more
         3 |  * contributor license agreements.  See the NOTICE file distributed with
         4 |  * this work for additional information regarding copyright ownership.
         5 |  * The ASF licenses this file to You under the Apache License, Version 2.0
         6 |  * (the "License"); you may not use this file except in compliance with
         7 |  * the License.  You may obtain a copy of the License at
         8 |  *
         9 |  *      http://www.apache.org/licenses/LICENSE-2.0
        10 |  *
        11 |  * Unless required by applicable law or agreed to in writing, software
S1220 (java) on eclipse-jetty - 0 issues removed, 690 issues added - new ruling file

Added 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/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/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/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/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/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/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/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/GZIPContentDecoder.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HostPortHttpField.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/Http1FieldPreEncoder.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpCompliance.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpCookie.java (file-level)

(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 (file-level)

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

Added 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/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/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/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/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/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/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/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/GZIPContentDecoder.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HostPortHttpField.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/Http1FieldPreEncoder.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpCompliance.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java (file-level)

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

Added jetty-http/src/main/java/org/eclipse/jetty/http/HttpCookie.java (file-level)

(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 (file-level)

(source file not found at this revision: jetty-http/src/main/java/org/eclipse/jetty/http/HttpField.java)
S1220 (java) on guava - 0 issues removed, 469 issues added - new ruling file

Added src/com/google/common/annotations/Beta.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/GwtCompatible.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2009 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/GwtIncompatible.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2009 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/VisibleForTesting.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2006 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/package-info.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Absent.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2011 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/AbstractIterator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2007 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Ascii.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/CaseFormat.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2006 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/CharMatcher.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2008 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Charsets.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2007 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Converter.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2008 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Defaults.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2007 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Enums.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2011 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Equivalence.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,
S2309 (java) on guava - 0 issues removed, 469 issues added - new ruling file

Added src/com/google/common/annotations/Beta.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/GwtCompatible.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2009 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/GwtIncompatible.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2009 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/VisibleForTesting.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2006 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/annotations/package-info.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Absent.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2011 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/AbstractIterator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2007 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Ascii.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/CaseFormat.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2006 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/CharMatcher.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2008 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Charsets.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2007 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Converter.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2008 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Defaults.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2007 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Enums.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2011 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,

Added src/com/google/common/base/Equivalence.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | /*
         2 |  * Copyright (C) 2010 The Guava Authors
         3 |  *
         4 |  * Licensed under the Apache License, Version 2.0 (the "License");
         5 |  * you may not use this file except in compliance with the License.
         6 |  * You may obtain a copy of the License at
         7 |  *
         8 |  * http://www.apache.org/licenses/LICENSE-2.0
         9 |  *
        10 |  * Unless required by applicable law or agreed to in writing, software
        11 |  * distributed under the License is distributed on an "AS IS" BASIS,
S1220 (java) on java-time-example - 0 issues removed, 5 issues added - new ruling file

Added src/main/java/example/AppointmentService.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.LocalDate;
         4 | import java.time.LocalDateTime;
         5 | import java.time.Month;
         6 | import java.time.MonthDay;
         7 | import java.time.YearMonth;
         8 | 
         9 | public class AppointmentService {
        10 | 
        11 |   void schedule() {

Added src/main/java/example/CalendarUtils.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class CalendarUtils {
        11 | 

Added src/main/java/example/EventScheduler.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class EventScheduler {
        11 | 

Added src/main/java/example/HolidayChecker.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class HolidayChecker {
        11 | 

Added src/main/java/example/ReportGenerator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class ReportGenerator {
        11 | 
S2309 (java) on java-time-example - 0 issues removed, 5 issues added - new ruling file

Added src/main/java/example/AppointmentService.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.LocalDate;
         4 | import java.time.LocalDateTime;
         5 | import java.time.Month;
         6 | import java.time.MonthDay;
         7 | import java.time.YearMonth;
         8 | 
         9 | public class AppointmentService {
        10 | 
        11 |   void schedule() {

Added src/main/java/example/CalendarUtils.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class CalendarUtils {
        11 | 

Added src/main/java/example/EventScheduler.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class EventScheduler {
        11 | 

Added src/main/java/example/HolidayChecker.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class HolidayChecker {
        11 | 

Added src/main/java/example/ReportGenerator.java (file-level)

>>> FILE-LEVEL ISSUE
         1 | package example;
         2 | 
         3 | import java.time.DayOfWeek;
         4 | import java.time.LocalDate;
         5 | import java.time.LocalDateTime;
         6 | import java.time.Month;
         7 | import java.time.MonthDay;
         8 | import java.time.YearMonth;
         9 | 
        10 | public class ReportGenerator {
        11 | 

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

Java starts the native executable and exchanges one JSON object per line, so a parse tree can be logged without a binary protocol.
@github-actions

Copy link
Copy Markdown
Contributor

⚖️ Ruling update ready for review: #6409

Comment on lines +70 to +77
public synchronized String parse(String source) throws IOException {
JsonObject request = new JsonObject();
request.addProperty("id", nextId);
request.addProperty("op", "parse");
request.addProperty("source", source);
nextId++;
return exchange(request);
}

@gitar-bot gitar-bot Bot Oct 26, 2026 •

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: close() cannot kill a hung bridge: it's synchronized and waits forever

parse() and close() are both synchronized, and exchange() blocks on fromBridge.readLine() with no timeout. Say the bridge stalls on a parse (a pathological input, or an infinite loop in a grammar). The thread stuck in parse() keeps the monitor, so close(), for example from try-with-resources on another thread or a shutdown path, waits on the lock forever. It never gets to destroy()/destroyForcibly(). Even without a second thread, close() first runs a blocking quit exchange. A bridge that has stopped answering hangs close() on readLine() and is never killed. The escape path should not depend on the bridge cooperating: either kill the process before taking the lock, or put a deadline on the quit read and fall through to destroyForcibly().

Make close() not depend on the parse lock or on the bridge answering: send quit best-effort without reading the reply, then destroy with a timeout.:

@Override
public void close() {
  if (closed) { return; }
  closed = true;
  try {
    toBridge.write("{"op":"quit"}
");
    toBridge.flush();
    toBridge.close();
  } catch (IOException ignored) {
    // bridge already gone
  }
  process.destroy();
  // waitFor(2s) then destroyForcibly() as before
}

Was this helpful? React with 👍 / 👎

Comment on lines +68 to +71
fn node_json(node: tree_sitter::Node, depth: usize) -> serde_json::Value {
if depth > 64 {
return serde_json::json!({"truncated": true});
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Edge Case: Trees deeper than 64 are silently cut off but still report ok:true

node_json returns {"truncated": true} for any node deeper than 64. That placeholder has no kind, positions or children. The response still says ok: true, and hasError comes from the full root, so nothing at the response level tells the Java client the tree is incomplete. The SemsitterBridge Javadoc and the handle_line docs describe the tree without mentioning truncation. Once the planned Java grammar is in, ordinary code goes past depth 64: a left-recursive chain of 60+ + string concatenations or long fluent call chains will do it. A consumer that reads kind on every node would then hit nulls, or silently drop subtrees. Either raise the limit, or switch to iterative serialization with a TreeCursor to avoid stack overflow. Failing that, report truncation explicitly, for example with a top-level "truncated": true flag or ok: false.

Was this helpful? React with 👍 / 👎

…he plugin

Extract bridge-<os>-<arch>.xz from bridge/ at runtime the same way SonarDRE does, so the JSONL client starts the binary shipped in the plugin JAR.
Comment on lines +6 to +20
if [[ -n "${TARGETS:-}" ]]; then
mkdir -p target/release
for target in $TARGETS; do
case "$target" in
x86_64-unknown-linux-musl) name=bridge-linux-x64; bin=bridge ;;
aarch64-unknown-linux-musl) name=bridge-linux-aarch64; bin=bridge ;;
x86_64-pc-windows-gnu) name=bridge-windows-x64; bin=bridge.exe ;;
x86_64-apple-darwin) name=bridge-macos-x64; bin=bridge ;;
aarch64-apple-darwin) name=bridge-macos-aarch64; bin=bridge ;;
*) echo "Unknown target: $target" >&2; exit 1 ;;
esac
tar -cJf "target/release/${name}.xz" -C "target/${target}/release" "${bin}"
done
exit 0
fi

@gitar-bot gitar-bot Bot Oct 27, 2026 •

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: TARGETS mode archives a bridge file that cargo never builds

The cargo bin target comes from src/bin/semsitter-bridge.rs, and Cargo.toml has no [[bin]] rename, so a cross build writes target/<triple>/release/semsitter-bridge (or semsitter-bridge.exe). The TARGETS branch runs tar -C target/${target}/release bridge, so tar stops with 'Cannot stat' for every triple. That branch is the only way to get the per-OS archives this commit promises, and the musl Linux binaries the Alpine mapping depends on. It also ignores CARGO_TARGET_DIR and never calls cargo build. The host branch already handles this: it copies semsitter-bridge to bridge before archiving. The TARGETS branch should do the same.

Build each target, then copy the real artifact to the archived name before running tar:

cargo build --release --locked --target "$target"
built="${bin/bridge/semsitter-bridge}"
src_dir="${CARGO_TARGET_DIR:-$PWD/target}/${target}/release"
stage="target/release/stage-${target}"
mkdir -p "$stage"
cp -f "${src_dir}/${built}" "${stage}/${bin}"
tar -cJf "target/release/${name}.xz" -C "$stage" "${bin}"

Was this helpful? React with 👍 / 👎

Comment on lines +75 to +88
private static Path extractedExecutable() throws IOException {
Path current = extractedExecutable;
if (current != null && Files.isExecutable(current)) {
return current;
}
synchronized (SemsitterBridge.class) {
if (extractedExecutable == null || !Files.isExecutable(extractedExecutable)) {
Platform platform = new PlatformDetection().getPlatform();
Path directory = Files.createTempDirectory("bridge");
extractedExecutable = BridgeExtractor.extract(directory, platform);
}
return extractedExecutable;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Quality: Each JVM extracts the bridge to a new temp dir that is never deleted

extractedExecutable() calls Files.createTempDirectory("bridge") the first time it runs in each JVM, and again whenever the cached file is gone or not executable. It writes the unpacked native binary there. Nothing deletes the directory or the binary: there is no deleteOnExit and no shutdown hook. As a result, every analysis run leaves a multi-megabyte executable in the system temp folder, and the same happens when extraction fails partway. Either register cleanup, or extract to one stable, versioned directory so later runs can reuse the file through BridgeExtractor's existing Files.exists check.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
CI failed: Three distinct CI failures in the semsitter ECJ replacement PoC: the semsitter bridge packaging fails on Cargo SSH authentication to a private Git dependency (change-related), java-frontend test sources fail to compile because they still reference removed ECJ APIs (change-related), and the ruling update job fails because its upstream ruling QA job was skipped and produced no artifacts (unrelated to this change).

Overview

Three unique error templates across 19 analyzed logs. Two failures are directly tied to this PR's ECJ removal and semsitter packaging; one ruling-update workflow failure is unrelated to the change and appears to be a workflow precondition issue.

Failures

Cargo cannot authenticate to private semsitter git dependency during bridge packaging (confidence: high)

  • Type: authentication
  • Affected jobs: 122052159302
  • Related to change: yes
  • Root cause: The archive-semsitter-bridge exec step in sonar-java-plugin runs Cargo, which fails to fetch udg-model from ssh://git@github.com/SonarSource/semsitter.git at revision d606e04b766dc4f506c20c3c37f26d1511b5f065. Cargo reports SSH-agent authentication failed with no usernames succeeding, and 'revision not found' is consistent with the repository being inaccessible. Subsequent Maven modules are skipped as cascading effects.
  • Suggested fix: Give the CI runner credentials that can read the SonarSource/semsitter repository (for example a deploy key or token configured for git over SSH/HTTPS), or switch the dependency to an authenticated or published source. Confirm the pinned revision exists once access is in place.

java-frontend test sources fail to compile against removed ECJ APIs (confidence: high)

  • Type: build
  • Affected jobs: 122052159506
  • Related to change: yes
  • Root cause: Maven fails at testCompile in java-frontend with up to 100 errors. Tests including JavaFrontendTest, ProgressMonitorTest, JMethodSymbolTest, JParserSemanticTest and JParserTest reference missing org.eclipse.jdt.core.dom packages and removed symbols such as resolveType, typeBinding, methodBinding and IProgressMonitor. These follow directly from dropping the ECJ parser in this PR.
  • Suggested fix: Update or remove ECJ-dependent tests and port the remaining ones to the replacement parser's APIs. If some tests must keep ECJ types, retain the required dependencies in test scope only.

Ruling update job fails because ruling QA was skipped and no artifacts exist (confidence: high)

  • Type: configuration
  • Affected jobs: 122052724435
  • Related to change: no
  • Root cause: The ruling-qa result is skipped, which sets ruling-failed=true. The sync step then finds no actual_* artifacts and fails with No artifacts were downloaded (directory does not exist). No ruling test failure or reason for the skip appears in the log, so this is an artifact-handling workflow precondition failure, not evidence of a parser defect. Note: the analyzer's relationship verdict is 'no' and no unclear evidence was reported.
  • Suggested fix: Find out why the ruling QA job was skipped and ensure it runs and uploads the expected actual_* artifacts. Alternatively, make the ruling update workflow skip artifact synchronization when QA is skipped or no artifacts are available.

Summary

  • Change-related failures: 2 (semsitter Cargo git authentication during bridge packaging; java-frontend test compilation against removed ECJ APIs).
  • Infrastructure/flaky failures: 0 identified. The ruling workflow failure is unrelated to the change and is not flagged as flaky or infrastructure.
  • Recommended action: Fix git credentials for the private semsitter dependency first, since it blocks the plugin build and masks later stages. Then port or remove ECJ-dependent tests in java-frontend. Separately investigate why ruling QA was skipped in the ruling update workflow.
Code Review ⚠️ Changes requested 0 closed / 5 findings

🔴 High risk · Replacing the Java parser and semantic model with empty stubs could cause analyses to miss findings across Java projects.

Replaces the ECJ parser with a semsitter-based bridge in a draft PoC, but changes are requested before merge.

  • Removing JParser.parse(ASTParser, ...) and JParserConfig.astParser() breaks the sonar-java-symbolic-execution test helper, so the removal needs a changelog entry and coordinated migration
  • SemsitterBridge.close() is synchronized and blocks on readLine(), so a hung bridge can deadlock shutdown and never gets destroyed
  • Trees deeper than 64 nodes are replaced with {"truncated": true} placeholders while the response still reports ok: true, so consumers can't detect incomplete trees
  • archive-bridge.sh TARGETS mode tars bridge but cargo produces semsitter-bridge, so per-OS archives will fail to build
  • extractedExecutable() creates a temp directory per JVM that is never cleaned up, leaving a native binary behind after each run
⚠️ Bug: close() cannot kill a hung bridge: it's synchronized and waits forever

📄 java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:70-77 📄 java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:80-94 📄 java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:115

parse() and close() are both synchronized, and exchange() blocks on fromBridge.readLine() with no timeout. Say the bridge stalls on a parse (a pathological input, or an infinite loop in a grammar). The thread stuck in parse() keeps the monitor, so close(), for example from try-with-resources on another thread or a shutdown path, waits on the lock forever. It never gets to destroy()/destroyForcibly(). Even without a second thread, close() first runs a blocking quit exchange. A bridge that has stopped answering hangs close() on readLine() and is never killed. The escape path should not depend on the bridge cooperating: either kill the process before taking the lock, or put a deadline on the quit read and fall through to destroyForcibly().

Make close() not depend on the parse lock or on the bridge answering: send quit best-effort without reading the reply, then destroy with a timeout.
@Override
public void close() {
  if (closed) { return; }
  closed = true;
  try {
    toBridge.write("{"op":"quit"}
");
    toBridge.flush();
    toBridge.close();
  } catch (IOException ignored) {
    // bridge already gone
  }
  process.destroy();
  // waitFor(2s) then destroyForcibly() as before
}
⚠️ Bug: TARGETS mode archives a bridge file that cargo never builds

📄 semsitter-sample/archive-bridge.sh:6-20 📄 semsitter-sample/archive-bridge.sh:25-35

The cargo bin target comes from src/bin/semsitter-bridge.rs, and Cargo.toml has no [[bin]] rename, so a cross build writes target/<triple>/release/semsitter-bridge (or semsitter-bridge.exe). The TARGETS branch runs tar -C target/${target}/release bridge, so tar stops with 'Cannot stat' for every triple. That branch is the only way to get the per-OS archives this commit promises, and the musl Linux binaries the Alpine mapping depends on. It also ignores CARGO_TARGET_DIR and never calls cargo build. The host branch already handles this: it copies semsitter-bridge to bridge before archiving. The TARGETS branch should do the same.

Build each target, then copy the real artifact to the archived name before running tar
cargo build --release --locked --target "$target"
built="${bin/bridge/semsitter-bridge}"
src_dir="${CARGO_TARGET_DIR:-$PWD/target}/${target}/release"
stage="target/release/stage-${target}"
mkdir -p "$stage"
cp -f "${src_dir}/${built}" "${stage}/${bin}"
tar -cJf "target/release/${name}.xz" -C "$stage" "${bin}"
💡 Cross-Repo: Removed JParser.parse(ASTParser,…) breaks sonar-java-symbolic-execution tests

📄 java-frontend/src/main/java/org/sonar/java/model/JParser.java:27-41 📄 java-frontend/src/main/java/org/sonar/java/model/JParserConfig.java:168-177

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 replaces the four-argument JParser.parse(ASTParser, String, String, String) with a three-argument parse(version, unitName, source) that returns an empty compilation unit. It also removes the ECJ astParser() factory from JParserConfig. In SonarSource/sonar-java-symbolic-execution, JParserTestUtils.parse (java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java) calls JParserConfig.Mode.FILE_BY_FILE.create(...).astParser() and then the four-argument JParser.parse. Once that repo bumps sonar.java.version (pinned today to 8.44.0.48651) to a release with this change, its test helper won't compile. Even after porting it to the new signature, every parsed tree would be empty and have no semantics, so all SE tests built on it would stop checking anything. The PR is a draft PoC and the break is on purpose. The SE repo still needs a coordinated migration before it adopts this frontend.

Here: Before releasing this frontend, record the removal of JParser.parse(ASTParser, …) and JParserConfig.astParser() in the changelog or migration notes, and tell sonar-java-symbolic-execution about the new three-argument entry point. Coordinate the release so the SE repo does not bump to it until the new parser returns real trees.

There: In JParserTestUtils.parse, drop the astParser() call and use the three-argument JParser.parse(version, unitName, source). Keep sonar.java.version on the current release until the semsitter-based parser produces populated trees with semantics.

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) {
  return JParser.parse(JParserConfig.MAXIMUM_SUPPORTED_JAVA_VERSION.effectiveJavaVersionAsString(), unitName, source);
}
💡 Edge Case: Trees deeper than 64 are silently cut off but still report ok:true

📄 semsitter-sample/src/lib.rs:68-71 📄 semsitter-sample/src/lib.rs:96-107 📄 java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:32-41

node_json returns {"truncated": true} for any node deeper than 64. That placeholder has no kind, positions or children. The response still says ok: true, and hasError comes from the full root, so nothing at the response level tells the Java client the tree is incomplete. The SemsitterBridge Javadoc and the handle_line docs describe the tree without mentioning truncation. Once the planned Java grammar is in, ordinary code goes past depth 64: a left-recursive chain of 60+ + string concatenations or long fluent call chains will do it. A consumer that reads kind on every node would then hit nulls, or silently drop subtrees. Either raise the limit, or switch to iterative serialization with a TreeCursor to avoid stack overflow. Failing that, report truncation explicitly, for example with a top-level "truncated": true flag or ok: false.

💡 Quality: Each JVM extracts the bridge to a new temp dir that is never deleted

📄 java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:75-88

extractedExecutable() calls Files.createTempDirectory("bridge") the first time it runs in each JVM, and again whenever the cached file is gone or not executable. It writes the unpacked native binary there. Nothing deletes the directory or the binary: there is no deleteOnExit and no shutdown hook. As a result, every analysis run leaves a multi-megabyte executable in the system temp folder, and the same happens when extraction fails partway. Either register cleanup, or extract to one stable, versioned directory so later runs can reuse the file through BridgeExtractor's existing Files.exists check.

🤖 Prompt for agents
Code Review: Replaces the ECJ parser with a semsitter-based bridge in a draft PoC, but changes are requested before merge.
  
  - Removing `JParser.parse(ASTParser, ...)` and `JParserConfig.astParser()` breaks the sonar-java-symbolic-execution test helper, so the removal needs a changelog entry and coordinated migration
  - `SemsitterBridge.close()` is `synchronized` and blocks on `readLine()`, so a hung bridge can deadlock shutdown and never gets destroyed
  - Trees deeper than 64 nodes are replaced with `{"truncated": true}` placeholders while the response still reports `ok: true`, so consumers can't detect incomplete trees
  - `archive-bridge.sh` TARGETS mode tars `bridge` but cargo produces `semsitter-bridge`, so per-OS archives will fail to build
  - `extractedExecutable()` creates a temp directory per JVM that is never cleaned up, leaving a native binary behind after each run

1. 💡 Cross-Repo: Removed JParser.parse(ASTParser,…) breaks sonar-java-symbolic-execution tests
   Files: java-frontend/src/main/java/org/sonar/java/model/JParser.java:27-41, java-frontend/src/main/java/org/sonar/java/model/JParserConfig.java:168-177

   **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 replaces the four-argument `JParser.parse(ASTParser, String, String, String)` with a three-argument `parse(version, unitName, source)` that returns an empty compilation unit. It also removes the ECJ `astParser()` factory from `JParserConfig`. In SonarSource/sonar-java-symbolic-execution, `JParserTestUtils.parse` (java-symbolic-execution-plugin/src/test/java/org/sonar/java/se/utils/JParserTestUtils.java) calls `JParserConfig.Mode.FILE_BY_FILE.create(...).astParser()` and then the four-argument `JParser.parse`. Once that repo bumps `sonar.java.version` (pinned today to 8.44.0.48651) to a release with this change, its test helper won't compile. Even after porting it to the new signature, every parsed tree would be empty and have no semantics, so all SE tests built on it would stop checking anything. The PR is a draft PoC and the break is on purpose. The SE repo still needs a coordinated migration before it adopts this frontend.
   
   **Here:** Before releasing this frontend, record the removal of `JParser.parse(ASTParser, …)` and `JParserConfig.astParser()` in the changelog or migration notes, and tell sonar-java-symbolic-execution about the new three-argument entry point. Coordinate the release so the SE repo does not bump to it until the new parser returns real trees.
   
   **There:** In JParserTestUtils.parse, drop the `astParser()` call and use the three-argument `JParser.parse(version, unitName, source)`. Keep `sonar.java.version` on the current release until the semsitter-based parser produces populated trees with semantics.
   
   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) {
     return JParser.parse(JParserConfig.MAXIMUM_SUPPORTED_JAVA_VERSION.effectiveJavaVersionAsString(), unitName, source);
   }
   ````

2. ⚠️ Bug: close() cannot kill a hung bridge: it's synchronized and waits forever
   Files: java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:70-77, java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:80-94, java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:115

   `parse()` and `close()` are both `synchronized`, and `exchange()` blocks on `fromBridge.readLine()` with no timeout. Say the bridge stalls on a parse (a pathological input, or an infinite loop in a grammar). The thread stuck in `parse()` keeps the monitor, so `close()`, for example from try-with-resources on another thread or a shutdown path, waits on the lock forever. It never gets to `destroy()`/`destroyForcibly()`. Even without a second thread, `close()` first runs a blocking `quit` exchange. A bridge that has stopped answering hangs `close()` on `readLine()` and is never killed. The escape path should not depend on the bridge cooperating: either kill the process before taking the lock, or put a deadline on the quit read and fall through to `destroyForcibly()`.

   Fix (Make close() not depend on the parse lock or on the bridge answering: send quit best-effort without reading the reply, then destroy with a timeout.):
   @Override
   public void close() {
     if (closed) { return; }
     closed = true;
     try {
       toBridge.write("{"op":"quit"}
   ");
       toBridge.flush();
       toBridge.close();
     } catch (IOException ignored) {
       // bridge already gone
     }
     process.destroy();
     // waitFor(2s) then destroyForcibly() as before
   }

3. 💡 Edge Case: Trees deeper than 64 are silently cut off but still report ok:true
   Files: semsitter-sample/src/lib.rs:68-71, semsitter-sample/src/lib.rs:96-107, java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:32-41

   `node_json` returns `{"truncated": true}` for any node deeper than 64. That placeholder has no `kind`, positions or children. The response still says `ok: true`, and `hasError` comes from the full root, so nothing at the response level tells the Java client the tree is incomplete. The `SemsitterBridge` Javadoc and the `handle_line` docs describe the tree without mentioning truncation. Once the planned Java grammar is in, ordinary code goes past depth 64: a left-recursive chain of 60+ `+` string concatenations or long fluent call chains will do it. A consumer that reads `kind` on every node would then hit nulls, or silently drop subtrees. Either raise the limit, or switch to iterative serialization with a `TreeCursor` to avoid stack overflow. Failing that, report truncation explicitly, for example with a top-level `"truncated": true` flag or `ok: false`.

4. ⚠️ Bug: TARGETS mode archives a `bridge` file that cargo never builds
   Files: semsitter-sample/archive-bridge.sh:6-20, semsitter-sample/archive-bridge.sh:25-35

   The cargo bin target comes from `src/bin/semsitter-bridge.rs`, and Cargo.toml has no `[[bin]]` rename, so a cross build writes `target/<triple>/release/semsitter-bridge` (or `semsitter-bridge.exe`). The `TARGETS` branch runs `tar -C target/${target}/release bridge`, so `tar` stops with 'Cannot stat' for every triple. That branch is the only way to get the per-OS archives this commit promises, and the musl Linux binaries the Alpine mapping depends on. It also ignores `CARGO_TARGET_DIR` and never calls `cargo build`. The host branch already handles this: it copies `semsitter-bridge` to `bridge` before archiving. The TARGETS branch should do the same.

   Fix (Build each target, then copy the real artifact to the archived name before running tar):
   cargo build --release --locked --target "$target"
   built="${bin/bridge/semsitter-bridge}"
   src_dir="${CARGO_TARGET_DIR:-$PWD/target}/${target}/release"
   stage="target/release/stage-${target}"
   mkdir -p "$stage"
   cp -f "${src_dir}/${built}" "${stage}/${bin}"
   tar -cJf "target/release/${name}.xz" -C "$stage" "${bin}"

5. 💡 Quality: Each JVM extracts the bridge to a new temp dir that is never deleted
   Files: java-frontend/src/main/java/org/sonar/java/semsitter/SemsitterBridge.java:75-88

   `extractedExecutable()` calls `Files.createTempDirectory("bridge")` the first time it runs in each JVM, and again whenever the cached file is gone or not executable. It writes the unpacked native binary there. Nothing deletes the directory or the binary: there is no `deleteOnExit` and no shutdown hook. As a result, every analysis run leaves a multi-megabyte executable in the system temp folder, and the same happens when extraction fails partway. Either register cleanup, or extract to one stable, versioned directory so later runs can reuse the file through `BridgeExtractor`'s existing `Files.exists` check.

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

❌ Internal artifact registries - The Maven build now runs cargo build --release --locked via archive-bridge.sh against the public crates.io index (Cargo.lock) with no Repox Cargo registry configuration; route Cargo through the Repox cargo endpoint (e.g. via a .cargo/config.toml source replacement) or obtain a reviewed exception.
✅ Repository license compliance

Functional validation No results

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

SonarSource/sonar-java-symbolic-execution Inspected
SonarSource/sonarlint-vscode Inspected
SonarSource/sonarlint-intellij Inspected
SonarSource/sonarlint-language-server 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

Duplicate

@rombirli rombirli closed this Nov 2, 2026
@rombirli rombirli changed the title SONARJAVA-7236 PoC: replace the ECJ parser with semsitter SONARJAVA-7236 PoC: replace the ECJ parser with semsitter (OLD) Nov 2, 2026
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.

1 participant