facebookarchive / pfff

Tools for code analysis, visualizations, or style-preserving source transformation.
http://github.com/facebook/pfff/wiki/Main
Other
2.44k stars 205 forks source link

Codegraph/java: eges drawn for methods #121

Open krishnavaidy opened 9 years ago

krishnavaidy commented 9 years ago

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).

facebook-github-bot commented 9 years ago

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 cla@fb.com. Thanks!

aryx commented 9 years ago

Do you mind signing the CLA @krishnavaidy ?

aryx commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

ghost commented 9 years ago

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.