Skip to content
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

Run JDCallgraph on D4J #5

Open
agb94 opened this issue Oct 21, 2020 · 3 comments
Open

Run JDCallgraph on D4J #5

agb94 opened this issue Oct 21, 2020 · 3 comments

Comments

@agb94
Copy link

agb94 commented Oct 21, 2020

Hi!
First of all, thanks for providing this tool :)
While I'm reading your ICST'20 paper, I found that you use this tool on the D4J dataset to extract the dynamic features.
Would you mind providing an example script to run this tool on the dataset if available?
I think that would be a really great tutorial to get used to this tool.
Thank you.

@agb94
Copy link
Author

agb94 commented Oct 21, 2020

Oh, in the paper, the authors mentioned that they had developed this tool. But I just figured out that the main maintainer(contributor) @dkarv of this project may not be one of the authors...? So, please let me know if this is not a proper place to ask the above question. And I'd really appreciate if you can let me know whom I can contact.

@dkarv
Copy link
Owner

dkarv commented Oct 21, 2020

Hi :)

Thanks for your question. I developed this tool as part of my master thesis, but I don't further participate in the academic research about fault localization, so I can answer questions about the tool only.

D4J uses Ant as build tool, so you can follow the Ant instructions in the Readme to get started. Basically I modified the defects4j.build.xml to fork a new VM and add jdcallgraph as agent.

So changed lines in the xml would look like this:

<junit printsummary="yes" haltonfailure="no" haltonerror="no" fork="yes" forkmode="once" showOutput="true">
    <jvmarg value="-javaagent:/path/to/jdcallgraph.jar=/path/to/config.ini" />

The examples/falo.ini can be a good starting point for the config. You can then proceed to run D4J tests. Just keep in mind that it will take longer due to the instrumentation, and I suggest starting with easy projects such as the "Lang" one.

Disclaimer that I haven't run the project in ages, and only on Linux (Ubuntu in particular) with Java 7 or 8. The last version of D4J I tried it with is this one, but on a short glance it seems nothing changed in a way it would not work with the latest release.

Happy to get some feedback how it works out!

@agb94
Copy link
Author

agb94 commented Oct 22, 2020

With your guidance, I was able to extract the call graph of Lang-5b using JDCallgraph version 0.1! (env: Ubuntu 16.04, Java 8)
Thank you so much for your fast response and help :)

p.s. I found that the pre-released version (v0.2) cannot recognise the multiGraph option in the config file.
Is that option deprecated?

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

No branches or pull requests

2 participants