Migration from HTTP2_BUG to HTTP2_BUG_V2(bug_id).

Per go/gfe-bug-improvements GFE_BUGs are getting stable IDs to allow for monitoring and alerting. Existing HTTP2_BUG instances are changed to have `http2_bug_n_m` ID, where `n` is unique for each file, and `m` is a counter within each file, so we get `HTTP2_BUG_V2(http2_bug_123_2))`

PiperOrigin-RevId: 362310020
Change-Id: I5d8b76fd2ae3091d3d8dacdfd4b0df94c5c59c87
diff --git a/http2/decoder/decode_status.cc b/http2/decoder/decode_status.cc
index 60d6825..2f14122 100644
--- a/http2/decoder/decode_status.cc
+++ b/http2/decoder/decode_status.cc
@@ -21,7 +21,7 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Unknown DecodeStatus " << unknown;
+  HTTP2_BUG_V2(http2_bug_147_1) << "Unknown DecodeStatus " << unknown;
   return out << "DecodeStatus(" << unknown << ")";
 }
 
diff --git a/http2/decoder/http2_frame_decoder.cc b/http2/decoder/http2_frame_decoder.cc
index 9509c0c..35a3fe8 100644
--- a/http2/decoder/http2_frame_decoder.cc
+++ b/http2/decoder/http2_frame_decoder.cc
@@ -28,7 +28,7 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Http2FrameDecoder::State " << unknown;
+  HTTP2_BUG_V2(http2_bug_155_1) << "Http2FrameDecoder::State " << unknown;
   return out << "Http2FrameDecoder::State(" << unknown << ")";
 }
 
diff --git a/http2/decoder/http2_structure_decoder.cc b/http2/decoder/http2_structure_decoder.cc
index b8f29bc..a557532 100644
--- a/http2/decoder/http2_structure_decoder.cc
+++ b/http2/decoder/http2_structure_decoder.cc
@@ -21,7 +21,8 @@
 uint32_t Http2StructureDecoder::IncompleteStart(DecodeBuffer* db,
                                                 uint32_t target_size) {
   if (target_size > sizeof buffer_) {
-    HTTP2_BUG << "target_size too large for buffer: " << target_size;
+    HTTP2_BUG_V2(http2_bug_154_1)
+        << "target_size too large for buffer: " << target_size;
     return 0;
   }
   const uint32_t num_to_copy = db->MinLengthRemaining(target_size);
@@ -53,8 +54,9 @@
                  << ": target_size=" << target_size << "; offset_=" << offset_
                  << "; db->Remaining=" << db->Remaining();
   if (target_size < offset_) {
-    HTTP2_BUG << "Already filled buffer_! target_size=" << target_size
-              << "    offset_=" << offset_;
+    HTTP2_BUG_V2(http2_bug_154_2)
+        << "Already filled buffer_! target_size=" << target_size
+        << "    offset_=" << offset_;
     return false;
   }
   const uint32_t needed = target_size - offset_;
@@ -74,8 +76,9 @@
                  << "; *remaining_payload=" << *remaining_payload
                  << "; db->Remaining=" << db->Remaining();
   if (target_size < offset_) {
-    HTTP2_BUG << "Already filled buffer_! target_size=" << target_size
-              << "    offset_=" << offset_;
+    HTTP2_BUG_V2(http2_bug_154_3)
+        << "Already filled buffer_! target_size=" << target_size
+        << "    offset_=" << offset_;
     return false;
   }
   const uint32_t needed = target_size - offset_;
diff --git a/http2/decoder/payload_decoders/altsvc_payload_decoder.cc b/http2/decoder/payload_decoders/altsvc_payload_decoder.cc
index 2b34104..762a0ab 100644
--- a/http2/decoder/payload_decoders/altsvc_payload_decoder.cc
+++ b/http2/decoder/payload_decoders/altsvc_payload_decoder.cc
@@ -31,7 +31,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Invalid AltSvcPayloadDecoder::PayloadState: " << unknown;
+  HTTP2_BUG_V2(http2_bug_163_1)
+      << "Invalid AltSvcPayloadDecoder::PayloadState: " << unknown;
   return out << "AltSvcPayloadDecoder::PayloadState(" << unknown << ")";
 }
 
@@ -104,7 +105,7 @@
         payload_state_ = PayloadState::kMaybeDecodedStruct;
         continue;
     }
-    HTTP2_BUG << "PayloadState: " << payload_state_;
+    HTTP2_BUG_V2(http2_bug_163_2) << "PayloadState: " << payload_state_;
   }
 }
 
