A new bug in the new version?
Hi everyone, I cloned the repository yesterday and succeeded in running in Quixbugs benchmark. However, when I try to run in Defects4J benchmark, there is an error like:
Traceback (most recent call last):
File "/home/wp/RepairThemAll/script/core/runner/local/LocalRunner.py", line 41, in run
task.run()
File "/home/wp/RepairThemAll/script/core/runner/RepairTask.py", line 30, in run
return self.tool.repair(self)
File "/home/wp/RepairThemAll/script/core/repair_tools/Astor.py", line 48, in repair
classpath = bug.classpath()
File "/home/wp/RepairThemAll/script/core/Bug.py", line 59, in classpath
return self.benchmark.classpath(self)
File "/home/wp/RepairThemAll/script/core/benchmarks/Defects4J.py", line 184, in classpath
libs_split = subprocess.check_output(cmd, shell=True, stderr=FNULL).split(":")
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command 'export PATH="/usr/java/jdk1.7.0_80/bin/:/home/wp/RepairThemAll/script/../benchmarks/defects4j/framework/bin:$PATH";export JAVA_HOME="/usr/java/jdk1.7.0_80/bin/..";
cd /tmp/jKali_Defects4J_Math_48;
defects4j export -p cp.test 2> /dev/null;
' returned non-zero exit status 2
Seems that this is a new bug after you updated the files last week.
Traceback (most recent call last):
File "/home/wp/RepairThemAll/script/core/runner/local/LocalRunner.py", line 41, in run
task.run()
File "/home/wp/RepairThemAll/script/core/runner/RepairTask.py", line 30, in run
return self.tool.repair(self)
File "/home/wp/RepairThemAll/script/core/repair_tools/Arja.py", line 99, in repair
for d in os.listdir(bug_path):
OSError: [Errno 2] No such file or directory: '/tmp/Arja_Defects4J_Closure_131'
Both ARJA system and Astor system contain this bug. Seems that it can not clone the buggy project?
It is a problem with the configuration of Defects4j.
Can you go to your benchmarks/defects4j and run ./init.sh?
Java7 need to be used.
I am facing the same issue in Mac OS, and I just changed https://github.com/program-repair/RepairThemAll/blob/master/script/config.py#L13 like bellow
JAVA7_HOME = expanduser("/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/")
JAVA8_HOME = expanduser("/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/bin/")
command is
python script/repair.py Nopol --benchmark Defects4J
when I run a export, cd defects4j command error message is bellow
% export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/..";
cd /private/tmp/Nopol_Defects4J_Chart_5;
defects4j export -p cp.test 2> /dev/null;
cd: no such file or directory: /private/tmp/Nopol_Defects4J_Chart_5
Did you run the init.sh script?
Yes, I run the ./init.sh and benchmarks/defects4j/init.sh.
I clone again, and maybe I found one of the causes
$ git clone --recursive https://github.com/program-repair/RepairThemAll.git
...
Submodule path 'benchmarks/bears': checked out 'c637bf555ff3a9b5abb1ca219dabd6e1113ef581'
fatal: No url found for submodule path 'benchmarks/bears/src/test/resources/shift-parser-expectations' in .gitmodules
Submodule path 'benchmarks/defects4j': checked out 'fcf6b9bb030e0f5f03ebab112eb4d4b622f2f315'
Submodule path 'libs/z3': checked out 'b02c69828419e792c67876f7beecfabe73196aac'
Failed to recurse into submodule path 'benchmarks/bears'
It looks the same with #21 1 issue.
By these errors, other clonings and ./init.sh maybe not completed.
Actually, Bear links are not connected.
I update the submodule of bears, could you try to clone again the repository?
Thanks
Thank you for your quick fix! I will try now!
- [x] cloning
- [x] ./init.sh
- [x] script/repair.py
Cloning looks succeeded, but script/repair.py still shows the same error.
I will try to find the causes.
what is your version of Perl?
It is 5.30.0
% perl -version
This is perl 5, version 30, subversion 0 (v5.30.0) built for darwin-thread-multi-2level
Copyright 1987-2019, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
./init.sh looks worked well too.
I think this issue is occurred by my environment problem.
Could you tell me which source code file will generate /private/tmp/Nopol_Defects4J_Chart_5? I want to edit or check them.
It should be good. the problem is related to the checkout of a bug. And we use directly defects4j.
Could you try:
defects4j checkout -p Chart -v 5b -w /tmp/Nopol_Defects4J_Chart_5
Thank for your kind reply.
export PATH=$PATH:"path2defects4j"/framework/bin
defects4j checkout -p Chart -v 5b -w /tmp/Nopol_Defects4J_Chart_5
And it is failed cause of perl package maneger. output is
Can't locate DBI.pm in @INC (you may need to install the DBI module) (@INC contains: /Users/yuki-ud/Documents/Source/bench_mark/RepairThemAll/benchmarks/defects4j/framework/lib /Users/yuki-ud/Documents/Source/bench_mark/RepairThemAll/benchmarks/defects4j/framework /Users/yuki-ud/Documents/Source/bench_mark/RepairThemAll/benchmarks/defects4j/framework/core /Users/yuki-ud/Documents/Source/bench_mark/RepairThemAll/benchmarks/defects4j/framework/core /usr/local/Cellar/perl/5.30.0/lib/perl5/site_perl/5.30.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.30.0/lib/perl5/site_perl/5.30.0 /usr/local/Cellar/perl/5.30.0/lib/perl5/5.30.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.30.0/lib/perl5/5.30.0 /usr/local/lib/perl5/site_perl/5.30.0/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.30.0) at /Users/yuki-ud/Documents/Source/bench_mark/RepairThemAll/benchmarks/defects4j/framework/core/DB.pm line 43.
It looks https://github.com/rjust/defects4j/issues/169 issue, and it looks already solved. I am reading and tring to fix my environment.
You can check this: https://stackoverflow.com/questions/20568836/cant-locate-dbi-pm
I also added a check in init.sh to verify that DBI is installed. The next user should receive a clear error message.
Thanks for the feedback!
Great, script/repair.py is succeeded!! Thank you for your great support!
I put the my command for future Mac OS user.
perl -MCPAN -e shell
cpan[1]> install DBI