-
Notifications
You must be signed in to change notification settings - Fork 41
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
Usage example of SequenceR on any other benchmark #50
Comments
Hi @jose Thanks for reaching out. The doc says
Where the buggy file can be any arbitrary Java file. cc/ @chenzimin |
Thanks @monperrus, somehow I missed that. (Note for future self, Two questions:
|
Do you mean the ground truth line of the ground truth developer patch? |
Got it.
It's indeed. FYI, @speezepearson, @rjust, @mernst, @ruimaranhao, @gofraser and I have identified for every fault of omission in D4J (v1.4.0?), the set of lines present in the buggy version that could perhaps be blamed of the buggy behaviour. You may find them in here. We used that data in the paper Evaluating and improving fault localization.
Yes. |
Hi @jose! I usually load these from the ground truth patch. Some benchmarks (e.g. Defects4J) provide the patch file (even though inverted), but for others you have to compute it yourself (e.g. Bears, QuixBugs).
Hopefully this helps :) |
Thanks @andre15silva. I failed to see, from your pointers, how could I get the set of buggy lines of a given bug in either Bears, Bugs.jar, IntroClassJava, and QuixBugs. As far I understood, that code only checkouts all bugs of each benchmark, right? I do have a script to collect the set of buggy lines and you can find it here. It is tied to Defects4J but it could be easily adapted for any other benchmark. My original question was whether the set buggy lines of each defect in Bears, Bugs.jar, IntroClassJava, and QuixBugs was available somewhere so that I (or anyone else) don't have to compute that. @monperrus, back to the command to execute SequenceR $ ./sequencer-predict.sh --model=[model path] \
--buggy_file=[abs path] \
--buggy_line=[int] \
--beam_size=[int] \
--output=[abs path] How would I run the script on a defect with multiple faulty lines? Run it as many times as the number of faulty lines? |
Sorry @jose , I wasn't explicit enough. I don't have the set buggy lines you want. This is straight-forward in Defects4J because the diff files are stored in the repo, but other benchmarks don't have this. Since different benchmarks have different ways of storing bugs, and to get a clean diff you sometimes need to make some subtle changes (like changing the package names in QuixBugs), I thought that code could be useful for you. |
Kinda. :-)
I found that Bugs.jar also provides, out-of-the-box, the developer patch, e.g., in here. Additionally,
I completely missed that, sorry. (Note to future self, the command to compute the diff is in here.) Thanks @andre15silva, I really appreciate your help. |
Yes, the reverse diff!
Oh, didn't see that before.
Not AFAIR. I think I never used it because of that actually.
No worries! Be aware that the command to compute the diff is tailored to that project (e.g. context window), you might want to tweak it yourself. |
IntroClassJava provides the reference implementation. So you can diff the buggy version and the reference implementation, it gives you a patch, but it's an "artificial" one. Might be useful for some analyses though. |
Hi @ASSERT-KTH,
Any chance you could provide a quick step-by-step on how to run SequenceR on any other benchmark than Defects4J? For instance, Bears or Bugs.jar.
Thanks in advance.
The text was updated successfully, but these errors were encountered: