Program: 160217
Project: 160217
Buggy source:
@Test public void testAddObjectsToExistingArray(){
  Array array=new Array();
  populateData(array);
  Document doc=createDocument("String_Node_Str");
  doc.set("String_Node_Str",array);
  doc=save(doc);
  array=doc.getArray("String_Node_Str");
  assertNotNull(array);
  assertEquals(12,array.count());
  populateData(array);
  assertEquals(24,array.count());
  save(doc,"String_Node_Str",array,new Validator<Array>(){
    @Override public void validate(    Array a){
      assertEquals(24,a.count());
      assertEquals(true,a.getObject(12 + 0));
      assertEquals(false,a.getObject(12 + 1));
      assertEquals("String_Node_Str",a.getObject(12 + 2));
      assertEquals(0,a.getObject(12 + 3));
      assertEquals(1,a.getObject(12 + 4));
      assertEquals(-1,a.getObject(12 + 5));
      assertEquals(1.1,a.getObject(12 + 6));
      assertEquals(kArrayTestDate,a.getObject(12 + 7));
      assertEquals(null,a.getObject(12 + 8));
      Dictionary subdict=(Dictionary)a.getObject(12 + 9);
      Map<String,Object> expectedMap=new HashMap<>();
      expectedMap.put("String_Node_Str","String_Node_Str");
      assertEquals(expectedMap,subdict.toMap());
      Array subarray=(Array)a.getObject(12 + 10);
      List<Object> expected=new ArrayList<>();
      expected.add("String_Node_Str");
      expected.add("String_Node_Str");
      expected.add("String_Node_Str");
      assertEquals(expected,subarray.toList());
      Blob blob=(Blob)a.getObject(12 + 11);
      assertTrue(Arrays.equals(kArrayTestBlob.getBytes(),blob.getContent()));
      assertEquals(kArrayTestBlob,new String(blob.getContent()));
    }
  }
);
}

Fixed version (ground truth):
@Test public void testAddObjectsToExistingArray(){
  Array array=new Array();
  populateData(array);
  Document doc=createDocument("String_Node_Str");
  doc.set("String_Node_Str",array);
  doc=save(doc);
  array=doc.getArray("String_Node_Str");
  assertNotNull(array);
  assertEquals(12,array.count());
  populateData(array);
  assertEquals(24,array.count());
  save(doc,"String_Node_Str",array,new Validator<Array>(){
    @Override public void validate(    Array a){
      assertEquals(24,a.count());
      assertEquals(true,a.getObject(12 + 0));
      assertEquals(false,a.getObject(12 + 1));
      assertEquals("String_Node_Str",a.getObject(12 + 2));
      assertEquals(0,((Number)a.getObject(12 + 3)).intValue());
      assertEquals(1,((Number)a.getObject(12 + 4)).intValue());
      assertEquals(-1,((Number)a.getObject(12 + 5)).intValue());
      assertEquals(1.1,a.getObject(12 + 6));
      assertEquals(kArrayTestDate,a.getObject(12 + 7));
      assertEquals(null,a.getObject(12 + 8));
      Dictionary subdict=(Dictionary)a.getObject(12 + 9);
      Map<String,Object> expectedMap=new HashMap<>();
      expectedMap.put("String_Node_Str","String_Node_Str");
      assertEquals(expectedMap,subdict.toMap());
      Array subarray=(Array)a.getObject(12 + 10);
      List<Object> expected=new ArrayList<>();
      expected.add("String_Node_Str");
      expected.add("String_Node_Str");
      expected.add("String_Node_Str");
      assertEquals(expected,subarray.toList());
      Blob blob=(Blob)a.getObject(12 + 11);
      assertTrue(Arrays.equals(kArrayTestBlob.getBytes(),blob.getContent()));
      assertEquals(kArrayTestBlob,new String(blob.getContent()));
    }
  }
);
}