-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Issue with running jGenprog with bug from defects4j #370
Comments
your classpath is likely wrong, "|/home/project/astor-*-jar-with-dependencies.jar|" does not resolve
to anything.
|
Thank you, that was the issue. Having read "Astor: Exploring the Design Space of Generate-and-Validate Program Repair beyond GenProg," I discovered that there were two implemented navigation strategies for jGenprog: selective and evolution. However, I couldn't find out how to select the evolution strategy as the navigation strategy for jGenprog, neither among the arguments provided here nor using help in the terminal. How does one select the evolution strategy as the navigation strategy for jGenprog? While examining the implementation of jGenprog, I noticed there was a check to determine if the crossover operation should be applied. Should one change the setting in astor.properties (applyCrossover=true) to make jGenprog apply the crossover operator? Or what is the intended method to make jGenprog apply the crossover operator? Thank you again for the help and the answers. |
ping @martinezmatias |
Hi @Fibien
You can implicitly select the strategy by considering more than program variant to evolve (i.e., the population). By default we use one. The population can be controlled with the param Since in our experiments we have executed jGenProg in the selective mode (mostly for a matter of scalability), we dont have a clear interface for the evolutionary mode. For that reason, we have not played enough with the crossover functionality. I open an issue to implement a clear interface for the two modes. Please, feel free to propose a PR of that implementation. (I don't have time for implement it right now, but I can help you). Regards |
Thank you for the answer Matias. Would invoking jGenprog with another value for population or mutationrate make jGenprog use evolution strategy and the crossover functionality? Would it be possible to combine the selective strategy with the crossover functionality? For example by removing the conditional check in jGenprog and directly run ‘applyCrossover’? Would the crossover functionality work the same with selective navigation strategy as it would with evolutionary navigation strategy? Thanks again for all the help. |
Hello, I’m currently a bit stuck with trying to use jGenprog to fix a bug from defects4j.
I have installed astor and successfully run the jGenprog example code from getting started. (With the following)
cd examples/Math-issue-280
mvn clean compile test -DskipTests # compiling and running bug example
cd ../../
java -cp target/astor-*-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain -mode jgenprog -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes/ -bintestfolder /target/test-classes/ -location /home/user/astor/examples/Math-issue-280/ -dependencies examples/Math-issue-280/lib
I have also installed and successfully run the defects4j example. I have checked out, compiled and tested using the example code on their git.
Now to the problem. I have checked out and compiled bug 40 from Math in defects4j and stored the bug in /tmp/bug/40/ and when I try to run jGenprog using this the command below, I get following error:
The command used
sudo java -cp /home/project/astor-*-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain -mode jgenprog -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes/ -bintestfolder /target/test-classes/ -location /tmp/math/40 -stopfirst true
I have compiled the bug folder using the compile command in defects4j and mvn clean compile test -DskipTests. Have encountered the same error in both cases.
Does anyone know what might be the issue?
Any advice on how to extract bugs from defects4j and create and verify patches using jGenprog would be appreciated.
The text was updated successfully, but these errors were encountered: