[Demonstration 1]

[Buggy Method]
private ButtonInterface getAButton() {
    // TODO Auto-generated method stub
    return new Button();
    ;
}

[Buggy Hunk]
return new Button();;

[Patch]
return new Button();

[Demonstration 2]

[Buggy Method]
@Override
public void refreshData(RouteConfig routeConfig, Selection selection, int maxStops, double centerLatitude, double centerLongitude, VehicleLocations busMapping, RoutePool routePool, Directions directions, Locations locationsObj) throws IOException, ParserConfigurationException, SAXException {
    Selection.Mode mode = selection.getMode();
    switch(mode) {
        case VEHICLE_LOCATIONS_ALL:
        case VEHICLE_LOCATIONS_ONE:
            // no need for that here
            break;
        case BUS_PREDICTIONS_ALL:
        case BUS_PREDICTIONS_ONE:
        case BUS_PREDICTIONS_STAR:
            if (!cache.canUpdateAllPredictions()) {
                return;
            }
            RouteConfig hubwayRouteConfig = routePool.get(routeTag);
            DownloadHelper infoHelper = new DownloadHelper(infoUrl);
            DownloadHelper statusHelper = new DownloadHelper(statusUrl);
            try {
                InputStream infoStream = infoHelper.getResponseData();
                InputStream statusStream = statusHelper.getResponseData();
                HubwayParser parser = new HubwayParser(hubwayRouteConfig);
                parser.runParse(infoStream, statusStream);
                parser.addMissingStops(locationsObj);
                List<PredictionStopLocationPair> pairs = parser.getPairs();
                for (PredictionStopLocationPair pair : pairs) {
                    pair.stopLocation.clearPredictions(null);
                    pair.stopLocation.addPrediction(pair.prediction);
                }
                cache.updateAllPredictions();
            } finally {
                infoHelper.disconnect();
            }
            break;
        default:
            throw new RuntimeException("Unknown mode encountered");
    }
}

[Buggy Hunk]
parser.runParse(infoStream, statusStream);

[Patch]
parser.runParse(new InputStreamReader(infoStream), new InputStreamReader(statusStream));

[Demonstration 3]

[Buggy Method]
public void afterCheckClass(Context context) {
    if (mMethods.size() == 0)
        return;
    JavaContext javaContext = (JavaContext) context;
    JavaEvaluator evaluator = javaContext.getEvaluator();
    if (evaluator == null)
        return;
    StringBuilder sb = new StringBuilder();
    boolean methodInDataAdapter = false;
    for (PsiMethod method : mMethods) {
        PsiClass pc = method.getContainingClass();
        boolean isSubclass = evaluator.extendsClass(pc, CLASS_DATA_ADAPTER, false);
        methodInDataAdapter = methodInDataAdapter || isSubclass;
        if (!isSubclass) {
            sb.append(method.getName()).append(",");
        }
    }
    if (!methodInDataAdapter) {
        context.report(ISSUE_VIEW_GROUP, Location.create(context.file), "the Custom ViewGroup with data bind should extend DataAdapter,method names:" + sb.toString());
    }
}

[Buggy Hunk]
boolean isSubclass = evaluator.extendsClass(pc, CLASS_DATA_ADAPTER, false);

[Patch]
boolean isSubclass = evaluator.implementsInterface(pc, CLASS_DATA_ADAPTER, false);