[Demonstration 1]

[Buggy Method]
public Vector projectAlong(Vector rhs) {
    double norm_a = rhs.multiply(rhs);
    if (DoubleUtils.isZero(norm_a)) {
        return new Vector(dimension);
    }
    double sigma = multiply(rhs) / norm_a;
    return rhs.multiply(sigma);
}

[Buggy Hunk]
double norm_a = rhs.multiply(rhs);

[Patch]
double norm_a = Math.sqrt(rhs.multiply(rhs));

[Demonstration 2]

[Buggy Method]
public static void main(final String[] args) throws Exception {
    final Server server = new Server(8080);
    server.setHandler(new WebDemo());
    server.start();
    server.join();
}

[Buggy Hunk]
final Server server = new Server(8080);

[Patch]
final Server server = new Server(Integer.valueOf(args[0]));

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) {
    Complex c1 = new Complex(2, 4), c2 = new Complex(-1, 5.3), c3 = new Complex(4.5, -5.1);
    System.out.println(c1.toString());
    System.out.println(c2.toString());
    System.out.println(c3.toString());
}

[Buggy Hunk]
c3 = new Complex(4.5, -5.1);

[Patch]
c3 = new Complex(0.0, -5.1);