parameters: (output_dir, prefix)
return_statement: return name
docstring: Creates a fragment from the analyzer reports.
docstring_summary: Creates a fragment from the analyzer reports.
docstring_tokens: Creates a fragment from the analyzer reports .
function: def bug_report(output_dir, prefix):
      """ Creates a fragment from the analyzer reports. """
  
      pretty = prettify_bug(prefix, output_dir)
      bugs = (pretty(bug) for bug in read_bugs(output_dir, True))
  
      name = os.path.join(output_dir, 'bugs.html.fragment')
      with open(name, 'w') as handle:
          indent = 4
          handle.write(reindent("""
          |<h2>Reports</h2>
          |<table class="sortable" style="table-layout:automatic">
          |  <thead>
          |    <tr>
          |      <td>Bug Group</td>
          |      <td class="sorttable_sorted">
          |        Bug Type
          |        <span id="sorttable_sortfwdind">&nbsp;&#x25BE;</span>
          |      </td>
          |      <td>File</td>
          |      <td>Function/Method</td>
          |      <td class="Q">Line</td>
          |      <td class="Q">Path Length</td>
          |      <td class="sorttable_nosort"></td>
          |    </tr>
          |  </thead>
          |  <tbody>""", indent))
          handle.write(comment('REPORTBUGCOL'))
          for current in bugs:
              handle.write(reindent("""
          |    <tr class="{bug_type_class}">
          |      <td class="DESC">{bug_category}</td>
          |      <td class="DESC">{bug_type}</td>
          |      <td>{bug_file}</td>
          |      <td class="DESC">{bug_function}</td>
          |      <td class="Q">{bug_line}</td>
          |      <td class="Q">{bug_path_length}</td>
          |      <td><a href="{report_file}#EndPath">View Report</a></td>
          |    </tr>""", indent).format(**current))
              handle.write(comment('REPORTBUG', {'id': current['report_file']}))
          handle.write(reindent("""
          |  </tbody>
          |</table>""", indent))
          handle.write(comment('REPORTBUGEND'))
      return name
function_tokens: def bug_report ( output_dir , prefix ) : pretty = prettify_bug ( prefix , output_dir ) bugs = ( pretty ( bug ) for bug in read_bugs ( output_dir , True ) ) name = os . path . join ( output_dir , 'bugs.html.fragment' ) with open ( name , 'w' ) as handle : indent = 4 handle . write ( reindent ( """
          |<h2>Reports</h2>
          |<table class="sortable" style="table-layout:automatic">
          |  <thead>
          |    <tr>
          |      <td>Bug Group</td>
          |      <td class="sorttable_sorted">
          |        Bug Type
          |        <span id="sorttable_sortfwdind">&nbsp;&#x25BE;</span>
          |      </td>
          |      <td>File</td>
          |      <td>Function/Method</td>
          |      <td class="Q">Line</td>
          |      <td class="Q">Path Length</td>
          |      <td class="sorttable_nosort"></td>
          |    </tr>
          |  </thead>
          |  <tbody>""" , indent ) ) handle . write ( comment ( 'REPORTBUGCOL' ) ) for current in bugs : handle . write ( reindent ( """
          |    <tr class="{bug_type_class}">
          |      <td class="DESC">{bug_category}</td>
          |      <td class="DESC">{bug_type}</td>
          |      <td>{bug_file}</td>
          |      <td class="DESC">{bug_function}</td>
          |      <td class="Q">{bug_line}</td>
          |      <td class="Q">{bug_path_length}</td>
          |      <td><a href="{report_file}#EndPath">View Report</a></td>
          |    </tr>""" , indent ) . format ( * * current ) ) handle . write ( comment ( 'REPORTBUG' , { 'id' : current [ 'report_file' ] } ) ) handle . write ( reindent ( """
          |  </tbody>
          |</table>""" , indent ) ) handle . write ( comment ( 'REPORTBUGEND' ) ) return name