yyxhdy / arja Goto Github PK
View Code? Open in Web Editor NEWMulti-Objective GP for Automated Repair of Java
License: MIT License
Multi-Objective GP for Automated Repair of Java
License: MIT License
Hello, under what license is this project released under ? Thank-you.
Dependencies are not being passed to the SeedLineGenerator, bacause of the buggy if statment condition (unnecessary negation).
Resulting in NoClassDefFoundError being thrown and no seed lines being generated.
Unfortunately same issue as #12. Dependencies are not being passed to the TestFilter, bacause of the buggy if statment condition (unnecessary negation).
Resulting in NoClassDefFoundError being thrown and all positive tests being filtered.
Hi,
I am running ARJA on macOS High Sierra. I have written a java file and a junit test file to test that Java program. Following is the command that I am running
java -cp lib/*:bin us.msu.cse.repair.Main Arja -DsrcJavaDir /Users/somdutta/eclipse-workspace/ECS289C/GCD/src/org/gcd -DbinJavaDir /Users/somdutta/eclipse-workspace/ECS289C/GCD/bin/org/gcd -DbinTestDir /Users/somdutta/eclipse-workspace/ECS289C/GCD/bin/org/gcd/test -Ddependences /Users/somdutta/.p2/pool/plugins
The error that I am getting is
Exception in thread "main" java.lang.NoClassDefFoundError: org/gcd/test/GCDTest (wrong name: GCDTest)
I am giving the right path where the class file of the JUnit test file for -DbinTestDir. Could you please let me know if I am running the tool properly?
Thanks
Hi @yyxhdy
I read the code and find that Arja and GenProg can record the compilation process results in their problem.java files. However, RSRepair can also record these even if it does not have a corresponding problem.java file. Why is this?
For Kali, it contains dependencies to the external packages so this process is not recorded. I'd like to know how can I make the change to record the compilation results of the variants generated during its searching.
Thanks a lot.
Could you plz give me some examples to run ARJA immediately?
I'm a confused about how to construct test suite as input parameter of ARJA, and how to use Defect4j to generate specific form tests to feed ARJA?
HOPE YOUR REPLY
THX!
I was trying to run ArjaE today and found out something not documented and not logged in the code.
In this piece of code, if the test executor is different than ExternalTestExecutor2
, the method returns and does not instrument test cases.
Hence, "Instrumentation of tests is finished!"
is never outputted. The problem is that the default executor is ExternalTestExecutor, thus the instrumentation never happens.
Is this an intended behaviour? If so, then at least a log should be shown saying that the instrumentation of test cases was skipped.
Moreover, I found out that if I do not execute Arja from its root directory, it does not work (unless I change the external root directory). This should be emphasised in the documentation. It took me a few days to figure it out, since the tool keeps executing everything without failing and appears to be working, when in reality it's not.
Could you please improve the documentation?
Thanks.
Dear Sir,
Sorry for interrupting you here. I notice that both tools employ multi-objective genetic programming (MOGA) as the core repair algorithm for patch generation, where the first objective is the patch size, and the second is failure rate. Here I would like to ask a question: Would minimal patch size sacrifice the effectiveness of Arja and Arja-e? I am currently exploring next step of APR, during which I observed that many bugs in Defects4J, multi-hunk bugs in particular, always requires multiple edits. Therefore, if the patch size is limited, it might limit the ability of Arja(-e) to generate multi-edit patches according. Thus, I have such a doubt which I would like to present for your further guidance. It would be sincerely appreciated if any advice could be offered. Thank you!
When I use ARJAE, it saves patches in a pool directory, but not the repaired program with applied generated patches.
Is any option available in the ARJAE framework that saves a repaired program instead of saving patches? Insert patches manually into a program makes it difficult to use for large studies.
Hi @yyxhdy
I am trying to modify the source code of this tool to do some experiments.
But I find it cannot be imported as Existing projects in Eclipse since "No projects are found to import".
I'd like to know how to modify the code and build a .jar file. Could you please help me?
Hi,
During running this tool I get the following warning.
First I switched the java version of the system to java 1.7.0_80 and I followed the instruction in the read me. Then, I compiled a buggy toy program and its JUnit tests with Java 7. Then, I run the below code and you can see the result. (Also, when I do the whole process with Java8 I will get the same warning).
java -cp lib/*:bin us.msu.cse.repair.Main ArjaE -DsrcJavaDir /home/.../bug_test/src/main
-DbinJavaDir /home/.../bug_test/target/main
-DbinTestDir /home/.../bug_test/target/test
-Ddependences /home/a~/arja-arja-e/lib
Fault localization starts...
Number of positive tests: 10
Number of negative tests: 10
Fault localization is finished!
AST parsing starts...
AST parsing is finished!
Detection of local variables starts...
Detection of local variables is finished!
Detection of fields starts...
Detection of fields is finished!
Detection of methods starts...
Detection of methods is finished!
Ingredient screener starts...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at us.msu.cse.repair.core.util.Helper.isInSamePackage(Helper.java:392)
at us.msu.cse.repair.core.parser.ingredient.IngredientUtil.isInIngredientMode(IngredientUtil.java:477)
at us.msu.cse.repair.core.parser.ingredient.AbstractIngredientScreener.canPreFiltered(AbstractIngredientScreener.java:66)
at us.msu.cse.repair.core.parser.ingredient.DirectIngredientScreener2.screenIngredients(DirectIngredientScreener2.java:27)
at us.msu.cse.repair.core.parser.ingredient.AbstractIngredientScreener.screen(AbstractIngredientScreener.java:35)
at us.msu.cse.repair.core.parser.ingredient.AbstractIngredientScreener.screen(AbstractIngredientScreener.java:30)
at us.msu.cse.repair.core.AbstractRepairProblem.invokeIngredientScreener(AbstractRepairProblem.java:483)
at us.msu.cse.repair.ec.problems.ArjaEProblem.invokeModules(ArjaEProblem.java:85)
at us.msu.cse.repair.core.AbstractRepairProblem.(AbstractRepairProblem.java:271)
at us.msu.cse.repair.ec.problems.ArjaProblem.(ArjaProblem.java:43)
at us.msu.cse.repair.ec.problems.PareProblem.(PareProblem.java:39)
at us.msu.cse.repair.ec.problems.ArjaEProblem.(ArjaEProblem.java:29)
at us.msu.cse.repair.ArjaEMain.main(ArjaEMain.java:54)
at us.msu.cse.repair.Main.main(Main.java:8)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.