Program: 93022
Project: 93022
Buggy source:
@Test public void testLoggingHandler() throws InterruptedException {
  String logName=formatForTest("String_Node_Str");
  LoggingOptions options=logging().getOptions();
  LoggingHandler handler=new LoggingHandler(logName,options);
  handler.setLevel(Level.INFO);
  Logger logger=Logger.getLogger(getClass().getName());
  logger.addHandler(handler);
  logger.setLevel(Level.INFO);
  logger.info("String_Node_Str");
  Iterator<LogEntry> iterator=logging().listLogEntries(EntryListOption.filter("String_Node_Str" + logName)).iterateAll().iterator();
  while (!iterator.hasNext()) {
    Thread.sleep(500L);
    iterator=logging().listLogEntries(EntryListOption.filter("String_Node_Str" + logName)).iterateAll().iterator();
  }
  assertTrue(iterator.hasNext());
  LogEntry entry=iterator.next();
  assertTrue(entry.getPayload() instanceof StringPayload);
  assertTrue(entry.<StringPayload>getPayload().getData().contains("String_Node_Str"));
  assertEquals(logName,entry.getLogName());
  assertEquals(ImmutableMap.of("String_Node_Str","String_Node_Str","String_Node_Str",String.valueOf(Level.INFO.intValue())),entry.getLabels());
  assertEquals("String_Node_Str",entry.getResource().getType());
  assertEquals(ImmutableMap.of("String_Node_Str",options.getProjectId()),entry.getResource().getLabels());
  assertNull(entry.getHttpRequest());
  assertEquals(Severity.INFO,entry.getSeverity());
  assertNull(entry.getOperation());
  assertNotNull(entry.getInsertId());
  assertNotNull(entry.getTimestamp());
  assertFalse(iterator.hasNext());
  logger.removeHandler(handler);
  logging().deleteLog(logName);
}

Fixed version (ground truth):
@Test public void testLoggingHandler() throws InterruptedException {
  String logId=formatForTest("String_Node_Str");
  LoggingOptions options=logging().getOptions();
  LogName logName=LogName.create(options.getProjectId(),logId);
  LoggingHandler handler=new LoggingHandler(logId,options);
  handler.setLevel(Level.INFO);
  Logger logger=Logger.getLogger(getClass().getName());
  logger.addHandler(handler);
  logger.setLevel(Level.INFO);
  logger.info("String_Node_Str");
  String filter=createEqualityFilter("String_Node_Str",logName);
  Iterator<LogEntry> iterator=logging().listLogEntries(EntryListOption.filter(filter)).iterateAll().iterator();
  while (!iterator.hasNext()) {
    Thread.sleep(500L);
    iterator=logging().listLogEntries(EntryListOption.filter(filter)).iterateAll().iterator();
  }
  assertTrue(iterator.hasNext());
  LogEntry entry=iterator.next();
  assertTrue(entry.getPayload() instanceof StringPayload);
  assertTrue(entry.<StringPayload>getPayload().getData().contains("String_Node_Str"));
  assertEquals(logId,entry.getLogName());
  assertEquals(ImmutableMap.of("String_Node_Str","String_Node_Str","String_Node_Str",String.valueOf(Level.INFO.intValue())),entry.getLabels());
  assertEquals("String_Node_Str",entry.getResource().getType());
  assertEquals(ImmutableMap.of("String_Node_Str",options.getProjectId()),entry.getResource().getLabels());
  assertNull(entry.getHttpRequest());
  assertEquals(Severity.INFO,entry.getSeverity());
  assertNull(entry.getOperation());
  assertNotNull(entry.getInsertId());
  assertNotNull(entry.getTimestamp());
  assertFalse(iterator.hasNext());
  logger.removeHandler(handler);
  logging().deleteLog(logId);
}