[Demonstration 1]

[Buggy Method]
@Test
public void testHeapSort() {
    Integer[] data = { 3, 2, 1, 4, 5, 9, 6, 7, 8, 0 };
    HeapSort<Integer> heapSort = new HeapSort<Integer>();
    heapSort.setArray(data);
    heapSort.sort();
    for (Integer integer : data) {
        System.out.print(integer + " ");
    }
    for (int i = 0; i < data.length; i++) {
        assertEquals(data[i].intValue(), i);
    }
}

[Buggy Hunk]
assertEquals(data[i].intValue(), i);

[Patch]
assertEquals(i, data[i].intValue());

[Demonstration 2]

[Buggy Method]
public TextWithDependencies concatWithDep(TextWithDependencies other, ResolvedDependency dep) {
    TextWithDependencies newTWD = this.concat(other);
    other.dependencies.add(dep);
    return newTWD;
}

[Buggy Hunk]
other.dependencies.add(dep);

[Patch]
newTWD.dependencies.add(dep);

[Demonstration 3]

[Buggy Method]
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    final SocketAddress remoteAddress = ctx.channel().remoteAddress();
    connections.put(remoteAddress, getConnectionContext(ctx));
    Queue<MessagePromise> queue = remove(remoteAddress);
    if (queue != null) {
        sendMessages(ctx, queue);
    }
}

[Buggy Hunk]
Queue<MessagePromise> queue = remove(remoteAddress);

[Patch]
Queue<MessagePromise> queue = removeMessages(remoteAddress);