[Demonstration 1]

[Buggy Method]
protected double distanceNodeFromLocation(GPSMapNode node, Location location) {
    int xDifference = node.getX() - location.getBlockX();
    int yDifference = node.getY() - location.getBlockY();
    int zDifference = node.getZ() - location.getBlockZ();
    return Math.sqrt(xDifference * xDifference + yDifference * yDifference + zDifference * zDifference);
}

[Buggy Hunk]
protected double distanceNodeFromLocation(GPSMapNode node, Location location)

[Patch]
static protected double distanceNodeFromLocation(GPSMapNode node, Location location)

[Demonstration 2]

[Buggy Method]
public GameStateChild alphaBetaSearch(GameStateChild node, int depth, double alpha, double beta) {
    int maxval = -infinity;
    int childval;
    List<GameStateChild> children = new ArrayList<GameStateChild>();
    children = node.state.getChildren();
    if (children == null)
        return node;
    children = orderChildrenWithHeuristics(children);
    for (int i = 0; i < children.size(); i++) {
        childval = alphabeta(children.get(i), depth, alpha, beta, true);
        if (childval > maxval) {
            maxval = childval;
            node = children.get(i);
        }
    }
    return node;
}

[Buggy Hunk]
childval = alphabeta(children.get(i), depth, alpha, beta, true);

[Patch]
childval = alphabeta(children.get(i), depth-1, alpha, beta, false);

[Demonstration 3]

[Buggy Method]
public DigestChallengeResponse algorithm(String algorithm) {
    if (!"MD5".equals(algorithm)) {
        throw new IllegalArgumentException("Unsupported algorithm: " + algorithm);
    }
    this.algorithm = algorithm;
    return this;
}

[Buggy Hunk]
if (!"MD5".equals(algorithm)) {

[Patch]
if (algorithm != null && !"MD5".equals(algorithm)) {