[Demonstration 1]

[Buggy Method]
@Override
public int compareTo(Action that) {
    return this.getSpeed() - that.getSpeed();
}

[Buggy Hunk]
return this.getSpeed() - that.getSpeed();

[Patch]
return that.getSpeed() - this.getSpeed();

[Demonstration 2]

[Buggy Method]
public void greenSliderAction() {
    greenLabel.setText(String.format("%.0f", greenslider.getValue()));
    //System.out.println(greenslider.getValue());
}

[Buggy Hunk]
greenLabel.setText(String.format("%.0f",greenslider.getValue()));

[Patch]
greenLabel.setText(""+((int)(new Double(greenslider.getValue()).byteValue())));

[Demonstration 3]

[Buggy Method]
private CreationInfo attemptRetroactiveLoan(LoansDatabase database, Loan loan) {
    // We want to find creation infos for a loan that might match this.
    List<Loan> similarLoans = database.getLoansWithBorrowerAndOrLender(loan.borrowerId, loan.lenderId, true);
    int[] similarLoanIds = new int[similarLoans.size()];
    for (int i = 0; i < similarLoans.size(); i++) {
        similarLoanIds[i] = similarLoans.get(i).id;
    }
    List<CreationInfo> similarCreationInfos = database.getCreationInfoByLoanId(similarLoanIds);
    for (Loan simLoan : similarLoans) {
        CreationInfo simLoanInfo = null;
        for (CreationInfo cInfo : similarCreationInfos) {
            if (cInfo.loanId == simLoan.id) {
                simLoanInfo = cInfo;
                break;
            }
        }
        if (simLoanInfo == null)
            continue;
        if (simLoanInfo.type == CreationInfo.CreationType.PAID_SUMMON && simLoan.principalCents >= loan.principalCents) {
            // This is the loan!
            loan.id = simLoanInfo.id;
            return simLoanInfo;
        }
    }
    return null;
}

[Buggy Hunk]
loan.id = simLoanInfo.id;

[Patch]
loan.id = simLoan.id;