[Demonstration 1]

[Buggy Method]
public void setStamina(double newStamina) {
    Validate.isTrue(newStamina > 0, "Stamina value must be positive.");
    if (Math.round(newStamina) == Math.round(this.getStamina()))
        return;
    double max = DeriusCore.getStaminaMixin().getMax(this);
    double min = 0.0;
    newStamina = Math.max(newStamina, min);
    newStamina = Math.min(newStamina, max);
    this.stamina = newStamina;
    this.changed();
    ScoreboardUtil.updateStaminaScore(this, MConf.get().staminaBoardStay);
}

[Buggy Hunk]
Validate.isTrue(newStamina > 0, "Stamina value must be positive.");

[Patch]
Validate.isTrue(newStamina > -0.1, "Stamina value must be positive.");

[Demonstration 2]

[Buggy Method]
private boolean doTheAlcohol() {
    int bad = getChanceBadTime();
    int rand = ((int) Math.random() * 100);
    return (rand < bad);
}

[Buggy Hunk]
return(rand<bad);

[Patch]
return(bad<rand);

[Demonstration 3]

[Buggy Method]
@Override
public boolean scanSeries(ISeries series, boolean throwTempError) {
    // get series id
    final String tvdbId = series.getId(SOURCE_TVDB);
    if (isNoValidTheTvDbId(tvdbId)) {
        LOG.debug("TVDb id not available '{}'", series.getTitle());
        return false;
    }
    // get series info
    com.omertron.thetvdbapi.model.Series tvdbSeries = theTvDbApiWrapper.getSeries(tvdbId, locale.getLanguage(), throwTempError);
    if (tvdbSeries == null || StringUtils.isBlank(tvdbSeries.getId())) {
        LOG.error("Can't find informations for series '{}'", series.getTitle());
        return false;
    }
    // fill in data
    series.addId(SOURCE_IMDB, tvdbSeries.getImdbId());
    series.setTitle(tvdbSeries.getSeriesName());
    series.setPlot(tvdbSeries.getOverview());
    series.setOutline(tvdbSeries.getOverview());
    series.setRating(MetadataTools.parseRating(tvdbSeries.getRating()));
    series.setGenres(tvdbSeries.getGenres());
    String faDate = tvdbSeries.getFirstAired();
    if (StringUtils.isNotBlank(faDate) && (faDate.length() >= 4)) {
        try {
            series.setStartYear(Integer.parseInt(faDate.substring(0, 4)));
        } catch (Exception ignore) {
            // ignore error if year is invalid
        }
    }
    if (StringUtils.isNotBlank(tvdbSeries.getNetwork())) {
        Set<String> studios = Collections.singleton(tvdbSeries.getNetwork().trim());
        series.setStudios(studios);
    }
    // ACTORS (to store in episodes)
    List<Actor> actors;
    if (configService.isCastScanEnabled(JobType.ACTOR)) {
        actors = theTvDbApiWrapper.getActors(tvdbSeries.getId());
    } else {
        actors = Collections.emptyList();
    }
    // SCAN SEASONS
    scanSeasons(series, tvdbSeries, actors);
    return true;
}

[Buggy Hunk]
com.omertron.thetvdbapi.model.Series tvdbSeries = theTvDbApiWrapper.getSeries(tvdbId, locale.getLanguage(), throwTempError);

[Patch]
Series tvdbSeries = theTvDbApiWrapper.getSeries(tvdbId, locale.getLanguage(), throwTempError);