Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Codegraph/java: eges drawn for methods #121

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

krishnavaidy
Copy link

Nodes created for methods, and Use edges drawn during method calls, from method it is called from to the method called.

During search for method nodes in the graph; the full qualifier is guessed by prepending originating class (nested class handled too). If not, a dfs on the successors in the graph (Use edges).

.codegraph falied with an exception if duplicate node is created. This is handled (for java).

Krishna Vaidyanathan added 5 commits April 27, 2015 23:59
 NOTE: graph_code_java.ml has ast passed in functions,
 though not used (may be used in further iterations).
 Unused functions are commented out (for reference), can
 be deleted in next commit.
 for methods in imports also now. Added option in
 main_codegraph.ml to run method to method functionality
 as optional - currently slows down things when run
 searching for method in nested classes.
 names. Also fixed bug in fn read_from_last
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@aryx
Copy link
Contributor

aryx commented May 4, 2015

Do you mind signing the CLA @krishnavaidy ?

@aryx
Copy link
Contributor

aryx commented May 4, 2015

Can you give me a toy example of a Java program that exhibits the problem you are trying to solve?
Given a toy java program, what codegraph currently fails to produce (and that your patches fix).

@krishnavaidy
Copy link
Author

The legal team of my employer is going through the CLA, hopefully I will sign it once they get back to me.

The patch helps when I'd like to know which nodes Uses a method. Say in method B, method A is called. I draw an Use edge between B and A.

Also, when I run codegraph on Android Open Source Project, it fails with exception: Node already present. Some nodes can be defined multiple times, like android.bluetooth.BluetoothAssignedNumbers.NOKIA_MOBILE_PHONES etc. In the patch, for node conflicts, when node is defined again it is ignored. Maybe a strict/lenient flag can be set in the patch while checking...

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

to method calls in java. eg.,
./codegraph -lang java -build <dir> -method_to_method
If option -method_to_method is not set, by default set to false
@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants