[Demonstration 1]

[Buggy Method]
public Operable div(Operable other) {
    if (other instanceof Num) {
        Num gcd = this.gcd((Num) other);
        double denominator = ((Num) other).getValue() / gcd.getValue();
        double numerator = value / gcd.getValue();
        if (Math.abs(denominator - 1) < TOLERANCE) {
            return new Num(numerator);
        } else if (Math.abs(denominator + 1) < TOLERANCE) {
            return new Num(numerator * -1);
        } else {
            return new Num(numerator / denominator);
        }
    } else if (other instanceof Complex) {
        return new Complex(this).div(other);
    } else {
        return ONE.div(other.op("/", this));
    }
}

[Buggy Hunk]
return ONE.div(other.op("/", this));

[Patch]
return new Fraction(this, other);

[Demonstration 2]

[Buggy Method]
public void setBatteryController(BatteryController batteryController) {
    mBatteryController = batteryController;
    ((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController);
    mBatteryLevel.setBatteryController(batteryController);
}

[Buggy Hunk]
((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController);

[Patch]
mBatteryMeter.setBatteryController(batteryController);

[Demonstration 3]

[Buggy Method]
@Exported
public float getPercentageFloat() {
    float numerator = covered;
    float denominator = missed + covered;
    return denominator <= 0 ? 0 : 100 * (numerator / denominator);
}

[Buggy Hunk]
return denominator <= 0 ? 0 : 100 * (numerator / denominator);

[Patch]
return denominator <= 0 ? 100 : 100 * (numerator / denominator);