[Demonstration 1]

[Buggy Method]
Coin getTxBalance(Iterable<Transaction> txs, boolean toMe) {
    lock.lock();
    try {
        Coin value = Coin.ZERO;
        for (Transaction tx : txs) {
            //                log.info("tx {}", tx.getHash());
            //                log.info("tx.getValue {}", tx.getValue(this));
            //                log.info("tx.getValueSentToMe {}", tx.getValueSentToMe(this));
            //                log.info("tx.getValueSentFromMe {}", tx.getValueSentFromMe(this));
            //                log.info("Balance for tx {}", tx.getHash());
            //                for (TransactionOutput txo : tx.getOutputs()) {
            //                    log.info("|- {} txo {} value {}",
            //                            txo.isAvailableForSpending() ? Pool.UNSPENT : Pool.SPENT,
            //                            txo.getIndex(), txo.getValue());
            //                }
            if (toMe) {
                value = value.add(tx.getValueSentToMe(this));
            } else {
                value = value.add(tx.getValue(this));
            }
        }
        return value;
    } finally {
        lock.unlock();
    }
}

[Buggy Hunk]
value = value.add(tx.getValueSentToMe(this));

[Patch]
value = value.add(tx.getValueSentToMe(this, false));

[Demonstration 2]

[Buggy Method]
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
    t.setAlpha(mAlpha);
    final View view = mView;
    final float w = view.getWidth();
    final float h = view.getHeight();
    final Matrix m = t.getMatrix();
    final float rX = mRotationX;
    final float rY = mRotationY;
    final float rZ = mRotationZ;
    if ((rX != 0) || (rY != 0) || (rZ != 0)) {
        final Camera camera = mCamera;
        final boolean hasPivot = mHasPivot;
        final float pX = hasPivot ? mPivotX : w / 2f;
        final float pY = hasPivot ? mPivotY : h / 2f;
        camera.save();
        camera.rotateX(rX);
        camera.rotateY(rY);
        camera.rotateZ(-rZ);
        camera.getMatrix(m);
        camera.restore();
        m.preTranslate(-pX, -pY);
        m.postTranslate(pX, pY);
    }
    final float sX = mScaleX;
    final float sY = mScaleY;
    if ((sX != 0) || (sX != 0)) {
        final float deltaSX = ((sX * w) - w) / 2f;
        final float deltaSY = ((sY * h) - h) / 2f;
        m.postScale(sX, sY);
        m.postTranslate(-deltaSX, -deltaSY);
    }
    m.postTranslate(mTranslationX, mTranslationY);
}

[Buggy Hunk]
if ((sX != 0) || (sX != 0)) {

[Patch]
if ((sX != 0) || (sY != 0)) {

[Demonstration 3]

[Buggy Method]
public double getQuizScorePercent() {
    if (totalQuestionsCorrect > 0 && totalQuizQuestions > 0) {
        double score = (totalQuestionsCorrect / totalQuizQuestions) * 100;
        return Precision.round(score, 0);
    }
    return 0;
}

[Buggy Hunk]
double score = (totalQuestionsCorrect / totalQuizQuestions) * 100;

[Patch]
double score = ((double) totalQuestionsCorrect / totalQuizQuestions) * 100;