We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Test result combination scripts can be removed
## Description

We have a couple of scripts for combining test results in CI that are no longer being used and can be deleted:
```
devops/scripts/combine-junit.py
devops/scripts/combine-junit-test-results.sh
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `devops/scripts/combine-junit.py`
Content:
```
1 #!/usr/bin/env python
2 #
3 #  Corey Goldberg, Dec 2012
4 #  Original source from gist.github.com/cgoldberg/4320815
5 
6 import os
7 import sys
8 import xml.etree.ElementTree as ET
9 
10 
11 """Merge multiple JUnit XML files into a single results file.
12 
13 Output dumps to sdtdout.
14 
15 example usage:
16     $ python merge_junit_results.py results1.xml results2.xml > results.xml
17 """
18 
19 
20 def main():
21     args = sys.argv[1:]
22     if not args:
23         usage()
24         sys.exit(2)
25     if '-h' in args or '--help' in args:
26         usage()
27         sys.exit(2)
28     merge_results(args[:])
29 
30 
31 def merge_results(xml_files):
32     failures = 0
33     tests = 0
34     errors = 0
35     time = 0.0
36     cases = []
37 
38     for file_name in xml_files:
39         # We disable bandit checking to permit B314, which recommends use
40         # of defusedxml to protect against malicious XML files. This code
41         # path only runs in CI, not on developer workstations, and the XML
42         # output is generated by testinfra on staging machines.
43         tree = ET.parse(file_name)  # nosec
44         test_suite = tree.getroot()
45         failures += int(test_suite.attrib['failures'])
46         tests += int(test_suite.attrib['tests'])
47         errors += int(test_suite.attrib['errors'])
48         time += float(test_suite.attrib['time'])
49         cases.append(test_suite.getchildren())
50 
51     new_root = ET.Element('testsuite')
52     new_root.attrib['failures'] = '%s' % failures
53     new_root.attrib['tests'] = '%s' % tests
54     new_root.attrib['errors'] = '%s' % errors
55     new_root.attrib['time'] = '%s' % time
56     for case in cases:
57         new_root.extend(case)
58     new_tree = ET.ElementTree(new_root)
59     ET.dump(new_tree)
60 
61 
62 def usage():
63     this_file = os.path.basename(__file__)
64     print('Usage:  %s results1.xml results2.xml' % this_file)
65 
66 
67 if __name__ == '__main__':
68     main()
69
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/devops/scripts/combine-junit.py b/devops/scripts/combine-junit.py
deleted file mode 100755
--- a/devops/scripts/combine-junit.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-#
-#  Corey Goldberg, Dec 2012
-#  Original source from gist.github.com/cgoldberg/4320815
-
-import os
-import sys
-import xml.etree.ElementTree as ET
-
-
-"""Merge multiple JUnit XML files into a single results file.
-
-Output dumps to sdtdout.
-
-example usage:
-    $ python merge_junit_results.py results1.xml results2.xml > results.xml
-"""
-
-
-def main():
-    args = sys.argv[1:]
-    if not args:
-        usage()
-        sys.exit(2)
-    if '-h' in args or '--help' in args:
-        usage()
-        sys.exit(2)
-    merge_results(args[:])
-
-
-def merge_results(xml_files):
-    failures = 0
-    tests = 0
-    errors = 0
-    time = 0.0
-    cases = []
-
-    for file_name in xml_files:
-        # We disable bandit checking to permit B314, which recommends use
-        # of defusedxml to protect against malicious XML files. This code
-        # path only runs in CI, not on developer workstations, and the XML
-        # output is generated by testinfra on staging machines.
-        tree = ET.parse(file_name)  # nosec
-        test_suite = tree.getroot()
-        failures += int(test_suite.attrib['failures'])
-        tests += int(test_suite.attrib['tests'])
-        errors += int(test_suite.attrib['errors'])
-        time += float(test_suite.attrib['time'])
-        cases.append(test_suite.getchildren())
-
-    new_root = ET.Element('testsuite')
-    new_root.attrib['failures'] = '%s' % failures
-    new_root.attrib['tests'] = '%s' % tests
-    new_root.attrib['errors'] = '%s' % errors
-    new_root.attrib['time'] = '%s' % time
-    for case in cases:
-        new_root.extend(case)
-    new_tree = ET.ElementTree(new_root)
-    ET.dump(new_tree)
-
-
-def usage():
-    this_file = os.path.basename(__file__)
-    print('Usage:  %s results1.xml results2.xml' % this_file)
-
-
-if __name__ == '__main__':
-    main()

