forked from RiS3-Lab/FICS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_inconsistencies_of_java_programs_NN_G2v.sh
38 lines (33 loc) · 1.35 KB
/
get_inconsistencies_of_java_programs_NN_G2v.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
benchmark=$1
preprocess=$2
split=$3
if [ -z "${benchmark}" ]; then
echo "benchmark is unset or set to the empty string"
exit 1;
fi
if [ -z "${preprocess}" ]; then
echo "No preprocessing"
preprocess="np"
fi
if [ "${preprocess}" = "p" ]; then
datasets=$(cat ./settings.py | grep "DATASETS_DIR" | cut -d '=' -f 2 | cut -d '#' -f 1 | tr -d \'\" | tr -d '[:space:]')
bcs=$(cat ./settings.py | grep "BCS_DIR" | cut -d '=' -f 2 | cut -d '#' -f 1 | tr -d \'\" | tr -d '[:space:]')
data=$(cat ./settings.py | grep "DATA_DIR" | cut -d '=' -f 2 | cut -d '#' -f 1 | tr -d \'\" | tr -d '[:space:]')
echo "Removing dataset folder of $benchmark"
rm -rf "$data/$datasets/$benchmark"
echo "Removing IR folder of $benchmark"
rm -rf "$data/$bcs/$benchmark"
python __init__.py -p=$benchmark -a=JAVABC
python __init__.py -p=$benchmark -a=PDG
python __init__.py -p=$benchmark -a=AS
if [ "${split}" = "ns" ]; then
python __init__.py -p=$benchmark -a=FE -ft=afs_NN
python __init__.py -p=$benchmark -a=FE -ft=afs.bb1_NN
else
python __init__.py -p=$benchmark -a=FE -ft=afs_NN -s=True
python __init__.py -p=$benchmark -a=FE -ft=afs.bb1_NN -s=True
fi
fi
python __init__.py -p=$benchmark -a=MC -cf=afs_NN,afs_G2v -ca=cc_0.95,cc_0.98 -sc=online
python __init__.py -p=$benchmark -a=MC -cf=afs.bb1_NN,afs.bb1_G2v -ca=cc_0.95,cc_0.98 -sc=online