[Demonstration 1]

[Buggy Method]
public static String secondsToHumanReadableCountDown(Context context, int seconds) {
    if (seconds <= 0) {
        return context.getString(R.string.less_than_a_minute);
    }
    int days = seconds / DAY;
    int hours = (seconds % DAY) / HOUR;
    int minutes = ((seconds % DAY) % HOUR) / MINUTE;
    if (seconds < MINUTE) {
        return context.getString(R.string.less_than_a_minute);
    }
    StringBuilder result = new StringBuilder();
    if (days >= 1) {
        result.append(days).append(" ");
        if (days == 1) {
            result.append(context.getString(R.string.day));
        } else {
            result.append(context.getString(R.string.days));
        }
        if (hours >= 1) {
            if (minutes >= 1) {
                result.append(", ");
            } else {
                result.append(" ").append(context.getString(R.string.and)).append(" ");
            }
        } else if (minutes >= 1) {
            result.append(" ").append(context.getString(R.string.and)).append(" ");
        }
    }
    if (hours >= 1) {
        result.append(hours).append(" ");
        if (days == 1) {
            result.append(context.getString(R.string.hour));
        } else {
            result.append(context.getString(R.string.hours));
        }
        if (minutes >= 1) {
            result.append(" ").append(context.getString(R.string.and)).append(" ");
        }
    }
    if (minutes >= 1) {
        result.append(minutes).append(" ");
        if (minutes == 1) {
            result.append(context.getString(R.string.minute));
        } else {
            result.append(context.getString(R.string.minutes));
        }
    }
    return result.toString();
}

[Buggy Hunk]
if (days == 1) {

[Patch]
if (hours == 1) {

[Demonstration 2]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.recipe);
    recipe = (Recipe) getIntent().getExtras().get("recipe");
    recyclerView = (RecyclerView) findViewById(R.id.recycler_step_container);
    recyclerView.setNestedScrollingEnabled(false);
    collapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.recipe_collapsing_toolbar);
    collapsingToolbar.setTitle(recipe.getName());
    collapsingToolbar.setCollapsedTitleTextColor(Color.WHITE);
    appBar = (AppBarLayout) findViewById(R.id.app_bar_layout);
    toolbar = (Toolbar) findViewById(R.id.recipe_toolbar);
    setupToolbar();
    showDuration = (TextView) findViewById(R.id.show_duration);
    showDuration.setText(recipe.getDuration() + " minutes");
    showPortions = (TextView) findViewById(R.id.show_recipe_portions);
    showPortions.setText(recipe.getPortions() + " portions");
    showCalories = (TextView) findViewById(R.id.show_recipe_calories);
    showCalories.setText(recipe.getCalories() + " calories");
    setupRecyclerView();
    favourite = (FloatingActionButton) findViewById(R.id.recipe_favourite);
    changeFABColor(recipe.isFavourite());
    favourite.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast t;
            FileManager.deleteRecipe(recipe, getFilesDir().toString());
            if (recipe.isFavourite()) {
                recipe.unfav();
                User.user().removeFavouriteRecipe(recipe);
                t = Toast.makeText(getApplicationContext(), R.string.unfav, Toast.LENGTH_SHORT);
            } else {
                recipe.fav();
                User.user().addFavouriteRecipe(recipe);
                t = Toast.makeText(getApplicationContext(), R.string.fav, Toast.LENGTH_SHORT);
            }
            changeFABColor(recipe.isFavourite());
            User.user().updateRecipe(recipe, User.user().recipesSaved.indexOf(recipe));
            FileManager.saveRecipe(recipe, getFilesDir().toString());
            t.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 25);
            t.show();
            setResult(-2);
        }
    });
}

[Buggy Hunk]
showDuration.setText(recipe.getDuration() + " minutes");

[Patch]
showDuration.setText(recipe.preparation.getPreparationTime() + " minutes");

[Demonstration 3]

[Buggy Method]
public void run() {
    currDt = new DateTime();
    Interval interval = new Interval(birthDt, currDt);
    Period period = interval.toPeriod();
    Months diffMonth = Months.monthsBetween(currDt, birthDt);
    // Days diffDay = Days.daysBetween(currDt, birthDt);
    // Hours diffHours = Hours.hoursBetween(currDt, birthDt);
    // Minutes diffMinute = Minutes.minutesBetween(currDt, birthDt);
    ///Seconds diffSecond = Seconds.secondsBetween(currDt, birthDt);
    int currDay = currDt.getDayOfMonth();
    int currMinOfDay = currDt.getMinuteOfDay();
    // birthMinOfDay = 15 * 60 + 6;
    days = currDay - birthDay;
    // day not fully completed
    if (currMinOfDay < birthMinOfDay) {
        // if birthday we take the last day of the last month
        if (days == 0) {
            days = currDt.minusMonths(1).dayOfMonth().withMaximumValue().getDayOfMonth();
        } else // we add the days of  last month
        if (days < 0) {
            days += currDt.minusMonths(1).dayOfMonth().withMaximumValue().getDayOfMonth() - 1;
        } else // reduce because day not completed
        {
            days--;
        }
    } else {
        if (days < 0) {
            days += currDt.minusMonths(1).dayOfMonth().withMaximumValue().getDayOfMonth();
        }
    }
    month = diffMonth.negated().getMonths();
    // hours = diffHours.minus(diffDay.toStandardHours()).negated().getHours();
    hours = period.getHours();
    // min = diffMinute.minus(diffHours.toStandardMinutes()).negated().getMinutes();
    min = period.getMinutes();
    // sec = diffSecond.minus(diffMinute.toStandardSeconds()).negated().getSeconds();
    sec = period.getSeconds();
    String s = month + "m " + days + "d " + hours + "h \n" + min + "m " + sec + "s";
    // Log.d(TAG, "run: " + s);
    floatingFaceBubble.setText(s);
    floatingFaceBubble.invalidate();
    if (!quitService)
        h.postDelayed(this, delay);
}

[Buggy Hunk]
if (currMinOfDay < birthMinOfDay) {

[Patch]
if (currMinOfDay <= birthMinOfDay) {