parameters: (self, summary, description, labels, components, urlsafe_keys)
docstring: Creates a bug, associates it with the alerts, sends a HTML response.
  
      Args:
        summary: The new bug summary string.
        description: The new bug description string.
        labels: List of label strings for the new bug.
        components: List of component strings for the new bug.
        urlsafe_keys: Comma-separated alert keys in urlsafe format.
docstring_summary: Creates a bug, associates it with the alerts, sends a HTML response.
docstring_tokens: Creates a bug associates it with the alerts sends a HTML response .
function: def _CreateBug(self, summary, description, labels, components, urlsafe_keys):
      """Creates a bug, associates it with the alerts, sends a HTML response.
  
      Args:
        summary: The new bug summary string.
        description: The new bug description string.
        labels: List of label strings for the new bug.
        components: List of component strings for the new bug.
        urlsafe_keys: Comma-separated alert keys in urlsafe format.
      """
      alert_keys = [ndb.Key(urlsafe=k) for k in urlsafe_keys.split(',')]
      alerts = ndb.get_multi(alert_keys)
  
      if not description:
        description = 'See the link to graphs below.'
  
      milestone_label = _MilestoneLabel(alerts)
      if milestone_label:
        labels.append(milestone_label)
  
      # Only project members (@chromium.org accounts) can be owners of bugs.
      owner = self.request.get('owner')
      if owner and not owner.endswith('@chromium.org'):
        self.RenderHtml('bug_result.html', {
            'error': 'Owner email address must end with @chromium.org.'
        })
        return
  
      http = oauth2_decorator.DECORATOR.http()
      service = issue_tracker_service.IssueTrackerService(http=http)
  
      bug_id = service.NewBug(
          summary, description, labels=labels, components=components, owner=owner)
      if not bug_id:
        self.RenderHtml('bug_result.html', {'error': 'Error creating bug!'})
        return
  
      bug_data.Bug(id=bug_id).put()
      for alert_entity in alerts:
        alert_entity.bug_id = bug_id
      ndb.put_multi(alerts)
  
      comment_body = _AdditionalDetails(bug_id, alerts)
      service.AddBugComment(bug_id, comment_body)
  
      template_params = {'bug_id': bug_id}
      if all(k.kind() == 'Anomaly' for k in alert_keys):
        bisect_result = auto_bisect.StartNewBisectForBug(bug_id)
        if 'error' in bisect_result:
          template_params['bisect_error'] = bisect_result['error']
        else:
          template_params.update(bisect_result)
      self.RenderHtml('bug_result.html', template_params)
function_tokens: def _CreateBug ( self , summary , description , labels , components , urlsafe_keys ) : alert_keys = [ ndb . Key ( urlsafe = k ) for k in urlsafe_keys . split ( ',' ) ] alerts = ndb . get_multi ( alert_keys ) if not description : description = 'See the link to graphs below.' milestone_label = _MilestoneLabel ( alerts ) if milestone_label : labels . append ( milestone_label ) # Only project members (@chromium.org accounts) can be owners of bugs. owner = self . request . get ( 'owner' ) if owner and not owner . endswith ( '@chromium.org' ) : self . RenderHtml ( 'bug_result.html' , { 'error' : 'Owner email address must end with @chromium.org.' } ) return http = oauth2_decorator . DECORATOR . http ( ) service = issue_tracker_service . IssueTrackerService ( http = http ) bug_id = service . NewBug ( summary , description , labels = labels , components = components , owner = owner ) if not bug_id : self . RenderHtml ( 'bug_result.html' , { 'error' : 'Error creating bug!' } ) return bug_data . Bug ( id = bug_id ) . put ( ) for alert_entity in alerts : alert_entity . bug_id = bug_id ndb . put_multi ( alerts ) comment_body = _AdditionalDetails ( bug_id , alerts ) service . AddBugComment ( bug_id , comment_body ) template_params = { 'bug_id' : bug_id } if all ( k . kind ( ) == 'Anomaly' for k in alert_keys ) : bisect_result = auto_bisect . StartNewBisectForBug ( bug_id ) if 'error' in bisect_result : template_params [ 'bisect_error' ] = bisect_result [ 'error' ] else : template_params . update ( bisect_result ) self . RenderHtml ( 'bug_result.html' , template_params )