-
Notifications
You must be signed in to change notification settings - Fork 3
/
evaluation.sh
50 lines (43 loc) · 2.2 KB
/
evaluation.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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
echo "ceate directory to store codebase"
# mkdi /Blinpy-app/evaluation_results/Bugzbook_codebases
cd /home/Blinpy-app/evaluation_results/splitted_reports/
# folder="jcr"
# while read -r line
# do
# cd /home/Blinpy-app/evaluation_results/Bugzbook_codebases/$folder
# ver=$(git rev-list --all -n 1 --before="$line|cut -d | -f 2")
# git reset --hard $ver
# cd /home/Blinpy-app/evaluation_results/splitted_reports/$folde
# bug=$(echo $line|cut -d "L" -f 1)
# python "/home/Blinpy-app/local.py" "/home/Blinpy-app" "/home/Blinpy-app/evaluation_results/splitted_reports/$folder/$bug""L" "/home/Blinpy-app/evaluation_results/Bugzbook_codebases/$folder"
# done < /home/Blinpy-app/evaluation_results/splitted_reports/$folder"/""id_time.txt"
# for folder in `ls $1`
# do {
# while read -r line
# do
# echo $folder
# cd /home/Blinpy-app/evaluation_results/Bugzbook_codebases/$folder
# ver=$(git rev-list --all -n 1 --before="$line|cut -d | -f 2")
# git reset --hard $ver
# cd /home/Blinpy-app/evaluation_results/splitted_reports/$folde
# bug=$(echo $line|cut -d "L" -f 1)
# python "/home/Blinpy-app/local.py" "/home/Blinpy-app" "/home/Blinpy-app/evaluation_results/splitted_reports/$folder/$bug""L" "/home/Blinpy-app/evaluation_results/Bugzbook_codebases/$folder"
# break
# done < /home/Blinpy-app/evaluation_results/splitted_reports/$folder"/""id_time.txt"
# }
# done
for folder in `ls $1`
do {
while read -r line
do
cd /home/Blinpy-app/evaluation_results/Bugzbook_codebases/$folder
ver=$(git rev-list --all -n 1 --before="$line|cut -d | -f 2")
git reset --hard $ver
cd /home/Blinpy-app/evaluation_results/splitted_reports/$folde
bug=$(echo $line|cut -d "L" -f 1)
python "/home/Blinpy-app/local.py" "/home/Blinpy-app" "/home/Blinpy-app/evaluation_results/splitted_reports/$folder/$bug""L" "/home/Blinpy-app/evaluation_results/Bugzbook_codebases/$folder"
done < /home/Blinpy-app/evaluation_results/splitted_reports/$folder"/""id_time.txt"
} > /home/Blinpy-app/evaluation_results/text_results/$folder".txt" &
done
# > /home/Blinpy-app/evaluation_results/text_results/$folder".txt" &