[Demonstration 1]

[Buggy Method]
@Test
public void nullTest() throws JSONReaderException {
    Object result = ObjectDeserializer.getFromReader(new java.io.StringReader("{\"myString\": \"Hola mundo\", \"myBoolean\": true, \"myNull\": null, \"myDate\": \"1973-12-22T03:10:00.000Z\", \"myInternalClass\": {\"myString\": \"inside...\"}, \"myInteger\": 12345}"), null);
    assertTrue(Map.class.isAssignableFrom(result.getClass()));
    Map map = (Map) result;
    assertEquals("inside...", ((Map) map.get("myInternalClass")).get("myString"));
}

[Buggy Hunk]
Object result = ObjectDeserializer.getFromReader(new java.io.StringReader("{\"myString\": \"Hola mundo\", \"myBoolean\": true, \"myNull\": null, \"myDate\": \"1973-12-22T03:10:00.000Z\", \"myInternalClass\": {\"myString\": \"inside...\"}, \"myInteger\": 12345}"), null);

[Patch]
Object result = ObjectDeserializer.getFromReader(new StringReader("{\"myString\": \"Hola mundo\", \"myBoolean\": true, \"myNull\": null, \"myDate\": \"1973-12-22T03:10:00.000Z\", \"myInternalClass\": {\"myString\": \"inside...\"}, \"myInteger\": 12345}"), null);

[Demonstration 2]

[Buggy Method]
@Test
public void should_process_filled_array_correctly() {
    unit.setContextData(FILLED_ARRAY);
    String result = unit.getArrayStringRepresentation();
    MatcherAssert.assertThat(result, Matchers.is(Base64.getEncoder().encodeToString(FILLED_ARRAY)));
}

[Buggy Hunk]
MatcherAssert.assertThat(result, Matchers.is(Base64.getEncoder().encodeToString(FILLED_ARRAY)));

[Patch]
MatcherAssert.assertThat(result, Matchers.is(DatatypeConverter.printBase64Binary(FILLED_ARRAY)));

[Demonstration 3]

[Buggy Method]
@Test
public void testSubmitRequestWorks() throws Exception {
    String request = "{\"reqId\":1491566332010860,\n" + "          \"identifier\":\"Th7MpTaRZVRYnPiabds81Y\",\n" + "          \"operation\":{\n" + "             \"type\":\"105\",\n" + "             \"dest\":\"Th7MpTaRZVRYnPiabds81Y\"\n" + "          },\n" + "          \"signature\":\"4o86XfkiJ4e2r3J6Ufoi17UU3W5Zi9sshV6FjBjkVw4sgEQFQov9dxqDEtLbAJAWffCWd5KfAk164QVo7mYwKkiV\"}";
    String response = Ledger.submitRequest(pool, request).get();
    JSONObject responseObject = new JSONObject(response);
    Assert.assertEquals("REPLY", responseObject.getString("op"));
    Assert.assertEquals("105", responseObject.getJSONObject("result").getString("type"));
    Assert.assertEquals(1491566332010860L, responseObject.getJSONObject("result").getLong("reqId"));
    Assert.assertEquals("{\"dest\":\"Th7MpTaRZVRYnPiabds81Y\",\"identifier\":\"V4SGRU86Z58d6TV7PBUe6f\",\"role\":\"2\",\"verkey\":\"~7TYfekw4GUagBnBVCqPjiC\"}", responseObject.getJSONObject("result").getString("data"));
    Assert.assertEquals("Th7MpTaRZVRYnPiabds81Y", responseObject.getJSONObject("result").getString("identifier"));
    Assert.assertEquals("Th7MpTaRZVRYnPiabds81Y", responseObject.getJSONObject("result").getString("dest"));
}

[Buggy Hunk]
Assert.assertEquals("{\"dest\":\"Th7MpTaRZVRYnPiabds81Y\",\"identifier\":\"V4SGRU86Z58d6TV7PBUe6f\",\"role\":\"2\",\"verkey\":\"~7TYfekw4GUagBnBVCqPjiC\"}", responseObject.getJSONObject("result").getString("data"));

[Patch]
Assert.assertEquals("{\"dest\":\"Th7MpTaRZVRYnPiabds81Y\",\"identifier\":\"V4SGRU86Z58d6TV7PBUe6f\",\"role\":\"2\",\"seqNo\":2,\"txnTime\":null,\"verkey\":\"~7TYfekw4GUagBnBVCqPjiC\"}", responseObject.getJSONObject("result").getString("data"));