Skip to content

Commit

Permalink
json info add
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahiatul Islam committed Apr 7, 2024
1 parent 1726631 commit 343e8fd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ def performEvaluation(issue_data) -> Result:
result = run_specimin(issue_id ,specimin_command, specimin_path)
print(f"{result.name} - {result.status}")

if not ("bug_type" in issue_data and issue_data["bug_type"]):
if result.status.lower() == "fail":
result.set_preservation_status("Minimization did not succeed.")
return result

build_system = issue_data.get("build_system", "gradle")
Expand Down
25 changes: 21 additions & 4 deletions resources/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,18 @@
"cf_version": "1.9.11",
"java_version": "8",
"note": "java.util.stream -> com.example.stream",
"bug_type": "",
"checker_qual_required": false
"bug_type": "error",
"bug_pattern": {
"file_pattern": "Compilation unit: (.*)",
"error_pattern": "error: (Incomparable types)",
"exception_pattern": "Exception: (.+);",
"stack_trace_pattern": "Stack trace: (.+)"
},
"build_system": "shell",
"build_flags": ["-processor", "nullness", "-AprintErrorStack"],
"build_targets": "src/**/*.java",
"cf_release_url": "https://github.com/typetools/checker-framework/releases/download",
"checker_qual_required": true
},
{
"issue_id" : "cf-3032",
Expand All @@ -250,7 +260,14 @@
"cf_version": "3.1.0",
"java_version": "11",
"note": "",
"bug_type": "",
"bug_type": "error",
"bug_pattern": {
"file_pattern": "(\\w+\\.java)",
"error_pattern": "error: \\[(.+?)\\]",
"source_pattern": "(.via\\(.*\\)\\);)",
"found_pattern": "found : (.*)",
"required_pattern": "required: (.*)"
},
"checker_qual_required": false
},
{
Expand Down Expand Up @@ -390,7 +407,7 @@
"exception_pattern": "Exception: (.+);",
"stack_trace_pattern": "Stack trace: (.+)"
},
"checker_qual_required": false,
"checker_qual_required": true,
"build_system": "shell",
"build_flags": ["-processor", "formatter", "-AprintErrorStack"],
"build_targets": "src/**/*.java",
Expand Down

0 comments on commit 343e8fd

Please sign in to comment.