diff --git a/Dockerfile b/Dockerfile index 692609d..66df25a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM java:8-jdk-alpine +FROM openjdk:8-jdk-alpine RUN apk add --no-cache --update python3 git diff --git a/README.md b/README.md index 2935e77..455a2b0 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ A more thorough instruction in using Docker to produce the results can be found There exists 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 . +docker build -t szz . ``` Then start a temporary docker container: diff --git a/doc/Docker.md b/doc/Docker.md index 8606edf..360362c 100644 --- a/doc/Docker.md +++ b/doc/Docker.md @@ -28,7 +28,7 @@ docker run -it --name ssz_con szz ash cd /root/fetch_jira_bugs python3 fetch.py --issue-code JENKINS --jira-project issues.jenkins-ci.org python3 git_log_to_array.py --repo-path ../jenkins --from-commit 02d6908ada70fcf8012833ddef628bc09c6f8389 -python3 find_bug_fixes.py --gitlog ./gitlog.json --issue-list ./issues +python3 find_bug_fixes.py --gitlog ./gitlog.json --issue-list ./issues --gitlog-pattern "JENKINS-{nbr}\D|#{nbr}\D|HUDSON-{nbr}\D" cd /root/szz java -jar ./build/libs/szz_find_bug_introducers-0.1.jar -i ../fetch_jira_bugs/issue_list.json -r ../jenkins ``` diff --git a/fetch_jira_bugs/find_bug_fixes.py b/fetch_jira_bugs/find_bug_fixes.py index e532336..a23a0b4 100644 --- a/fetch_jira_bugs/find_bug_fixes.py +++ b/fetch_jira_bugs/find_bug_fixes.py @@ -99,13 +99,19 @@ def main(): the issue directory is created and populated using the fetch.py script.""") parser.add_argument('--gitlog', type=str, - help='Path to json file containing gitlog') + help='Path to json file containing gitlog', + required = True) parser.add_argument('--issue-list', type=str, - help='Path to directory containing issue json files') + help='Path to directory containing issue json files', + required = True) parser.add_argument('--gitlog-pattern', type=str, - help='Pattern to match a bugfix') + help='Pattern to match a bugfix', + required = True) args = parser.parse_args() + # display gitlog_pattern to the console + print('Confirming gitlog_pattern: ' + args.gitlog_pattern) + issue_list = find_bug_fixes(args.issue_list, args.gitlog, args.gitlog_pattern) with open('issue_list.json', 'w') as f: f.write(json.dumps(issue_list))