Update
Browse files
app.py
CHANGED
@@ -45,6 +45,7 @@ except Exception:
|
|
45 |
total_issues = dataset.num_rows["test"]
|
46 |
bug_id_to_time = dict()
|
47 |
bug_id_to_type = dict()
|
|
|
48 |
bug_id_by_cat = {
|
49 |
"crash": [],
|
50 |
"miscompilation": [],
|
@@ -61,6 +62,7 @@ for issue in dataset["test"]:
|
|
61 |
for comp in issue["hints"]["components"]:
|
62 |
comp_bug_count[comp] = comp_bug_count.get(comp, 0) + 1
|
63 |
bug_id_to_title[issue["bug_id"]] = "Issue " + issue["bug_id"] + ": " + issue["issue"]["title"]
|
|
|
64 |
timeline_xs = []
|
65 |
timeline_ys = []
|
66 |
timeline_cols = []
|
@@ -211,11 +213,7 @@ with demo:
|
|
211 |
inspect_issue = gr.Dropdown(fixed_bug_title_id_pairs, label="Inspct Issue", interactive=True)
|
212 |
golden_patch = gr.Code("", language="cpp", label="Golden Patch")
|
213 |
inspect_issue.change(
|
214 |
-
fn=lambda bug_id: (
|
215 |
-
dataset["test"][bug_id]["patch"]
|
216 |
-
if bug_id in dataset["test"]
|
217 |
-
else f"Not Available (bug_id = {bug_id})"
|
218 |
-
),
|
219 |
inputs=inspect_issue,
|
220 |
outputs=golden_patch,
|
221 |
)
|
|
|
45 |
total_issues = dataset.num_rows["test"]
|
46 |
bug_id_to_time = dict()
|
47 |
bug_id_to_type = dict()
|
48 |
+
bug_id_to_patch = dict()
|
49 |
bug_id_by_cat = {
|
50 |
"crash": [],
|
51 |
"miscompilation": [],
|
|
|
62 |
for comp in issue["hints"]["components"]:
|
63 |
comp_bug_count[comp] = comp_bug_count.get(comp, 0) + 1
|
64 |
bug_id_to_title[issue["bug_id"]] = "Issue " + issue["bug_id"] + ": " + issue["issue"]["title"]
|
65 |
+
bug_id_to_patch[issue["bug_id"]] = issue["patch"]
|
66 |
timeline_xs = []
|
67 |
timeline_ys = []
|
68 |
timeline_cols = []
|
|
|
213 |
inspect_issue = gr.Dropdown(fixed_bug_title_id_pairs, label="Inspct Issue", interactive=True)
|
214 |
golden_patch = gr.Code("", language="cpp", label="Golden Patch")
|
215 |
inspect_issue.change(
|
216 |
+
fn=lambda bug_id: bug_id_to_patch.get(bug_id, f"Not Available (bug_id = {bug_id})"),
|
|
|
|
|
|
|
|
|
217 |
inputs=inspect_issue,
|
218 |
outputs=golden_patch,
|
219 |
)
|