[Demonstration 1]

[Buggy Method]
public void initialise(NavigationItem tabItem) {
    ivIcon.setSelected(false);
    activeColor = tabItem.getActiveColor() != -1 ? tabItem.getInactiveColor() : fetchContextColor(getContext(), R.attr.colorAccent);
    inActiveColor = tabItem.getInactiveColor() != -1 ? tabItem.getInactiveColor() : Color.LTGRAY;
    if (tabItem.isInActiveIconAvailable()) {
        StateListDrawable states = new StateListDrawable();
        states.addState(new int[] { android.R.attr.state_selected }, tabItem.getActiveIcon());
        states.addState(new int[] { -android.R.attr.state_selected }, tabItem.getInactiveIcon());
        states.addState(new int[] {}, tabItem.getInactiveIcon());
        ivIcon.setImageDrawable(states);
    } else {
        Drawable drawable = DrawableCompat.wrap(tabItem.getInactiveIcon());
        DrawableCompat.setTintList(drawable, new ColorStateList(new int[][] { //1
        new int[] { android.R.attr.state_selected }, //2
        new int[] { -android.R.attr.state_selected }, new int[] {} }, new int[] { //1
        activeColor, //2
        inActiveColor, //3
        inActiveColor }));
        ivIcon.setImageDrawable(drawable);
    }
    setText(tabItem.getTitle());
}

[Buggy Hunk]
activeColor = tabItem.getActiveColor() != -1 ? tabItem.getInactiveColor() : fetchContextColor(getContext(), R.attr.colorAccent);

[Patch]
activeColor = tabItem.getActiveColor() != -1 ? tabItem.getActiveColor() : fetchContextColor(getContext(), R.attr.colorAccent);

[Demonstration 2]

[Buggy Method]
private void checkForTargetCrapContact() {
    for (int i = mCraps.size() - 1; i >= 0; i--) {
        Crap crap = mCraps.get(i);
        if (!crap.getFalling()) {
            break;
        } else {
            for (int j = mTargets.size() - 1; j >= 0; j--) {
                Target target = mTargets.get(j);
                if (target.collidesWith(crap)) {
                    target.hitByCrap();
                    detachChild(mCraps.get(i));
                    mCrapPool.recyclePoolItem(mCraps.get(i));
                    mCraps.remove(i);
                    score++;
                    mHudText.setText(String.valueOf(score));
                }
            }
        }
    }
}

[Buggy Hunk]
if(!crap.getFalling()) {

[Patch]
if(!crap.getFalling() || mGameOver) {

[Demonstration 3]

[Buggy Method]
public int parseRaceNumber() {
    // This is only going to work for Twilight races which use format
    // <Name>2015-10-21RSTS_2_FaddenPines</Name>
    // for example
    int start = this.name.indexOf("_");
    int stop = this.name.indexOf("_", start + 1);
    if (start != -1 || stop != -1) {
        String sRaceNumber = this.name.substring(start + 1, stop);
        this.raceNumber = Integer.parseInt(sRaceNumber);
        return this.raceNumber;
    } else
        return 1;
}

[Buggy Hunk]
if (start != -1 || stop != -1){

[Patch]
if (start != -1 && stop != -1){