[Demonstration 1]

[Buggy Method]
private void checkSelect(final ParameterValueCreateVo vo, final Parameter parameter) {
    ValidationJsonException.assertNotnull(vo.getIndex(), vo.getParameter());
    final List<String> single = ParameterResource.toListString(parameter.getData());
    // Check the index
    checkArrayBound(vo.getIndex(), single.size(), parameter);
}

[Buggy Hunk]
ValidationJsonException.assertNotnull(vo.getIndex(), vo.getParameter());

[Patch]
assertNotnull(vo.getIndex(), vo.getParameter());

[Demonstration 2]

[Buggy Method]
public static String getQueryParamStringForSingleValuedAttributes(final List<String> paramNames, final List<String> values) {
    StringJoiner queryParam = new StringJoiner(DELIMITER);
    IntStream.range(0, Math.min(paramNames.size(), values.size())).mapToObj(i -> queryParam.add(paramNames.get(i) + SEPARATOR + values.get(i)));
    return queryParam.toString();
}

[Buggy Hunk]
.mapToObj(i -> queryParam.add(paramNames.get(i) + SEPARATOR + values.get(i)));

[Patch]
.mapToObj(i -> paramNames.get(i) + SEPARATOR + values.get(i)).forEach(val -> queryParam.add(val));

[Demonstration 3]

[Buggy Method]
@Test(timeout = 50000)
public void testMarshable() throws Exception {
    // sever
    try (final ServerEndpoint serverEndpoint = new ServerEndpoint((byte) 1)) {
        int serverPort = serverEndpoint.getPort();
        //client
        try (final RemoteTcpClientChronicleContext context = new RemoteTcpClientChronicleContext("localhost", serverPort)) {
            // test using Marshallable Keys
            try (ChronicleMap<MyMarshallable, Long> numbers = context.getMap("marshallable-keys", MyMarshallable.class, Long.class)) {
                MyMarshallable key1 = new MyMarshallable("key1");
                MyMarshallable key2 = new MyMarshallable("key2");
                numbers.put(key1, 1L);
                numbers.put(key2, 2L);
            }
            try (ChronicleMap<MyMarshallable, Long> numbers = context.getMap("marshallable-keys", MyMarshallable.class, Long.class)) {
                MyMarshallable key1 = new MyMarshallable("key1");
                MyMarshallable key2 = new MyMarshallable("key2");
                assertEquals(2, numbers.size());
                assertEquals(Long.valueOf(1), numbers.get(key1));
                assertEquals(Long.valueOf(2), numbers.get(key2));
            }
        }
    }
}

[Buggy Hunk]
"localhost", serverPort)) {

[Patch]
"localhost", serverPort, (byte) 2)) {