[Demonstration 1]

[Buggy Method]
public Point2D nearest(Point2D p) {
    if (p == null)
        throw new IllegalArgumentException("Can not check null Point");
    final Iterator<Point2D> pointsIterator = pointsOnSquare.iterator();
    if (pointsIterator.hasNext()) {
        Point2D nearest = pointsIterator.next();
        double minDistance = p.distanceTo(nearest);
        while (pointsIterator.hasNext()) {
            final Point2D currentPoint = pointsIterator.next();
            final double currentDistance = p.distanceTo(currentPoint);
            if (currentDistance < minDistance) {
                minDistance = currentDistance;
                nearest = currentPoint;
            }
        }
        return nearest;
    }
    return null;
}

[Buggy Hunk]
final Iterator<Point2D> pointsIterator = pointsOnSquare.iterator();

[Patch]
final Iterator<Point2D> pointsIterator = points.iterator();

[Demonstration 2]

[Buggy Method]
@Override
public KeyValueNode<K, V> next(final KeyValueNode<K, V> current) {
    if (null == current) {
        return this.content[0];
    } else {
        boolean found = false;
        for (int i = 0; i < this.content.length; i++) {
            final KeyValueNode<K, V> kvn = this.content[i];
            if (found) {
                return kvn;
            }
            if (kvn.key.equals(current)) {
                found = true;
            }
        }
    }
    return null;
}

[Buggy Hunk]
if (kvn.key.equals (current)) {

[Patch]
if (kvn.key.equals (current.key)) {

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws InputException {
    Scanner scanner = new Scanner(new BufferedInputStream(System.in));
    while (scanner.hasNext()) {
        String input = scanner.nextLine();
        if (!input.isEmpty()) {
            System.out.println(Solver.calculateTime(input));
            break;
        }
    }
    scanner.close();
}

[Buggy Hunk]
while (scanner.hasNext()) {

[Patch]
while (scanner.hasNextLine()) {