Browse Source

Update README with sections and a section about Docker

ossv 6 years ago
parent
commit
e89b98f2f2
1 changed files with 35 additions and 3 deletions
  1. 35 3
      code/README.md

+ 35 - 3
code/README.md

@@ -15,7 +15,15 @@ The bug-introducing commits can be extracted either from a bug tracking system s
   
 All scripts and compilations has been tested on Linux and Mac.
 
-## Usage SZZ algorithm
+To use docker, one needs Docker installed as well.
+
+# Table of Contents
+1. [Usage SZZ algorithm](#szz_usage)
+2. [SZZ with Docker](#szz_docker)
+3. [Feature Extraction](#feat_extract)
+4. [Authors](#authors)
+
+## Usage SZZ algorithm <a name="szz_usage"></a>
 
 ### Grab issues ###
 To get issues one needs a bug tracking system. As an example the project Jenkins uses [JIRA](https://issues.jenkins-ci.org).
@@ -87,7 +95,31 @@ way and it includes duplicates when it comes to both introducers and fixes. A
 fix can be made several times and a introducer could be responsible for many
 fixes.
 
-## Feature Extraction ##
+## Use Docker to generate fix_and_bug_introducing_pairs.json. <a name="szz_docker"></a>
+
+There exist a *Dockerfile* in the repository. It contains all the steps in chronological order that is needed to generate the **fix\_and\_bug\_introducing\_pairs.json**. Simply run this command in the directory where the Dockerfile is located:
+
+```bash
+docker build -t ssz .
+```
+
+Then start a temporary docker container:
+```bash
+docker run -it --name szz_con szz ash
+```
+In this container it is possible to study the results from the algorithm. The results are located in */root/szz/results*.
+
+Lastly, to copy the results from the container to your own computer run:
+```bash
+docker cp szz_con:/root/szz/results .
+```
+
+Note that the temporary container must be running while the *docker cp* command is executed. To be sure, check that the *szz_con* is listed when running:
+```bash
+docker ps
+```
+
+## Feature Extraction <a name="feat_extract"></a>
 Now that the potential bug-introducing commits has been identified, the
 repository can be mined for features.
 
@@ -188,7 +220,7 @@ be made. To do this, simply run the model script in the model directory:
 python model.py train
 ```
 
-## Authors
+## Authors <a name="authors"></a>
 
 [Oscar Svensson](mailto:wgcp92@gmail.com)
 [Kristian Berg](mailto:kristianberg.jobb@gmail.com)