Skip to content

Commit 73f17b8

Browse files
author
ossv
committed
Updated README.md and examples with the new parameter in find_bug_fixes.py
1 parent 6ba87ff commit 73f17b8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ An example of this script and what it produces can be found [in the examples](./
5252
Now using the `find_bug_fixes.py` (see 3 in the [figure](#workflow)) and this file, we can get a json file
5353
that contains the Issue and its corresponding commit SHA-1, the commit date, the creation date and the resolution date. Just run:
5454
```python
55-
python find_bug_fixes.py --gitlog <path_to_gitlog_file> --issue-list <path_to_issues_directory>
55+
python find_bug_fixes.py --gitlog <path_to_gitlog_file> --issue-list <path_to_issues_directory> --gitlog-pattern "<a_pattern_for_matching_fixes>"
5656
```
5757
The output is `issue_list.json` which is later used in the SZZ algorithm.
5858

examples/FindBugFixes.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ Start by locating the *issues* directory, the one produced in the [Fetch](Fetch.
66

77
Second, locate the **gitlog.json** that was produced in the [GitLogToArray](GitLogToArray.md) example. Then provide these to the **find_bug_fixes.py** script.
88

9+
Lastly, identify how a bug fix looks like in a commit. The matching string for the Jenkins project looks like:
10+
11+
```python
12+
pattern = r'JENKINS-{nbr}\D|#{nbr}\D|HUDSON-{nbr}\D'
13+
```
14+
The script will try to find the pattern in each commit and then decide if it's a fixing commit or not.
15+
916
```bash
10-
python find_bug_fixes.py --gitlog <path_to_gitlog>/gitlog.json --issue-list <path_to_issues>/issues
17+
python find_bug_fixes.py --gitlog <path_to_gitlog>/gitlog.json --issue-list <path_to_issues>/issues --gitlog-pattern "<fix_pattern>"
1118
```
1219

1320
In this example, one can use the results in [examples/data](./data) directory.

0 commit comments

Comments
 (0)