Program: 33955
Project: 33955
Buggy source:
@Test(groups={"String_Node_Str"},dependsOnGroups={"String_Node_Str"}) public void bulkTest() throws Exception {
  final int DOCUMENTS_LOADED=100;
  final String uniqueIdPrefix="String_Node_Str";
{
    for (int i=0; i < DOCUMENTS_LOADED; i++) {
      String uniqueId=uniqueIdPrefix + i;
      LMDoc.Builder indexedDocBuilder=LMDoc.newBuilder();
      indexedDocBuilder.setIndexName("String_Node_Str");
      indexedDocBuilder.addIndexedField(LMField.newBuilder().setFieldName("String_Node_Str").addFieldValue("String_Node_Str").build());
      indexedDocBuilder.addIndexedField(LMField.newBuilder().setFieldName("String_Node_Str").addFieldValue("String_Node_Str").build());
      ByteString byteString=ByteString.copyFromUtf8("String_Node_Str" + i + "String_Node_Str");
      boolean compressed=(i % 2 == 0);
      ResultDocument rd=ResultDocument.newBuilder().setType(ResultDocument.Type.TEXT).setDocument(byteString).setUniqueId(uniqueId).setCompressed(compressed).build();
      lumongoClient.storeDocument(rd,indexedDocBuilder.build());
    }
  }
{
    QueryResponse qr=null;
    qr=lumongoClient.query("String_Node_Str",300,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",100,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",20,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",20,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",10,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),0,"String_Node_Str");
  }
{
    for (int i=0; i < DOCUMENTS_LOADED; i++) {
      String uniqueId=uniqueIdPrefix + i;
      FetchResponse response=lumongoClient.fetchDocument(uniqueId);
      Assert.assertTrue(response.hasResultDocument(),"String_Node_Str" + uniqueId + "String_Node_Str");
      ResultDocument rd=response.getResultDocument();
      String recordText=rd.getDocument().toStringUtf8();
      Assert.assertTrue(recordText.equals("String_Node_Str" + i + "String_Node_Str"),"String_Node_Str" + uniqueId + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},dependsOnGroups={"String_Node_Str"}) public void bulkTest() throws Exception {
  final int DOCUMENTS_LOADED=100;
  final String uniqueIdPrefix="String_Node_Str";
{
    for (int i=0; i < DOCUMENTS_LOADED; i++) {
      String uniqueId=uniqueIdPrefix + i;
      LMDoc.Builder indexedDocBuilder=LMDoc.newBuilder();
      indexedDocBuilder.setIndexName("String_Node_Str");
      indexedDocBuilder.addIndexedField(LMField.newBuilder().setFieldName("String_Node_Str").addFieldValue("String_Node_Str").build());
      indexedDocBuilder.addIndexedField(LMField.newBuilder().setFieldName("String_Node_Str").addFieldValue("String_Node_Str").build());
      ByteString byteString=ByteString.copyFromUtf8("String_Node_Str");
      boolean compressed=(i % 2 == 0);
      ResultDocument rd=ResultDocument.newBuilder().setType(ResultDocument.Type.TEXT).setDocument(byteString).setUniqueId(uniqueId).setCompressed(compressed).build();
      lumongoClient.storeDocument(rd,indexedDocBuilder.build());
    }
    for (int i=0; i < DOCUMENTS_LOADED; i++) {
      String uniqueId=uniqueIdPrefix + i;
      LMDoc.Builder indexedDocBuilder=LMDoc.newBuilder();
      indexedDocBuilder.setIndexName("String_Node_Str");
      indexedDocBuilder.addIndexedField(LMField.newBuilder().setFieldName("String_Node_Str").addFieldValue("String_Node_Str").build());
      indexedDocBuilder.addIndexedField(LMField.newBuilder().setFieldName("String_Node_Str").addFieldValue("String_Node_Str").build());
      ByteString byteString=ByteString.copyFromUtf8("String_Node_Str" + i + "String_Node_Str");
      boolean compressed=(i % 2 == 0);
      ResultDocument rd=ResultDocument.newBuilder().setType(ResultDocument.Type.TEXT).setDocument(byteString).setUniqueId(uniqueId).setCompressed(compressed).build();
      lumongoClient.storeDocument(rd,indexedDocBuilder.build());
    }
  }
{
    QueryResponse qr=null;
    qr=lumongoClient.query("String_Node_Str",300,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",100,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",20,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",20,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),DOCUMENTS_LOADED,"String_Node_Str" + DOCUMENTS_LOADED);
    qr=lumongoClient.query("String_Node_Str",10,"String_Node_Str");
    Assert.assertEquals(qr.getTotalHits(),0,"String_Node_Str");
  }
{
    for (int i=0; i < DOCUMENTS_LOADED; i++) {
      String uniqueId=uniqueIdPrefix + i;
      FetchResponse response=lumongoClient.fetchDocument(uniqueId);
      Assert.assertTrue(response.hasResultDocument(),"String_Node_Str" + uniqueId + "String_Node_Str");
      ResultDocument rd=response.getResultDocument();
      String recordText=rd.getDocument().toStringUtf8();
      Assert.assertTrue(recordText.equals("String_Node_Str" + i + "String_Node_Str"),"String_Node_Str" + uniqueId + "String_Node_Str");
    }
  }
}