diff --git a/http2/decoder/payload_decoders/data_payload_decoder.cc b/http2/decoder/payload_decoders/data_payload_decoder.cc
index 03e442d..183bb42 100644
--- a/http2/decoder/payload_decoders/data_payload_decoder.cc
+++ b/http2/decoder/payload_decoders/data_payload_decoder.cc
@@ -29,7 +29,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Invalid DataPayloadDecoder::PayloadState: " << unknown;
+  HTTP2_BUG_V2(http2_bug_174_1)
+      << "Invalid DataPayloadDecoder::PayloadState: " << unknown;
   return out << "DataPayloadDecoder::PayloadState(" << unknown << ")";
 }
 
@@ -120,7 +121,7 @@
       payload_state_ = PayloadState::kSkipPadding;
       return DecodeStatus::kDecodeInProgress;
   }
-  HTTP2_BUG << "PayloadState: " << payload_state_;
+  HTTP2_BUG_V2(http2_bug_174_2) << "PayloadState: " << payload_state_;
   return DecodeStatus::kDecodeError;
 }
 
diff --git a/http2/decoder/payload_decoders/goaway_payload_decoder.cc b/http2/decoder/payload_decoders/goaway_payload_decoder.cc
index 17b7e7d..4a006ce 100644
--- a/http2/decoder/payload_decoders/goaway_payload_decoder.cc
+++ b/http2/decoder/payload_decoders/goaway_payload_decoder.cc
@@ -31,7 +31,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Invalid GoAwayPayloadDecoder::PayloadState: " << unknown;
+  HTTP2_BUG_V2(http2_bug_167_1)
+      << "Invalid GoAwayPayloadDecoder::PayloadState: " << unknown;
   return out << "GoAwayPayloadDecoder::PayloadState(" << unknown << ")";
 }
 
@@ -114,7 +115,7 @@
         payload_state_ = PayloadState::kHandleFixedFieldsStatus;
         continue;
     }
-    HTTP2_BUG << "PayloadState: " << payload_state_;
+    HTTP2_BUG_V2(http2_bug_167_2) << "PayloadState: " << payload_state_;
   }
 }
 
diff --git a/http2/decoder/payload_decoders/headers_payload_decoder.cc b/http2/decoder/payload_decoders/headers_payload_decoder.cc
index 9b219d7..3f3198b 100644
--- a/http2/decoder/payload_decoders/headers_payload_decoder.cc
+++ b/http2/decoder/payload_decoders/headers_payload_decoder.cc
@@ -33,7 +33,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Invalid HeadersPayloadDecoder::PayloadState: " << unknown;
+  HTTP2_BUG_V2(http2_bug_189_1)
+      << "Invalid HeadersPayloadDecoder::PayloadState: " << unknown;
   return out << "HeadersPayloadDecoder::PayloadState(" << unknown << ")";
 }
 
@@ -170,7 +171,7 @@
         payload_state_ = PayloadState::kReadPayload;
         continue;
     }
-    HTTP2_BUG << "PayloadState: " << payload_state_;
+    HTTP2_BUG_V2(http2_bug_189_2) << "PayloadState: " << payload_state_;
   }
 }
 
diff --git a/http2/decoder/payload_decoders/priority_update_payload_decoder.cc b/http2/decoder/payload_decoders/priority_update_payload_decoder.cc
index d115c35..89e4732 100644
--- a/http2/decoder/payload_decoders/priority_update_payload_decoder.cc
+++ b/http2/decoder/payload_decoders/priority_update_payload_decoder.cc
@@ -31,8 +31,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Invalid PriorityUpdatePayloadDecoder::PayloadState: "
-            << unknown;
+  HTTP2_BUG_V2(http2_bug_173_1)
+      << "Invalid PriorityUpdatePayloadDecoder::PayloadState: " << unknown;
   return out << "PriorityUpdatePayloadDecoder::PayloadState(" << unknown << ")";
 }
 
@@ -118,7 +118,7 @@
         payload_state_ = PayloadState::kHandleFixedFieldsStatus;
         continue;
     }
-    HTTP2_BUG << "PayloadState: " << payload_state_;
+    HTTP2_BUG_V2(http2_bug_173_2) << "PayloadState: " << payload_state_;
   }
 }
 
diff --git a/http2/decoder/payload_decoders/push_promise_payload_decoder.cc b/http2/decoder/payload_decoders/push_promise_payload_decoder.cc
index efb1520..9ebbbff 100644
--- a/http2/decoder/payload_decoders/push_promise_payload_decoder.cc
+++ b/http2/decoder/payload_decoders/push_promise_payload_decoder.cc
@@ -155,7 +155,7 @@
         payload_state_ = PayloadState::kResumeDecodingPushPromiseFields;
         return status;
     }
-    HTTP2_BUG << "PayloadState: " << payload_state_;
+    HTTP2_BUG_V2(http2_bug_183_1) << "PayloadState: " << payload_state_;
   }
 }
 
