forked from crossminer/FOCUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
54 lines (40 loc) · 2.25 KB
/
INSTALL
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
51
52
53
# Installation instructions
This file provides instructions to install and execute the tools for replicating the experiments of the paper entitled ``FOCUS: A Recommender System for Mining API Function Calls and Usage Patterns'' accepted in the Technical Track of ICSE 2019.
## Requirements
- Apache Maven >= 3.0
- Java >= 1.8
- (optional) Bash for running all evaluations automatically
## Instructions
FOCUS can be built using Apache Maven. To build FOCUS, navigate to the `tools/Focus/` directory and run the following command:
```
mvn clean install
```
To run the default evaluation (on the SH<sub>S</sub> dataset using the C1.1 configuration), run the following command:
```
mvn exec:java -Dexec.mainClass=org.focus.Runner
```
Or, alternatively, use the JAR that has been generated by the `install` command:
```
java -jar target/focus-0.0.1-SNAPSHOT-jar-with-dependencies.jar
```
FOCUS should print out the results (success rate, precision, recall) for different cut-off values N={1, 5, 10, 15, 20} directly in the console, e.g.:
```
2019-01-23 14:11:30 INFO Runner:159 - ### 10-FOLDS RESULTS ###
2019-01-23 14:11:30 INFO Runner:161 - successRate@1 = 17.5
2019-01-23 14:11:30 INFO Runner:162 - precision@1 = 0.175
2019-01-23 14:11:30 INFO Runner:163 - recall@1 = 0.024302756
2019-01-23 14:11:30 INFO Runner:161 - successRate@5 = 24.5
2019-01-23 14:11:30 INFO Runner:162 - precision@5 = 0.10599999
2019-01-23 14:11:30 INFO Runner:163 - recall@5 = 0.074120834
2019-01-23 14:11:30 INFO Runner:161 - successRate@10 = 28.5
2019-01-23 14:11:30 INFO Runner:162 - precision@10 = 0.075
2019-01-23 14:11:30 INFO Runner:163 - recall@10 = 0.1022442
2019-01-23 14:11:30 INFO Runner:161 - successRate@15 = 31.0
2019-01-23 14:11:30 INFO Runner:162 - precision@15 = 0.06033333
2019-01-23 14:11:30 INFO Runner:163 - recall@15 = 0.11802568
2019-01-23 14:11:30 INFO Runner:161 - successRate@20 = 32.5
2019-01-23 14:11:30 INFO Runner:162 - precision@20 = 0.05125
2019-01-23 14:11:30 INFO Runner:163 - recall@20 = 0.13033661
```
If you get similar results, FOCUS has been successfully installed and run!
More information about FOCUS, configuration files, and reproducing the results of the paper are available in the `tools/Focus/README.md` file.