[Demonstration 1]

[Buggy Method]
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
    if (e.getWheelRotation() > 0) {
        translate.x = (int) ((translate.x - e.getX()) / ZOOM_FACTOR) + e.getX();
        translate.y = (int) ((translate.y - e.getY()) * ZOOM_FACTOR) + e.getY();
        scale /= ZOOM_FACTOR;
    } else if (e.getWheelRotation() < 0) {
        translate.x = (int) ((translate.x - e.getX()) * ZOOM_FACTOR) + e.getX();
        translate.y = (int) ((translate.y - e.getY()) * ZOOM_FACTOR) + e.getY();
        scale *= ZOOM_FACTOR;
    }
    oldTranslate = new Point(translate);
    updateTransform();
    repaint();
}

[Buggy Hunk]
translate.y = (int) ((translate.y - e.getY()) * ZOOM_FACTOR) + e.getY();

[Patch]
translate.y = (int) ((translate.y - e.getY()) / ZOOM_FACTOR) + e.getY();

[Demonstration 2]

[Buggy Method]
public boolean placeBlock(BlockGroup type) {
    IWorldProvider worldProvider = _player.getParent().getWorldProvider();
    RayBlockIntersection.Intersection selectedBlock = _player.getSelectedBlock();
    if (selectedBlock != null) {
        BlockPosition centerPos = selectedBlock.getBlockPosition();
        Block centerBlock = BlockManager.getInstance().getBlock(worldProvider.getBlock(centerPos.x, centerPos.y, centerPos.z));
        if (!centerBlock.isAllowBlockAttachment()) {
            return false;
        }
        BlockPosition blockPos = selectedBlock.calcAdjacentBlockPos();
        Block adjBlock = BlockManager.getInstance().getBlock(worldProvider.getBlock(blockPos.x, blockPos.y, blockPos.z));
        if (adjBlock != null && !adjBlock.isInvisible() && adjBlock.isRenderBoundingBox()) {
            return false;
        }
        // Need two things:
        // 1. The Side of attachment
        Side attachmentSide = Side.inDirection(centerPos.x - blockPos.x, centerPos.y - blockPos.y, centerPos.z - blockPos.z);
        // 2. The secondary direction
        Vector3d attachDir = new Vector3d(centerPos.x - blockPos.x, centerPos.y - blockPos.y, centerPos.z - blockPos.z);
        Vector3d rawDirection = new Vector3d(_player.getViewingDirection());
        double dot = rawDirection.dot(attachDir);
        rawDirection.sub(new Vector3d(dot * attachDir.x, dot * attachDir.y, dot * attachDir.z));
        Side direction = Side.inDirection(rawDirection.x, rawDirection.y, rawDirection.z);
        Block block = type.getBlockFor(attachmentSide, direction);
        if (block == null)
            return false;
        // Prevent players from placing blocks inside their bounding boxes
        if (!block.isPenetrable()) {
            for (AABB blockAABB : block.getColliders(blockPos.x, blockPos.y, blockPos.z)) {
                if (blockAABB.overlaps(_player.getAABB())) {
                    return false;
                }
            }
        }
        placeBlock(blockPos, block.getId(), true);
        AudioManager.getInstance().playVaryingSound("PlaceBlock", 0.6f, 0.5f);
        return true;
    }
    return false;
}

[Buggy Hunk]
if (adjBlock != null && !adjBlock.isInvisible() && adjBlock.isRenderBoundingBox())

[Patch]
if (adjBlock != null && !adjBlock.isInvisible() && !adjBlock.isSelectionRayThrough())

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) {
    DisplayManger.createDisplay();
    Loader loader = new Loader();
    StaticShader shader = new StaticShader();
    Renderer renderer = new Renderer(shader);
    float[] vertices = { -0.5f, 0.5f, 0, -0.5f, -0.5f, 0, 0.5f, -0.5f, 0, 0.5f, 0.5f, 0, -0.5f, 0.5f, 1, -0.5f, -0.5f, 1, 0.5f, -0.5f, 1, 0.5f, 0.5f, 1, 0.5f, 0.5f, 0, 0.5f, -0.5f, 0, 0.5f, -0.5f, 1, 0.5f, 0.5f, 1, -0.5f, 0.5f, 0, -0.5f, -0.5f, 0, -0.5f, -0.5f, 1, -0.5f, 0.5f, 1, -0.5f, 0.5f, 1, -0.5f, 0.5f, 0, 0.5f, 0.5f, 0, 0.5f, 0.5f, 1, -0.5f, -0.5f, 1, -0.5f, -0.5f, 0, 0.5f, -0.5f, 0, 0.5f, -0.5f, 1 };
    float[] textureCoords = { 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0 };
    int[] indices = { 0, 1, 3, 3, 1, 2, 4, 5, 7, 7, 5, 6, 8, 9, 11, 11, 9, 10, 12, 13, 15, 15, 13, 14, 16, 17, 19, 19, 17, 18, 20, 21, 23, 23, 21, 22 };
    RawModel model = loader.loadToVAO(vertices, textureCoords, indices);
    TexturedModel staticModel = new TexturedModel(model, new ModelTexture(loader.loadTexture("image")));
    Entity entity = new Entity(staticModel, new Vector3f(0, 0, -5), 0, 0, 0, 1);
    Camera camera = new Camera();
    while (!Display.isCloseRequested()) {
        entity.increaseRotation(1, 1, 0);
        camera.move();
        renderer.prepare();
        shader.start();
        shader.loadViewMatrix(camera);
        renderer.render(entity, shader);
        shader.stop();
        DisplayManger.updateDisplay();
    }
    shader.cleanUp();
    loader.cleanUP();
    DisplayManger.closeDisplay();
}

[Buggy Hunk]
entity.increaseRotation(1, 1, 0);

[Patch]
entity.increaseRotation(1, 1, 1);