parameters: (cls, bug_id)
docstring: Checks whether Anomalies with a given bug ID have recovered.
docstring_summary: Checks whether Anomalies with a given bug ID have recovered.
docstring_tokens: Checks whether Anomalies with a given bug ID have recovered .
function: def UpdateRecoveredBugs(cls, bug_id):
      """Checks whether Anomalies with a given bug ID have recovered."""
      anomalies = anomaly.Anomaly.query(
          anomaly.Anomaly.bug_id == bug_id).fetch()
      # If no anomalies found, mark this Bug entity as closed.
      if not anomalies:
        bug = ndb.Key('Bug', bug_id).get()
        bug.status = bug_data.BUG_STATUS_CLOSED
        bug.put()
        return
  
      non_recovered_anomalies = [a for a in anomalies if not a.recovered]
      recovered_anomalies = _FindAndUpdateRecoveredAnomalies(
          non_recovered_anomalies)
  
      map(_AddLogForRecoveredAnomaly, recovered_anomalies)
  
      if all(a.recovered for a in anomalies):
        cls._CommentOnRecoveredBug(bug_id)
function_tokens: def UpdateRecoveredBugs ( cls , bug_id ) : anomalies = anomaly . Anomaly . query ( anomaly . Anomaly . bug_id == bug_id ) . fetch ( ) # If no anomalies found, mark this Bug entity as closed. if not anomalies : bug = ndb . Key ( 'Bug' , bug_id ) . get ( ) bug . status = bug_data . BUG_STATUS_CLOSED bug . put ( ) return non_recovered_anomalies = [ a for a in anomalies if not a . recovered ] recovered_anomalies = _FindAndUpdateRecoveredAnomalies ( non_recovered_anomalies ) map ( _AddLogForRecoveredAnomaly , recovered_anomalies ) if all ( a . recovered for a in anomalies ) : cls . _CommentOnRecoveredBug ( bug_id )