[Demonstration 1]

[Buggy Method]
public void requestLocationUpdates() {
    Criteria criteria = new Criteria();
    mProvider = mLocationManager.getBestProvider(criteria, false);
    if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
        // TODO: Consider calling
        //    ActivityCompat#requestPermissions
        // here to request the missing permissions, and then overriding
        //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
        //                                          int[] grantResults)
        // to handle the case where the user grants the permission. See the documentation
        // for ActivityCompat#requestPermissions for more details.
        return;
    }
    Location location = mLocationManager.getLastKnownLocation(mProvider);
    if (location != null) {
        onLocationChanged(location);
    }
    mLocationManager.requestLocationUpdates(mProvider, 2000, 1000f, this, Looper.myLooper());
}

[Buggy Hunk]
mLocationManager.requestLocationUpdates(mProvider, 2000, 1000f, this, Looper.myLooper());

[Patch]
mLocationManager.requestLocationUpdates(mProvider, TEN_MINUTES, 1000f, this, Looper.myLooper());

[Demonstration 2]

[Buggy Method]
@Override
public List<Modification> getModificationsByPeptideId(long peptideID) {
    List<Modification> modificationList = new ArrayList<>();
    if (modMapping.isEmpty()) {
        try {
            CachedDataAccessController parser = parserCache.getParser(experimentIdentifier, true);
            for (Comparable proteinID : parser.getProteinIds()) {
                List<uk.ac.ebi.pride.utilities.data.core.Modification> mods = parser.getPTMs(proteinID, peptideID);
                for (uk.ac.ebi.pride.utilities.data.core.Modification aMod : mods) {
                    try {
                        modificationList.add((Modification) modFactory.getModification(adapter, aMod.getName()));
                    } catch (ParameterExtractionException ex) {
                        LOGGER.error("Could not load " + aMod.getName() + " .Reason :" + ex);
                    }
                }
            }
        } catch (TimeoutException | InterruptedException | ExecutionException ex) {
            LOGGER.error("The parser timed out before it could deliver all the modifications");
        }
    } else {
        modificationList.addAll(modMapping.getOrDefault(peptideID, new ArrayList<Modification>()));
    }
    return modificationList;
}

[Buggy Hunk]
} catch (ParameterExtractionException ex) {

[Patch]
} catch (NullPointerException |ParameterExtractionException ex) {

[Demonstration 3]

[Buggy Method]
public void notifyChanged(Notification notification) {
    super.notifyChanged(notification);
    if (notification.getFeature() instanceof EAttributeImpl) {
        if (notification.getNotifier() instanceof BoundsImpl) {
            reposition(((BoundsImpl) notification.getNotifier()).getX(), ((BoundsImpl) notification.getNotifier()).getY(), ((BoundsImpl) notification.getNotifier()).getWidth(), getTreeHeight());
            FigureCanvas canvas = (FigureCanvas) getViewer().getControl();
            canvas.getViewport().repaint();
        }
    }
}

[Buggy Hunk]
getTreeHeight());

[Patch]
TreeNodeUtils.getTreeHeight(inputRootTreeNode, LEAF_HEIGHT));