prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Move/publish reports of experimental experiments under fuzzbench.com/reports/experimental
  Experimental experiments are experiments with fuzzers not in this list:
  https://github.com/google/fuzzbench/blob/master/service/core-fuzzers.yaml
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `experiment/reporter.py`
  Content:
  ```
  1 #!/usr/bin/env python3
  2 # Copyright 2020 Google LLC
  3 #
  4 # Licensed under the Apache License, Version 2.0 (the "License");
  5 # you may not use this file except in compliance with the License.
  6 # You may obtain a copy of the License at
  7 #
  8 #      http://www.apache.org/licenses/LICENSE-2.0
  9 #
  10 # Unless required by applicable law or agreed to in writing, software
  11 # distributed under the License is distributed on an "AS IS" BASIS,
  12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 # See the License for the specific language governing permissions and
  14 # limitations under the License.
  15 """A module containing the interface used by an experiment for generating
  16 reports."""
  17 import os
  18 import posixpath
  19 
  20 from common import experiment_utils
  21 from common import experiment_path as exp_path
  22 from common import filesystem
  23 from common import filestore_utils
  24 from common import logs
  25 from common import yaml_utils
  26 from analysis import generate_report
  27 from analysis import data_utils
  28 
  29 CORE_FUZZERS_YAML = os.path.join(os.path.dirname(__file__), '..', 'service',
  30                                  'core-fuzzers.yaml')
  31 
  32 logger = logs.Logger('reporter')  # pylint: disable=invalid-name
  33 
  34 
  35 def get_reports_dir():
  36     """Return reports directory."""
  37     return exp_path.path('reports')
  38 
  39 
  40 def output_report(experiment_config: dict,
  41                   in_progress=False,
  42                   coverage_report=False):
  43     """Generate the HTML report and write it to |web_bucket|."""
  44     experiment_name = experiment_utils.get_experiment_name()
  45     web_filestore_path = posixpath.join(experiment_config['report_filestore'],
  46                                         experiment_name)
  47 
  48     reports_dir = get_reports_dir()
  49 
  50     core_fuzzers = yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']
  51     fuzzers = sorted(set(experiment_config['fuzzers']).union(set(core_fuzzers)))
  52 
  53     # Don't merge with nonprivate experiments until the very end as doing it
  54     # while the experiment is in progress will produce unusable realtime
  55     # results.
  56     merge_with_nonprivate = (not in_progress and experiment_config.get(
  57         'merge_with_nonprivate', False))
  58 
  59     try:
  60         logger.debug('Generating report.')
  61         filesystem.recreate_directory(reports_dir)
  62         generate_report.generate_report(
  63             [experiment_name],
  64             str(reports_dir),
  65             report_name=experiment_name,
  66             fuzzers=fuzzers,
  67             in_progress=in_progress,
  68             merge_with_clobber_nonprivate=merge_with_nonprivate,
  69             coverage_report=coverage_report)
  70         filestore_utils.rsync(
  71             str(reports_dir),
  72             web_filestore_path,
  73             delete=False,  # Don't remove existing coverage jsons.
  74             gsutil_options=[
  75                 '-h', 'Cache-Control:public,max-age=0,no-transform'
  76             ])
  77         logger.debug('Done generating report.')
  78     except data_utils.EmptyDataError:
  79         logs.warning('No snapshot data.')
  80     except Exception:  # pylint: disable=broad-except
  81         logger.error('Error generating HTML report.')
  82
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/experiment/reporter.py b/experiment/reporter.py
  --- a/experiment/reporter.py
  +++ b/experiment/reporter.py
  @@ -26,8 +26,9 @@
   from analysis import generate_report
   from analysis import data_utils
   
  -CORE_FUZZERS_YAML = os.path.join(os.path.dirname(__file__), '..', 'service',
  -                                 'core-fuzzers.yaml')
  +CORE_FUZZERS_YAML = os.path.abspath(
  +    os.path.join(os.path.dirname(__file__), '..', 'service',
  +                 'core-fuzzers.yaml'))
   
   logger = logs.Logger('reporter')  # pylint: disable=invalid-name
   
  @@ -37,18 +38,29 @@
       return exp_path.path('reports')
   
   
  +def get_core_fuzzers():
  +    """Return list of core fuzzers to be used for merging experiment data."""
  +    return yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']
  +
  +
   def output_report(experiment_config: dict,
                     in_progress=False,
                     coverage_report=False):
       """Generate the HTML report and write it to |web_bucket|."""
       experiment_name = experiment_utils.get_experiment_name()
  -    web_filestore_path = posixpath.join(experiment_config['report_filestore'],
  -                                        experiment_name)
  -
       reports_dir = get_reports_dir()
   
  -    core_fuzzers = yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']
  -    fuzzers = sorted(set(experiment_config['fuzzers']).union(set(core_fuzzers)))
  +    core_fuzzers = set(get_core_fuzzers())
  +    experiment_fuzzers = set(experiment_config['fuzzers'])
  +    fuzzers = experiment_fuzzers.union(core_fuzzers)
  +
  +    # Calculate path to store report files in filestore.
  +    web_filestore_path = experiment_config['report_filestore']
  +    if not fuzzers.issubset(core_fuzzers):
  +        # This means that we are running an experimental report with fuzzers
  +        # not in the core list. So, store these in |experimental| sub-directory.
  +        web_filestore_path = os.path.join(web_filestore_path, 'experimental')
  +    web_filestore_path = posixpath.join(web_filestore_path, experiment_name)
   
       # Don't merge with nonprivate experiments until the very end as doing it
       # while the experiment is in progress will produce unusable realtime
  
verification_info: {"golden_diff": "diff --git a/experiment/reporter.py b/experiment/reporter.py\n--- a/experiment/reporter.py\n+++ b/experiment/reporter.py\n@@ -26,8 +26,9 @@\n from analysis import generate_report\n from analysis import data_utils\n \n-CORE_FUZZERS_YAML = os.path.join(os.path.dirname(__file__), '..', 'service',\n-                                 'core-fuzzers.yaml')\n+CORE_FUZZERS_YAML = os.path.abspath(\n+    os.path.join(os.path.dirname(__file__), '..', 'service',\n+                 'core-fuzzers.yaml'))\n \n logger = logs.Logger('reporter')  # pylint: disable=invalid-name\n \n@@ -37,18 +38,29 @@\n     return exp_path.path('reports')\n \n \n+def get_core_fuzzers():\n+    \"\"\"Return list of core fuzzers to be used for merging experiment data.\"\"\"\n+    return yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']\n+\n+\n def output_report(experiment_config: dict,\n                   in_progress=False,\n                   coverage_report=False):\n     \"\"\"Generate the HTML report and write it to |web_bucket|.\"\"\"\n     experiment_name = experiment_utils.get_experiment_name()\n-    web_filestore_path = posixpath.join(experiment_config['report_filestore'],\n-                                        experiment_name)\n-\n     reports_dir = get_reports_dir()\n \n-    core_fuzzers = yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']\n-    fuzzers = sorted(set(experiment_config['fuzzers']).union(set(core_fuzzers)))\n+    core_fuzzers = set(get_core_fuzzers())\n+    experiment_fuzzers = set(experiment_config['fuzzers'])\n+    fuzzers = experiment_fuzzers.union(core_fuzzers)\n+\n+    # Calculate path to store report files in filestore.\n+    web_filestore_path = experiment_config['report_filestore']\n+    if not fuzzers.issubset(core_fuzzers):\n+        # This means that we are running an experimental report with fuzzers\n+        # not in the core list. So, store these in |experimental| sub-directory.\n+        web_filestore_path = os.path.join(web_filestore_path, 'experimental')\n+    web_filestore_path = posixpath.join(web_filestore_path, experiment_name)\n \n     # Don't merge with nonprivate experiments until the very end as doing it\n     # while the experiment is in progress will produce unusable realtime\n", "issue": "Move/publish reports of experimental experiments under fuzzbench.com/reports/experimental\nExperimental experiments are experiments with fuzzers not in this list:\r\nhttps://github.com/google/fuzzbench/blob/master/service/core-fuzzers.yaml\n", "before_files": [{"content": "#!/usr/bin/env python3\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"A module containing the interface used by an experiment for generating\nreports.\"\"\"\nimport os\nimport posixpath\n\nfrom common import experiment_utils\nfrom common import experiment_path as exp_path\nfrom common import filesystem\nfrom common import filestore_utils\nfrom common import logs\nfrom common import yaml_utils\nfrom analysis import generate_report\nfrom analysis import data_utils\n\nCORE_FUZZERS_YAML = os.path.join(os.path.dirname(__file__), '..', 'service',\n                                 'core-fuzzers.yaml')\n\nlogger = logs.Logger('reporter')  # pylint: disable=invalid-name\n\n\ndef get_reports_dir():\n    \"\"\"Return reports directory.\"\"\"\n    return exp_path.path('reports')\n\n\ndef output_report(experiment_config: dict,\n                  in_progress=False,\n                  coverage_report=False):\n    \"\"\"Generate the HTML report and write it to |web_bucket|.\"\"\"\n    experiment_name = experiment_utils.get_experiment_name()\n    web_filestore_path = posixpath.join(experiment_config['report_filestore'],\n                                        experiment_name)\n\n    reports_dir = get_reports_dir()\n\n    core_fuzzers = yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']\n    fuzzers = sorted(set(experiment_config['fuzzers']).union(set(core_fuzzers)))\n\n    # Don't merge with nonprivate experiments until the very end as doing it\n    # while the experiment is in progress will produce unusable realtime\n    # results.\n    merge_with_nonprivate = (not in_progress and experiment_config.get(\n        'merge_with_nonprivate', False))\n\n    try:\n        logger.debug('Generating report.')\n        filesystem.recreate_directory(reports_dir)\n        generate_report.generate_report(\n            [experiment_name],\n            str(reports_dir),\n            report_name=experiment_name,\n            fuzzers=fuzzers,\n            in_progress=in_progress,\n            merge_with_clobber_nonprivate=merge_with_nonprivate,\n            coverage_report=coverage_report)\n        filestore_utils.rsync(\n            str(reports_dir),\n            web_filestore_path,\n            delete=False,  # Don't remove existing coverage jsons.\n            gsutil_options=[\n                '-h', 'Cache-Control:public,max-age=0,no-transform'\n            ])\n        logger.debug('Done generating report.')\n    except data_utils.EmptyDataError:\n        logs.warning('No snapshot data.')\n    except Exception:  # pylint: disable=broad-except\n        logger.error('Error generating HTML report.')\n", "path": "experiment/reporter.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"A module containing the interface used by an experiment for generating\nreports.\"\"\"\nimport os\nimport posixpath\n\nfrom common import experiment_utils\nfrom common import experiment_path as exp_path\nfrom common import filesystem\nfrom common import filestore_utils\nfrom common import logs\nfrom common import yaml_utils\nfrom analysis import generate_report\nfrom analysis import data_utils\n\nCORE_FUZZERS_YAML = os.path.abspath(\n    os.path.join(os.path.dirname(__file__), '..', 'service',\n                 'core-fuzzers.yaml'))\n\nlogger = logs.Logger('reporter')  # pylint: disable=invalid-name\n\n\ndef get_reports_dir():\n    \"\"\"Return reports directory.\"\"\"\n    return exp_path.path('reports')\n\n\ndef get_core_fuzzers():\n    \"\"\"Return list of core fuzzers to be used for merging experiment data.\"\"\"\n    return yaml_utils.read(CORE_FUZZERS_YAML)['fuzzers']\n\n\ndef output_report(experiment_config: dict,\n                  in_progress=False,\n                  coverage_report=False):\n    \"\"\"Generate the HTML report and write it to |web_bucket|.\"\"\"\n    experiment_name = experiment_utils.get_experiment_name()\n    reports_dir = get_reports_dir()\n\n    core_fuzzers = set(get_core_fuzzers())\n    experiment_fuzzers = set(experiment_config['fuzzers'])\n    fuzzers = experiment_fuzzers.union(core_fuzzers)\n\n    # Calculate path to store report files in filestore.\n    web_filestore_path = experiment_config['report_filestore']\n    if not fuzzers.issubset(core_fuzzers):\n        # This means that we are running an experimental report with fuzzers\n        # not in the core list. So, store these in |experimental| sub-directory.\n        web_filestore_path = os.path.join(web_filestore_path, 'experimental')\n    web_filestore_path = posixpath.join(web_filestore_path, experiment_name)\n\n    # Don't merge with nonprivate experiments until the very end as doing it\n    # while the experiment is in progress will produce unusable realtime\n    # results.\n    merge_with_nonprivate = (not in_progress and experiment_config.get(\n        'merge_with_nonprivate', False))\n\n    try:\n        logger.debug('Generating report.')\n        filesystem.recreate_directory(reports_dir)\n        generate_report.generate_report(\n            [experiment_name],\n            str(reports_dir),\n            report_name=experiment_name,\n            fuzzers=fuzzers,\n            in_progress=in_progress,\n            merge_with_clobber_nonprivate=merge_with_nonprivate,\n            coverage_report=coverage_report)\n        filestore_utils.rsync(\n            str(reports_dir),\n            web_filestore_path,\n            delete=False,  # Don't remove existing coverage jsons.\n            gsutil_options=[\n                '-h', 'Cache-Control:public,max-age=0,no-transform'\n            ])\n        logger.debug('Done generating report.')\n    except data_utils.EmptyDataError:\n        logs.warning('No snapshot data.')\n    except Exception:  # pylint: disable=broad-except\n        logger.error('Error generating HTML report.')\n", "path": "experiment/reporter.py"}]}