From d368e881fe52753057b5b2171c174e0514ef482f Mon Sep 17 00:00:00 2001 From: "C. Fuhrman" Date: Fri, 30 Jun 2023 14:23:09 -0400 Subject: [PATCH 1/4] Typo in docker image name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 182d3456dbdf727a5549c0b4796e0f6455a31447 Mon Sep 17 00:00:00 2001 From: "C. Fuhrman" Date: Fri, 30 Jun 2023 14:25:05 -0400 Subject: [PATCH 2/4] latest docker image openjdk --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0391ff3e3c7472cc189f4fd003e0705c60ecf004 Mon Sep 17 00:00:00 2001 From: "C. Fuhrman" Date: Fri, 30 Jun 2023 14:59:57 -0400 Subject: [PATCH 3/4] Add missing argument in the example --- doc/Docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ``` From c80f07c6f2ac869f5986c4e3488f87ff18437e0d Mon Sep 17 00:00:00 2001 From: "C. Fuhrman" Date: Fri, 30 Jun 2023 16:16:37 -0400 Subject: [PATCH 4/4] check required command line arguments --- fetch_jira_bugs/find_bug_fixes.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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))