[Demonstration 1]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
    AppInitialization appInitialization = new AppInitialization(getApplicationContext());
    appInitialization.initializeApp();
    if (appInitialization.needSetup()) {
        Intent intent = new Intent(this, SetupActivity.class);
        startActivity(intent);
        finish();
    } else {
        GcmInitialization gcmInitialization = new GcmInitialization();
        gcmInitialization.initializeGcmToken(this);
    }
    receiveData();
    setContentView(R.layout.activity_main);
    if (!BuildConfig.DEBUG) {
        Button refresh = (Button) findViewById(R.id.button_refresh);
        refresh.setVisibility(View.INVISIBLE);
    }
}

[Buggy Hunk]
refresh.setVisibility(View.INVISIBLE);

[Patch]
refresh.setVisibility(View.GONE);

[Demonstration 2]

[Buggy Method]
public boolean exitAtEnd(List<Double> prices, double low, double high, String lasttime) {
    double curprice = prices.get(prices.size() - 1);
    double enterprice = buysell.getEnterprice();
    double curprofit = getPft(enterprice, curprice, buysell.getType());
    int size = prices.size();
    if (curprofit >= getExitAtEndProfit()) {
        LoggerUtil.getLogger().info(buysell.getSymbol() + "  " + lasttime + "  " + curprofit);
        if (exitAtEndTimer == 0) {
            exitAtEndTimer = System.currentTimeMillis();
        }
        if (((System.currentTimeMillis() - exitAtEndTimer) > 75000)) {
            return sellStock(curprice, curprofit, "Endday", lasttime);
        }
    } else if (size >= 3) {
        double price1 = prices.get(size - 1);
        double price2 = prices.get(size - 2);
        double price3 = prices.get(size - 3);
        double loss1 = getPft(enterprice, price1, buysell.getType());
        double loss2 = getPft(enterprice, price2, buysell.getType());
        double loss3 = getPft(enterprice, price3, buysell.getType());
        int qty = buysell.getbudget();
        loss1 = loss1 * qty;
        loss2 = loss2 * qty;
        loss3 = loss3 * qty;
        LoggerUtil.getLogger().info(buysell.getSymbol() + "  " + loss1 + "  " + loss2 + "  " + loss3);
        if (loss1 < lossthreshold && loss2 < lossthreshold && loss3 < lossthreshold) {
            return sellStock(price1, loss1, "Endday", lasttime);
        }
    }
    if (curdate.equals(buysell.getExpiry())) {
        return sellStock(curprice, curprofit, "Endday", lasttime);
    }
    return false;
}

[Buggy Hunk]
if(curprofit >= getExitAtEndProfit()){

[Patch]
if((curprofit >= getExitAtEndProfit()) || (exitAtEndTimer > 0)){

[Demonstration 3]

[Buggy Method]
private void updateSize(EntityPlayer player, IMorphing cap) {
    Model data = cap.getCurrentMorph().model;
    String key = player.isElytraFlying() ? "flying" : (player.isSneaking() ? "sneaking" : "standing");
    float[] pose = data.poses.get(key).size;
    float width = pose[0];
    float height = pose[1];
    player.eyeHeight = height * 0.9F;
    /* This is a total rip-off of EntityPlayer#setSize method */
    if (width != player.width || height != player.height) {
        float f = player.width;
        AxisAlignedBB axisalignedbb = player.getEntityBoundingBox();
        player.width = width;
        player.height = height;
        player.setEntityBoundingBox(new AxisAlignedBB(axisalignedbb.minX, axisalignedbb.minY, axisalignedbb.minZ, axisalignedbb.minX + width, axisalignedbb.minY + height, axisalignedbb.minZ + width));
        if (player.width > f && !player.worldObj.isRemote) {
            player.moveEntity(f - player.width, 0.0D, f - player.width);
        }
    }
}

[Buggy Hunk]
private void updateSize(EntityPlayer player, IMorphing cap)

[Patch]
public void updateSize(EntityPlayer player, IMorphing cap)