{"golden_diff": "diff --git a/devops/scripts/combine-junit.py b/devops/scripts/combine-junit.py\ndeleted file mode 100755\n--- a/devops/scripts/combine-junit.py\n+++ /dev/null\n@@ -1,68 +0,0 @@\n-#!/usr/bin/env python\n-#\n-#  Corey Goldberg, Dec 2012\n-#  Original source from gist.github.com/cgoldberg/4320815\n-\n-import os\n-import sys\n-import xml.etree.ElementTree as ET\n-\n-\n-\"\"\"Merge multiple JUnit XML files into a single results file.\n-\n-Output dumps to sdtdout.\n-\n-example usage:\n-    $ python merge_junit_results.py results1.xml results2.xml > results.xml\n-\"\"\"\n-\n-\n-def main():\n-    args = sys.argv[1:]\n-    if not args:\n-        usage()\n-        sys.exit(2)\n-    if '-h' in args or '--help' in args:\n-        usage()\n-        sys.exit(2)\n-    merge_results(args[:])\n-\n-\n-def merge_results(xml_files):\n-    failures = 0\n-    tests = 0\n-    errors = 0\n-    time = 0.0\n-    cases = []\n-\n-    for file_name in xml_files:\n-        # We disable bandit checking to permit B314, which recommends use\n-        # of defusedxml to protect against malicious XML files. This code\n-        # path only runs in CI, not on developer workstations, and the XML\n-        # output is generated by testinfra on staging machines.\n-        tree = ET.parse(file_name)  # nosec\n-        test_suite = tree.getroot()\n-        failures += int(test_suite.attrib['failures'])\n-        tests += int(test_suite.attrib['tests'])\n-        errors += int(test_suite.attrib['errors'])\n-        time += float(test_suite.attrib['time'])\n-        cases.append(test_suite.getchildren())\n-\n-    new_root = ET.Element('testsuite')\n-    new_root.attrib['failures'] = '%s' % failures\n-    new_root.attrib['tests'] = '%s' % tests\n-    new_root.attrib['errors'] = '%s' % errors\n-    new_root.attrib['time'] = '%s' % time\n-    for case in cases:\n-        new_root.extend(case)\n-    new_tree = ET.ElementTree(new_root)\n-    ET.dump(new_tree)\n-\n-\n-def usage():\n-    this_file = os.path.basename(__file__)\n-    print('Usage:  %s results1.xml results2.xml' % this_file)\n-\n-\n-if __name__ == '__main__':\n-    main()\n", "issue": "Test result combination scripts can be removed\n## Description\r\n\r\nWe have a couple of scripts for combining test results in CI that are no longer being used and can be deleted:\r\n```\r\ndevops/scripts/combine-junit.py\r\ndevops/scripts/combine-junit-test-results.sh\r\n```\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n#\n#  Corey Goldberg, Dec 2012\n#  Original source from gist.github.com/cgoldberg/4320815\n\nimport os\nimport sys\nimport xml.etree.ElementTree as ET\n\n\n\"\"\"Merge multiple JUnit XML files into a single results file.\n\nOutput dumps to sdtdout.\n\nexample usage:\n    $ python merge_junit_results.py results1.xml results2.xml > results.xml\n\"\"\"\n\n\ndef main():\n    args = sys.argv[1:]\n    if not args:\n        usage()\n        sys.exit(2)\n    if '-h' in args or '--help' in args:\n        usage()\n        sys.exit(2)\n    merge_results(args[:])\n\n\ndef merge_results(xml_files):\n    failures = 0\n    tests = 0\n    errors = 0\n    time = 0.0\n    cases = []\n\n    for file_name in xml_files:\n        # We disable bandit checking to permit B314, which recommends use\n        # of defusedxml to protect against malicious XML files. This code\n        # path only runs in CI, not on developer workstations, and the XML\n        # output is generated by testinfra on staging machines.\n        tree = ET.parse(file_name)  # nosec\n        test_suite = tree.getroot()\n        failures += int(test_suite.attrib['failures'])\n        tests += int(test_suite.attrib['tests'])\n        errors += int(test_suite.attrib['errors'])\n        time += float(test_suite.attrib['time'])\n        cases.append(test_suite.getchildren())\n\n    new_root = ET.Element('testsuite')\n    new_root.attrib['failures'] = '%s' % failures\n    new_root.attrib['tests'] = '%s' % tests\n    new_root.attrib['errors'] = '%s' % errors\n    new_root.attrib['time'] = '%s' % time\n    for case in cases:\n        new_root.extend(case)\n    new_tree = ET.ElementTree(new_root)\n    ET.dump(new_tree)\n\n\ndef usage():\n    this_file = os.path.basename(__file__)\n    print('Usage:  %s results1.xml results2.xml' % this_file)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "devops/scripts/combine-junit.py"}], "after_files": [{"content": null, "path": "devops/scripts/combine-junit.py"}]}