Skip to content

Make javasrc method call AST structure more consistent with c2cpg #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 16, 2021

Conversation

johannescoetzee
Copy link
Contributor

@johannescoetzee johannescoetzee commented Dec 16, 2021

  • NB!! In the ossdataflowengine, definitions of identifiers will now kill any field access calls accessing an object matching that identifier. For example, the statement x = new Box() will kill previous definitions of x.value(), x.value.toString() etc.
  • Add explicit this to method code fields where required to match java2cpg.
  • For an explicit method call like obj.someMethod() or this.someMethod(), represent the left-hand side as a field access operation instead of just an identifier (to match c2cpg).
  • Fix some testcases that were broken by this change.

Copy link
Contributor

@fabsx00 fabsx00 left a comment

Choose a reason for hiding this comment

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

Noted, and nice catch!

@johannescoetzee johannescoetzee merged commit b3198ac into master Dec 16, 2021
max-leuthaeuser pushed a commit that referenced this pull request Jul 29, 2022
* Make javasrc method call AST structure more consistent with c2cpg

* Fix formatting

* Suppress unused warning

* Fix test indices

* Fix more indices
@max-leuthaeuser max-leuthaeuser deleted the johannes/javasrc-method-calls branch January 26, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants