Skip to content

Commit 698ecdf

Browse files
Pranita SharmaPranita Sharma
authored andcommitted
Added automation script
1 parent 224ef87 commit 698ecdf

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.DS_Store

-2 KB
Binary file not shown.

automation/automate.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import os
2+
import sys
3+
4+
project_id = sys.argv[1]
5+
defect_id = sys.argv[2]
6+
javaPath_1 = "/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
7+
javaPath_2 = "/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home"
8+
9+
#os.system("export D4J_HOME=/Users/pranita/Downloads/Program_Repair/defects4j")
10+
os.environ['D4J_HOME'] = "/Users/pranita/Downloads/Program_Repair/defects4j"
11+
os.environ['GZOLTAR_JAR'] = "/Users/pranita/Downloads/Program_Repair/fault-localization-data/gzoltar/gzoltar.jar"
12+
os.environ['PATH'] += os.pathsep+"/Users/pranita/Downloads/Program_Repair/defects4j/framework/bin"
13+
os.environ['SLOC_HOME']="/usr/local/bin/sloccount"
14+
15+
#ignored - bash get_fixed_lines.sh Lang 37 .
16+
17+
file_path = sys.argv[3]
18+
if not os.path.exists(file_path):
19+
os.makedirs(file_path)
20+
21+
checkout_command = "defects4j checkout -p "+project_id+" -v "+defect_id+"b -w "+file_path+"/"+defect_id
22+
23+
#Checkout Project with Bug ID
24+
25+
os.system(checkout_command)
26+
27+
28+
29+
30+
31+
32+
#Project name
33+
#bug ID
34+
#workspace
35+

0 commit comments

Comments
 (0)