[Demonstration 1]

[Buggy Method]
@Override
public void execute(Mob mob_, String input_) {
    super.execute(mob_, input_);
    int numberOfLevels = 1;
    if (input_.length() > 0) {
        numberOfLevels = Integer.parseInt(input_);
    }
    while (numberOfLevels-- > 0) {
        int xp = mob_.getPlayer().getData().getToLevelXp();
        mob_.getPlayer().getData().addXp(xp);
        mob_.getPlayer().checkIfLeveled();
    }
}

[Buggy Hunk]
int xp = mob_.getPlayer().getData().getToLevelXp();

[Patch]
long xp = mob_.getPlayer().getData().getToLevelXp();

[Demonstration 2]

[Buggy Method]
@Override
public long skip(long bytes) throws IOException {
    if (bytes < 0) {
        throw new IndexOutOfBoundsException("Negative length: " + bytes);
    }
    // if we have some bytes left in buffer, just shift position, but only if we have some remaining
    // bytes left after this operation
    if (uncompressed.remaining() > bytes) {
        uncompressed.position(uncompressed.position() + (int) bytes);
        return bytes;
    }
    // at this point, we are short on bytes to skip, we need to indicate to source that we require
    // seeking to new offset, after this refill buffer
    if (codec == null) {
        // for uncompressed input stream, we just reposition pointer in source
        int nextPosition = source.position() + (int) (bytes - uncompressed.remaining());
        if (nextPosition > source.length()) {
            // at this point we reached EOF, just set it, so next copy will result in 0 copied bytes
            bytes = source.length() - source.position();
            source.seek(source.length());
        } else {
            bytes = nextPosition - source.position();
            source.seek(nextPosition);
        }
        readChunk();
        return bytes;
    } else {
        // for compressed input stream, we will have to read bytes in order to determine skip position
        int diff = (int) (bytes - uncompressed.remaining());
        while (source.length() > source.position()) {
            readChunk();
            if (uncompressed.remaining() > diff) {
                uncompressed.position(uncompressed.position() + diff);
                // we can skip all requested bytes, return the same number
                return bytes;
            }
            diff -= uncompressed.remaining();
        }
        // at this point source enountered EOF, return read bytes so far
        return bytes - diff;
    }
}

[Buggy Hunk]
if (uncompressed.remaining() > bytes) {

[Patch]
if (uncompressed.remaining() >= bytes) {

[Demonstration 3]

[Buggy Method]
public void escape(EscapeState state) {
    /* Dijkstra implementation */
    nodes = new ArrayList<Node>(state.getVertices());
    distance.put(state.getExit(), 0);
    unvisitedNodes.add(state.getExit());
    while (unvisitedNodes.size() > 0) {
        Node node = getMin(unvisitedNodes);
        visitedNodes.add(node);
        unvisitedNodes.remove(node);
        findShortestRoute(node);
    }
    List<Node> path = new ArrayList();
    Node step = state.getCurrentNode();
    path.add(step);
    while (prev.get(step) != null) {
        step = prev.get(step);
        path.add(step);
    }
    for (Node node : path) {
        if (!(node == state.getCurrentNode())) {
            state.moveTo(node);
            if (node.getTile().getGold() > 0) {
                state.pickUpGold();
            }
            // Count how many times for no fail, need function for calculating path weight
            for (Node child : state.getCurrentNode().getNeighbours()) {
                if (child.getTile().getGold() > 0 && state.getTimeRemaining() > lengthRemaining(path, node)) {
                    state.moveTo(child);
                    state.pickUpGold();
                    state.moveTo(node);
                }
            }
        }
    }
    int gold = 0;
    for (Node node : nodes) {
        gold += node.getTile().getOriginalGold();
    }
    System.out.println("--- Efficiency --- ");
    System.out.println(">> Total Gold: " + gold);
    System.out.println(">> Time Remaining: " + state.getTimeRemaining());
}

[Buggy Hunk]
if(child.getTile().getGold() > 0 && state.getTimeRemaining() > lengthRemaining(path, node)){

[Patch]
if(child.getTile().getGold() > 0 && state.getTimeRemaining() > (lengthRemaining(path, node) + child.getEdge(node).length())){