Skip to content

Commit 02ca5c5

Browse files
committed
Updates requested in the review.
1 parent 84cbc69 commit 02ca5c5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

driver/analyser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,14 @@ def run_search_for_error_traces(
228228
loc_info_file = os.path.abspath(os.path.join(results_dir, "..", "program_slicing", "map_from_functions_to_rule_application_sites.json"))
229229
loc_descriptions = generate_location_descriptions(loc_info_file)
230230
with open(os.path.join(results_dir, "location_descriptions.json"), "w") as descriptions_file:
231-
descriptions_file.write(json.dumps(loc_descriptions, sort_keys=True, indent=4))
231+
json.dump(loc_descriptions, descriptions_file, sort_keys=True, indent=4)
232232
for error_trace in traces_list:
233233
if error_trace["file"] in loc_descriptions:
234234
file_description = loc_descriptions[error_trace["file"]]
235235
if error_trace["line"] in file_description:
236236
file_line_description = file_description[error_trace["line"]]
237+
# When using CSVSA some functions get suffixed with "$spec_".
238+
# So, instead of equality check we use "startswith" check.
237239
if file_line_description["function"].startswith(error_trace["function"]):
238240
error_trace["message"] = file_line_description["message"]
239241
else:

driver/presentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def make_reduction_string(orig_value, reduced_value, add_percentage=True):
392392
ofile.write("</table>\n")
393393

394394

395-
def build_HTML_interface_to_group_of_error_traces(traces,tool_name,tgt_file,tgt_line,message,ofile):
395+
def build_HTML_interface_to_group_of_error_traces(traces, tool_name, tgt_file, tgt_line, message, ofile):
396396
ofile.write(get_html_prefix("Error traces " + tool_name))
397397

398398
ofile.write("<h1>Error traces found by " + tool_name + "</h1>\n")

0 commit comments

Comments
 (0)