parameters: (filename)
docstring: Returns the generator of bugs from a single .plist file.
docstring_summary: Returns the generator of bugs from a single .plist file.
docstring_tokens: Returns the generator of bugs from a single . plist file .
function: def parse_bug_plist(filename):
      """ Returns the generator of bugs from a single .plist file. """
  
      content = plistlib.readPlist(filename)
      files = content.get('files')
      for bug in content.get('diagnostics', []):
          if len(files) <= int(bug['location']['file']):
              logging.warning('Parsing bug from "%s" failed', filename)
              continue
  
          yield {
              'result': filename,
              'bug_type': bug['type'],
              'bug_category': bug['category'],
              'bug_line': int(bug['location']['line']),
              'bug_path_length': int(bug['location']['col']),
              'bug_file': files[int(bug['location']['file'])]
          }
function_tokens: def parse_bug_plist ( filename ) : content = plistlib . readPlist ( filename ) files = content . get ( 'files' ) for bug in content . get ( 'diagnostics' , [ ] ) : if len ( files ) <= int ( bug [ 'location' ] [ 'file' ] ) : logging . warning ( 'Parsing bug from "%s" failed' , filename ) continue yield { 'result' : filename , 'bug_type' : bug [ 'type' ] , 'bug_category' : bug [ 'category' ] , 'bug_line' : int ( bug [ 'location' ] [ 'line' ] ) , 'bug_path_length' : int ( bug [ 'location' ] [ 'col' ] ) , 'bug_file' : files [ int ( bug [ 'location' ] [ 'file' ] ) ] }