Skip to content

🐛 Look for method calls in embedded classes too#219

Open
jmle wants to merge 1 commit into
konveyor:mainfrom
jmle:bugfix/188-method-call-embedded
Open

🐛 Look for method calls in embedded classes too#219
jmle wants to merge 1 commit into
konveyor:mainfrom
jmle:bugfix/188-method-call-embedded

Conversation

@jmle
Copy link
Copy Markdown
Collaborator

@jmle jmle commented May 18, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed pattern matching for alternation groups in search queries, ensuring parenthesized options are correctly processed during code analysis rather than being unintentionally stripped.
  • Documentation

    • Added documentation explaining how search-pattern matching handles parentheses and alternation syntax in Java code analysis.

Review Change Stack

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@jmle has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 36 minutes and 4 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd569cb6-b6ab-440e-8c3b-96900610bafa

📥 Commits

Reviewing files that changed from the base of the PR and between 4230dc4 and 7c01f75.

📒 Files selected for processing (1)
  • Dockerfile
📝 Walkthrough

Walkthrough

This PR introduces documentation clarifying how the Java analyzer handles parentheses in pattern matching, identifies that CustomASTVisitor incorrectly strips alternation groups, and recommends a targeted fix. It also simplifies compilation unit retrieval in MethodCallSymbolProvider by directly accessing the ancestor instead of conditional branching.

Changes

Symbol Pattern and Qualification Handling

Layer / File(s) Summary
Pattern parentheses documentation and fix recommendation
docs/PATTERN_PARENTHESES_AND_OR_GROUPS.md
Documents how alternation groups like org.library.(Class1|Class2) are currently broken when CustomASTVisitor strips all parentheses during regex construction. Recommends only removing parsed trailing parameter lists while preserving parentheses containing alternation operators. Outlines the end-to-end matching flow and lists affected files and tests.
Compilation unit retrieval simplification
java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/symbol/MethodCallSymbolProvider.java
Refactors qualification-handling branch to derive ICompilationUnit directly from e.getAncestor(IJavaElement.COMPILATION_UNIT) instead of conditionally checking element type, reducing conditional logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A pattern fixed with care,
Parentheses preserved with flair,
No need to branch and check,
Our symbols now won't wreck—
Direct paths lead us there! 🎉

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title mentions 'method calls' and 'embedded classes' but the main change is adding documentation about parentheses handling in search patterns and refactoring how ICompilationUnit is derived in MethodCallSymbolProvider. The title is vague about the actual changes. Clarify whether the main focus is the documentation addition, the compilation unit derivation fix, or how these relate to the issue referenced.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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