[Demonstration 1]

[Buggy Method]
public int compareTo(AFSNode other) {
    return Double.compare(other.support, support);
}

[Buggy Hunk]
return Double.compare(other.support, support);

[Patch]
return Float.compare(other.support, support);

[Demonstration 2]

[Buggy Method]
public void saveCanvas(View view) throws FileNotFoundException {
    Date date = new Date();
    File saveFolder = new File(Config.SAVE_LOCATION);
    File file = new File(Config.SAVE_LOCATION + date.toString() + ".jpg");
    if (!saveFolder.exists())
        saveFolder.mkdir();
    getDrawingCache().compress(Bitmap.CompressFormat.JPEG, 100, new FileOutputStream(file));
    Snackbar.make(view, "Drawing saved to " + Config.SAVE_LOCATION, Snackbar.LENGTH_LONG).setAction("Ok", null).show();
    MediaScannerConnection.scanFile(view.getContext(), new String[] { file.toString() }, null, new MediaScannerConnection.OnScanCompletedListener() {

        public void onScanCompleted(String path, Uri uri) {
        }
    });
}

[Buggy Hunk]
File file = new File(Config.SAVE_LOCATION + date.toString() + ".jpg");

[Patch]
File file = new File(Config.SAVE_LOCATION + date.toString() + File.separator + ".jpg");

[Demonstration 3]

[Buggy Method]
public StyleProperties getStyleProperties(String timeseriesId) {
    return getStyleOptions().get(timeseriesId);
}

[Buggy Hunk]
return getStyleOptions().get(timeseriesId);

[Patch]
return styleOptions.get(timeseriesId);