[Demonstration 1]

[Buggy Method]
public double distanceTo(ReferenceablePoint to) throws UnreferenceablePointException {
    if (to == null) {
        throw new UnreferenceablePointException(to);
    }
    double latitude1 = this.getLatitude();
    double longitude1 = this.getLongitude();
    double latitude2 = to.getLatitude();
    double longitude2 = to.getLongitude();
    double latitudeRadians = Math.toRadians(latitude2 - latitude1);
    double longitudeRadians = Math.toRadians(longitude2 - longitude1);
    double a = Math.sin(latitudeRadians / 2) * Math.sin(latitudeRadians / 2) + Math.cos(Math.toRadians(latitude1)) * Math.cos(Math.toRadians(latitude2)) * Math.sin(longitudeRadians / 2) * Math.sin(longitudeRadians / 2);
    double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
    return (Constants.EARTH_RADIUS_METERS * c);
}

[Buggy Hunk]
throw new UnreferenceablePointException(to);

[Patch]
throw new UnreferenceablePointException();

[Demonstration 2]

[Buggy Method]
private int getFirstUpperDeduction() {
    double limit = Math.floor(ppb * 0.423 / 100) * 100;
    Long r = Math.round(limit);
    return r.intValue();
}

[Buggy Hunk]
double limit = Math.floor(ppb * 0.423 / 100) * 100;

[Patch]
double limit = Math.floor(pbb * 0.423 / 100) * 100;

[Demonstration 3]

[Buggy Method]
public String toString() {
    return "" + getSize();
}

[Buggy Hunk]
return ""+getSize();

[Patch]
return "school nr:"+ world.getSchools().indexOf(this)+"of size "+getSize();