[Demonstration 1]

[Buggy Method]
@Override
public void display(GLAutoDrawable drawable) {
    // get the OpenGL rendering context
    GL2 gl = drawable.getGL().getGL2();
    if (imageBuffer != null) {
        if (imageBuffer.getId() == renderingId) {
            draw(gl, imageBuffer.getImage(), imageBuffer.getVolume());
        }
        imageBuffer = null;
    } else {
        double[] viewMatrix = new double[4 * 4];
        gl.glGetDoublev(GL2.GL_MODELVIEW_MATRIX, viewMatrix, 0);
        // call the visualize() methods of all subscribed renderers
        for (int i = 0; i < renderers.size(); i++) {
            renderingId++;
            renderers.get(i).visualize(this, viewMatrix, renderingId);
        }
    }
}

[Buggy Hunk]
renderers.get(i).visualize(this, viewMatrix, renderingId);

[Patch]
renderers.get(i).visualize(viewMatrix, renderingId);

[Demonstration 2]

[Buggy Method]
public boolean canEnter(Obj ob, int x, int y, int z) {
    if (getTile(x, y, z).canEnter()) {
        if (getTopObject(x, y, z) == null || !getTopObject(x, y, z).isBlocked()) {
            if (ob.isMonster() && inNoMonsterArea(x, y, z)) {
                return false;
            } else {
                return true;
            }
        }
    }
    return false;
}

[Buggy Hunk]
if(getTopObject(x,y,z)== null || !getTopObject(x,y,z).isBlocked()) {

[Patch]
if(getTopObject(x,y,z)== null || ob.isPlayer() || !getTopObject(x,y,z).isBlocked()) {

[Demonstration 3]

[Buggy Method]
public boolean isEmpty(int x, int y, int z) {
    // if the row doesn't exist or the cell does not exist return true
    return isEmpty(x, y) || get(x, y).containsKey(z);
}

[Buggy Hunk]
return isEmpty(x,y) || get(x,y).containsKey(z);

[Patch]
return isEmpty(x,y) || !get(x,y).containsKey(z);