Program: 93026
Project: 93026
Buggy source:
@Test public void testWriteAndListLogEntriesAsync() throws InterruptedException, ExecutionException {
  String logName=formatForTest("String_Node_Str");
  String filter="String_Node_Str" + logging().getOptions().getProjectId() + "String_Node_Str"+ logName;
  StringPayload firstPayload=StringPayload.of("String_Node_Str");
  LogEntry firstEntry=LogEntry.newBuilder(firstPayload).setSeverity(Severity.ALERT).build();
  ProtoPayload secondPayload=ProtoPayload.of(Any.pack(StringValue.newBuilder().setValue("String_Node_Str").build()));
  LogEntry secondEntry=LogEntry.newBuilder(secondPayload).setSeverity(Severity.DEBUG).build();
  logging().write(ImmutableList.of(firstEntry,secondEntry),WriteOption.labels(ImmutableMap.of("String_Node_Str","String_Node_Str")),WriteOption.resource(MonitoredResource.newBuilder("String_Node_Str").build()),WriteOption.logName(logName));
  logging().flush();
  EntryListOption[] options={EntryListOption.filter(filter),EntryListOption.pageSize(1)};
  AsyncPage<LogEntry> page=logging().listLogEntriesAsync(options).get();
  while (Iterators.size(page.iterateAll().iterator()) < 2) {
    Thread.sleep(500);
    page=logging().listLogEntriesAsync(options).get();
  }
  Iterator<LogEntry> iterator=page.iterateAll().iterator();
  assertTrue(iterator.hasNext());
  LogEntry entry=iterator.next();
  assertEquals(firstPayload,entry.getPayload());
  assertEquals(logName,entry.getLogName());
  assertEquals(ImmutableMap.of("String_Node_Str","String_Node_Str"),entry.getLabels());
  assertEquals("String_Node_Str",entry.getResource().getType());
  assertNull(entry.getHttpRequest());
  assertEquals(Severity.ALERT,entry.getSeverity());
  assertNull(entry.getOperation());
  assertNotNull(entry.getInsertId());
  assertNotNull(entry.getTimestamp());
  assertTrue(iterator.hasNext());
  entry=iterator.next();
  assertEquals(secondPayload,entry.getPayload());
  assertEquals(logName,entry.getLogName());
  assertEquals(ImmutableMap.of("String_Node_Str","String_Node_Str"),entry.getLabels());
  assertEquals("String_Node_Str",entry.getResource().getType());
  assertNull(entry.getOperation());
  assertEquals(Severity.DEBUG,entry.getSeverity());
  assertNull(entry.getHttpRequest());
  assertNotNull(entry.getInsertId());
  assertNotNull(entry.getTimestamp());
  assertTrue(logging().deleteLogAsync(logName).get());
}

Fixed version (ground truth):
@Test public void testWriteAndListLogEntriesAsync() throws InterruptedException, ExecutionException {
  String logId=formatForTest("String_Node_Str");
  LoggingOptions loggingOptions=logging().getOptions();
  LogName logName=LogName.create(loggingOptions.getProjectId(),logId);
  StringPayload firstPayload=StringPayload.of("String_Node_Str");
  LogEntry firstEntry=LogEntry.newBuilder(firstPayload).setSeverity(Severity.ALERT).build();
  ProtoPayload secondPayload=ProtoPayload.of(Any.pack(StringValue.newBuilder().setValue("String_Node_Str").build()));
  LogEntry secondEntry=LogEntry.newBuilder(secondPayload).setSeverity(Severity.DEBUG).build();
  logging().write(ImmutableList.of(firstEntry,secondEntry),WriteOption.labels(ImmutableMap.of("String_Node_Str","String_Node_Str")),WriteOption.resource(MonitoredResource.newBuilder("String_Node_Str").build()),WriteOption.logName(logId));
  logging().flush();
  String filter=createEqualityFilter("String_Node_Str",logName);
  EntryListOption[] options={EntryListOption.filter(filter),EntryListOption.pageSize(1)};
  AsyncPage<LogEntry> page=logging().listLogEntriesAsync(options).get();
  while (Iterators.size(page.iterateAll().iterator()) < 2) {
    Thread.sleep(500);
    page=logging().listLogEntriesAsync(options).get();
  }
  Iterator<LogEntry> iterator=page.iterateAll().iterator();
  assertTrue(iterator.hasNext());
  LogEntry entry=iterator.next();
  assertEquals(firstPayload,entry.getPayload());
  assertEquals(logId,entry.getLogName());
  assertEquals(ImmutableMap.of("String_Node_Str","String_Node_Str"),entry.getLabels());
  assertEquals("String_Node_Str",entry.getResource().getType());
  assertNull(entry.getHttpRequest());
  assertEquals(Severity.ALERT,entry.getSeverity());
  assertNull(entry.getOperation());
  assertNotNull(entry.getInsertId());
  assertNotNull(entry.getTimestamp());
  assertTrue(iterator.hasNext());
  entry=iterator.next();
  assertEquals(secondPayload,entry.getPayload());
  assertEquals(logId,entry.getLogName());
  assertEquals(ImmutableMap.of("String_Node_Str","String_Node_Str"),entry.getLabels());
  assertEquals("String_Node_Str",entry.getResource().getType());
  assertNull(entry.getOperation());
  assertEquals(Severity.DEBUG,entry.getSeverity());
  assertNull(entry.getHttpRequest());
  assertNotNull(entry.getInsertId());
  assertNotNull(entry.getTimestamp());
  assertTrue(logging().deleteLogAsync(logId).get());
}