diff --git a/http2/hpack/decoder/hpack_decoder_string_buffer.cc b/http2/hpack/decoder/hpack_decoder_string_buffer.cc
index 2a21846..3ee127e 100644
--- a/http2/hpack/decoder/hpack_decoder_string_buffer.cc
+++ b/http2/hpack/decoder/hpack_decoder_string_buffer.cc
@@ -25,7 +25,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   int unknown = static_cast<int>(v);
-  HTTP2_BUG << "Invalid HpackDecoderStringBuffer::State: " << unknown;
+  HTTP2_BUG_V2(http2_bug_50_1)
+      << "Invalid HpackDecoderStringBuffer::State: " << unknown;
   return out << "HpackDecoderStringBuffer::State(" << unknown << ")";
 }
 
@@ -44,7 +45,8 @@
   // Since the value doesn't come over the wire, only a programming bug should
   // result in reaching this point.
   auto v2 = static_cast<int>(v);
-  HTTP2_BUG << "Invalid HpackDecoderStringBuffer::Backing: " << v2;
+  HTTP2_BUG_V2(http2_bug_50_2)
+      << "Invalid HpackDecoderStringBuffer::Backing: " << v2;
   return out << "HpackDecoderStringBuffer::Backing(" << v2 << ")";
 }
 
diff --git a/http2/hpack/decoder/hpack_entry_decoder.cc b/http2/hpack/decoder/hpack_entry_decoder.cc
index 4e4a4da..aecc92c 100644
--- a/http2/hpack/decoder/hpack_entry_decoder.cc
+++ b/http2/hpack/decoder/hpack_entry_decoder.cc
@@ -86,7 +86,7 @@
       return status;
   }
 
-  HTTP2_BUG << "Unreachable";
+  HTTP2_BUG_V2(http2_bug_63_1) << "Unreachable";
   return DecodeStatus::kDecodeError;
 }
 
@@ -252,7 +252,7 @@
       return true;
   }
 
-  HTTP2_BUG << "Unreachable, entry_type=" << entry_type;
+  HTTP2_BUG_V2(http2_bug_63_2) << "Unreachable, entry_type=" << entry_type;
   return true;
 }
 
diff --git a/http2/hpack/decoder/hpack_entry_type_decoder.cc b/http2/hpack/decoder/hpack_entry_type_decoder.cc
index 99a0770..c72a87a 100644
--- a/http2/hpack/decoder/hpack_entry_type_decoder.cc
+++ b/http2/hpack/decoder/hpack_entry_type_decoder.cc
@@ -354,7 +354,8 @@
       // All of those bits are 1, so the varint extends into another byte.
       return varint_decoder_.StartExtended(7, db);
   }
-  HTTP2_BUG << "Unreachable, byte=" << std::hex << static_cast<uint32_t>(byte);
+  HTTP2_BUG_V2(http2_bug_66_1)
+      << "Unreachable, byte=" << std::hex << static_cast<uint32_t>(byte);
   HTTP2_CODE_COUNT_N(decompress_failure_3, 17, 23);
   return DecodeStatus::kDecodeError;
 }
diff --git a/http2/hpack/tools/hpack_block_builder.cc b/http2/hpack/tools/hpack_block_builder.cc
index 8f85304..aab850a 100644
--- a/http2/hpack/tools/hpack_block_builder.cc
+++ b/http2/hpack/tools/hpack_block_builder.cc
@@ -46,7 +46,7 @@
       prefix_length = 4;
       break;
     default:
-      HTTP2_BUG << "Unreached, entry_type=" << entry_type;
+      HTTP2_BUG_V2(http2_bug_110_1) << "Unreached, entry_type=" << entry_type;
       high_bits = 0;
       prefix_length = 0;
       break;
diff --git a/http2/hpack/tools/hpack_example.cc b/http2/hpack/tools/hpack_example.cc
index 25f44c9..5b489bc 100644
--- a/http2/hpack/tools/hpack_example.cc
+++ b/http2/hpack/tools/hpack_example.cc
@@ -40,9 +40,9 @@
       example.remove_prefix(pos + 1);
       continue;
     }
-    HTTP2_BUG << "Can't parse byte " << static_cast<int>(c0)
-              << absl::StrCat(" (0x", Http2Hex(c0), ")")
-              << "\nExample: " << example;
+    HTTP2_BUG_V2(http2_bug_107_1)
+        << "Can't parse byte " << static_cast<int>(c0)
+        << absl::StrCat(" (0x", Http2Hex(c0), ")") << "\nExample: " << example;
   }
   QUICHE_CHECK_LT(0u, output->size()) << "Example is empty.";
 }