Forráskód Böngészése

Updated README.md and examples with the new parameter in find_bug_fixes.py

ossv 5 éve
szülő
commit
a13c440a03
2 módosított fájl, 9 hozzáadás és 2 törlés
  1. 1 1
      code/README.md
  2. 8 1
      code/examples/FindBugFixes.md

+ 1 - 1
code/README.md

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

+ 8 - 1
code/examples/FindBugFixes.md

@@ -6,8 +6,15 @@ Start by locating the *issues* directory, the one produced in the [Fetch](Fetch.
 
 Second, locate the **gitlog.json** that was produced in the [GitLogToArray](GitLogToArray.md) example. Then provide these to the **find_bug_fixes.py** script.
 
+Lastly, identify how a bug fix looks like in a commit. The matching string for the Jenkins project looks like:
+
+```python
+pattern = r'JENKINS-{nbr}\D|#{nbr}\D|HUDSON-{nbr}\D'
+```
+The script will try to find the pattern in each commit and then decide if it's a fixing commit or not.
+
 ```bash
-python find_bug_fixes.py --gitlog <path_to_gitlog>/gitlog.json --issue-list <path_to_issues>/issues
+python find_bug_fixes.py --gitlog <path_to_gitlog>/gitlog.json --issue-list <path_to_issues>/issues --gitlog-pattern "<fix_pattern>"
 ```
 
 In this example, one can use the results in [examples/data](./data) directory.