[Demonstration 1]

[Buggy Method]
private boolean checkURL(String urlString) {
    try {
        urlString = urlString;
        URL url = new URL(urlString);
        HttpURLConnection huc = (HttpURLConnection) url.openConnection();
        huc.setRequestMethod("HEAD");
        huc.setInstanceFollowRedirects(false);
        return (huc.getResponseCode() == HttpURLConnection.HTTP_OK);
    } catch (Exception e) {
        System.out.println("Error checking url (" + urlString + ") " + e.toString());
        return false;
    }
}

[Buggy Hunk]
urlString = urlString;

[Patch]
urlString = urlString.replace("https://data.virtualflybrain.org:5000/VFB","http://www.virtualflybrain.org/data/VFB");

[Demonstration 2]

[Buggy Method]
public static URI getPossiblyRelativisedUri(URI uri) {
    // Implemented abusing Java7's {@link Path}, which is intended for file
    // paths, for http URIs.
    URI ret = uri;
    if (THIS_URI.getScheme().equalsIgnoreCase(uri.getScheme()) && THIS_URI.getAuthority().equals(uri.getAuthority())) {
        // Chopping off scheme and authority to process the URI using Path
        String uripathstring = uri.toString();
        uripathstring = uripathstring.substring(THIS_SCHEME_AND_AUTHORITY_STRING.length(), uripathstring.length());
        try {
            ret = new URI(THIS_PATH.relativize(Paths.get(uripathstring)).toString());
        } catch (URISyntaxException e) {
            LOG.log(Level.WARNING, "Had an issue relativising URI {0}", new Object[] { uri });
        }
    }
    return ret;
}

[Buggy Hunk]
ret = new URI(THIS_PATH.relativize(Paths.get(uripathstring)).toString());

[Patch]
ret = new URI(THIS_PATH.relativize(Paths.get(uripathstring)).toString()).normalize();

[Demonstration 3]

[Buggy Method]
public void update() {
    setDt(getDt() + 6);
    if (getX() < 0) {
        gone();
    }
    if (oscillating) {
        setDy(4 * Math.sin(getDt() * Math.PI / 180));
    }
    if (shooting) {
        //setDy(7);
        //super.imageView.setEffect(new Glow(.3));
    }
    updateX();
    updateY();
    syncCoords();
}

[Buggy Hunk]
if(getX()<0){

[Patch]
if(getX()<0 - getWidth()){