[Demonstration 1]

[Buggy Method]
private void lightsOut() {
    final View view = findViewById(R.id.second_pane);
    view.setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
    getActionBar().hide();
    view.postDelayed(new Runnable() {

        public void run() {
            view.setSystemUiVisibility(View.STATUS_BAR_VISIBLE);
            getActionBar().show();
        }
    }, 5000);
}

[Buggy Hunk]
final View view=findViewById(R.id.second_pane);

[Patch]
final View view=findViewById(android.R.id.content);

[Demonstration 2]

[Buggy Method]
private ABObject calculateBestMultiplePigShot() {
    // idea: try to find shot which maximize pigs on the trajectory
    // -> : just search around every pig for shot and check his trajectories
    TrajectoryPlanner tp = GameState.getTrajectoryPlanner();
    ABObject currentBird = getBirdOnSlingshot();
    int birdRadius = (int) ((Circle) currentBird).r;
    ArrayList<Point> possibleTargetPoints = new ArrayList<>(generatePointsAroundTargets(pigs, birdRadius));
    Point bestShot = null;
    ABObject.TrajectoryType bestTrajType = null;
    int maxAmountOfPigsOnTraj = -1;
    int safeAmountOfPigsOnTraj = -1;
    // TODO: maybe also use better slingshot finding function
    for (Point ptp : possibleTargetPoints) {
        //get predicted trajectory and check for every object if it gets hit
        ArrayList<Point> estimatedLaunchPoints = tp.estimateLaunchPoint(slingshot, ptp);
        ABObject.TrajectoryType currentTrajectoryType;
        for (int i = 0; i < estimatedLaunchPoints.size(); i++) {
            Point estimatedLaunchPoint = estimatedLaunchPoints.get(i);
            if (i == 0) {
                currentTrajectoryType = ABObject.TrajectoryType.LOW;
            } else {
                currentTrajectoryType = ABObject.TrajectoryType.HIGH;
            }
            ArrayList<Point> predictedTrajectory = new ArrayList<>(tp.predictTrajectory(vision.findSlingshotMBR(), estimatedLaunchPoint));
            ArrayList<ABObject> pigsOnTraj, objsOnTraj, correctedPigs, allObjsOnTraj;
            allObjsOnTraj = new ArrayList<>(this.getObjectsOnTrajectory(predictedTrajectory));
            objsOnTraj = new ArrayList<>();
            pigsOnTraj = new ArrayList<>();
            correctedPigs = new ArrayList<>();
            int minX = 10000;
            // now we know which objects intersect with the trajectory,
            // now check which pigs would be hit behind 1st object
            // get MinX Value and remove all pigs behind this x
            for (ABObject obj : allObjsOnTraj) {
                if (obj.getType() == ABType.Pig) {
                    pigsOnTraj.add(obj);
                } else {
                    objsOnTraj.add(obj);
                    if (obj.movedX < minX) {
                        minX = obj.movedX;
                    }
                }
            }
            for (ABObject pig : pigsOnTraj) {
                if (pig.x <= minX) {
                    correctedPigs.add(pig);
                }
            }
            // now we got the corrected value of pigs on this trajectory, now return the best?!
            if (correctedPigs.size() > safeAmountOfPigsOnTraj) {
                safeAmountOfPigsOnTraj = correctedPigs.size();
                maxAmountOfPigsOnTraj = pigsOnTraj.size();
                bestTrajType = currentTrajectoryType;
                bestShot = ptp;
                System.out.println(bestShot + " : " + minX + " - " + allObjsOnTraj);
                System.out.println(pigsOnTraj + " : " + objsOnTraj + " : " + correctedPigs);
            }
        }
    }
    ABObject pseudoObject = new ABObject(new Rectangle(bestShot), ABType.BestMultiplePigShot);
    pseudoObject.setTrajectoryType(bestTrajType);
    pseudoObject.setPigsOnTraj(safeAmountOfPigsOnTraj, maxAmountOfPigsOnTraj);
    System.out.println("Best shot: " + bestShot + " - " + bestTrajType + " will kill approx: " + safeAmountOfPigsOnTraj + " to " + maxAmountOfPigsOnTraj);
    return pseudoObject;
}

[Buggy Hunk]
ArrayList<Point> predictedTrajectory = new ArrayList<>(tp.predictTrajectory(vision.findSlingshotMBR(), estimatedLaunchPoint));

[Patch]
ArrayList<Point> predictedTrajectory = new ArrayList<>(tp.predictTrajectory(slingshot, estimatedLaunchPoint));

[Demonstration 3]

[Buggy Method]
@Override
public void setTitle(CharSequence title) {
    mTitle = title;
    getActionBar().setTitle(mTitle);
}

[Buggy Hunk]
getActionBar().setTitle(mTitle);

[Patch]
getSupportActionBar().setTitle(mTitle);