[Demonstration 1]

[Buggy Method]
@HotMethod
private boolean runOneTenthLowHandler(int i) {
    boolean busy = false;
    for (int j = i; j < mediumHandlers.size(); j += 10) {
        EventHandler handler = mediumHandlers.get(j);
        try {
            busy |= handler.action();
        } catch (InvalidEventHandlerException e) {
            mediumHandlers.remove(i--);
            closeQuietly(handler);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    return busy;
}

[Buggy Hunk]
mediumHandlers.remove(i--);

[Patch]
mediumHandlers.remove(j);

[Demonstration 2]

[Buggy Method]
private Room parseRoom(Node item) {
    Room room = new Room();
    try {
        if (item.getNodeType() == Node.ELEMENT_NODE) {
            Element levelData = (Element) item;
            NamedNodeMap attributes = levelData.getAttributes();
            int spawnX = Integer.parseInt(attributes.getNamedItem("spawnX").getNodeValue());
            int spawnY = Integer.parseInt(attributes.getNamedItem("spawnY").getNodeValue());
            String background = attributes.getNamedItem("background").getNodeValue();
            ArrayList<Wall> walls = parseWalls(levelData);
            ArrayList<Floor> floors = parseFloors(levelData);
            ArrayList<Bubble> bubbles = parseBubbles(levelData);
            ArrayList<Floor> movableFloors = parseMovableFloors(levelData);
            floors.addAll(movableFloors);
            room = new Room(walls, floors, bubbles, spawnX, spawnY, background);
            room.addMovables(movableFloors);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return room;
}

[Buggy Hunk]
private Room parseRoom(Node item) {

[Patch]
public Room parseRoom(Node item) {