[Demonstration 1]

[Buggy Method]
public GHCommitState getStatus() {
    return (newIssues(Severity.BLOCKER) > 0 || newIssues(Severity.CRITICAL) > 0) ? GHCommitState.ERROR : GHCommitState.SUCCESS;
}

[Buggy Hunk]
return (newIssues(Severity.BLOCKER) > 0 || newIssues(Severity.CRITICAL) > 0) ? GHCommitState.ERROR : GHCommitState.SUCCESS;

[Patch]
return newIssues(Severity.BLOCKER) > 0 || newIssues(Severity.CRITICAL) > 0 ? GHCommitState.ERROR : GHCommitState.SUCCESS;

[Demonstration 2]

[Buggy Method]
@Override
public ItemStack decrStackSize(int slot, int amount) {
    ItemStack itemStack = getStackInSlot(slot);
    if (itemStack != null) {
        if (itemStack.stackSize <= amount) {
            setInventorySlotContents(slot, null);
        } else {
            itemStack = itemStack.splitStack(amount);
        }
    }
    markDirty();
    if (syncClient && !worldObj.isRemote) {
        worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
    }
    return itemStack;
}

[Buggy Hunk]
if (syncClient && !worldObj.isRemote) {

[Patch]
if (syncClient) {

[Demonstration 3]

[Buggy Method]
private void insertItemsFromInputBufferElement(ComponentMenuStuff menuItem, List<SlotInventoryHolder> inventories, List<AdvancedOutputItemCounter> outputCounters, SlotInventoryHolder inventoryHolder, IItemBufferElement itemBufferElement) {
    itemBufferElement.prepareSubElements();
    IInventory inventory = inventoryHolder.getInventory();
    IItemBufferSubElement subElement;
    while ((subElement = itemBufferElement.getSubElement()) != null) {
        ItemStack itemStack = subElement.getItemStack();
        Setting setting = this.isItemValid(menuItem.getSettings(), itemStack);
        if (menuItem.useWhiteList() != (setting == null) || setting != null && setting.isLimitedByAmount()) {
            AdvancedOutputItemCounter outputItemCounter = null;
            for (AdvancedOutputItemCounter slot : outputCounters) {
                if (slot.areSettingsSame(setting)) {
                    outputItemCounter = slot;
                    break;
                }
            }
            if (outputItemCounter == null) {
                outputItemCounter = new AdvancedOutputItemCounter(this.itemBuffer, inventories, inventory, setting, menuItem.useWhiteList());
                outputCounters.add(outputItemCounter);
            }
            if (inventoryHolder.getTile() instanceof IHiddenInventory) {
                IHiddenInventory hidden = (IHiddenInventory) inventoryHolder.getTile();
                int moveCount = Math.min(hidden.getInsertable(itemStack), itemStack.stackSize);
                if (moveCount > 0) {
                    moveCount = Math.min(subElement.getSizeLeft(), moveCount);
                    moveCount = outputItemCounter.retrieveItemCount(moveCount);
                    moveCount = itemBufferElement.retrieveItemCount(moveCount);
                    if (moveCount > 0) {
                        itemBufferElement.decreaseStackSize(moveCount);
                        outputItemCounter.modifyStackSize(moveCount);
                        ItemStack toInsert = itemStack.copy();
                        toInsert.stackSize = moveCount;
                        hidden.insertItemStack(toInsert);
                        subElement.reduceAmount(moveCount);
                        if (subElement.getSizeLeft() == 0) {
                            subElement.remove();
                            itemBufferElement.removeSubElement();
                        }
                        subElement.onUpdate();
                    }
                }
            } else {
                for (SlotSideTarget slot : inventoryHolder.getValidSlots().values()) {
                    if (this.isSlotValid(inventory, itemStack, slot, false)) {
                        ItemStack itemInSlot = inventory.getStackInSlot(slot.getSlot());
                        boolean newItem = itemInSlot == null;
                        if (newItem || itemInSlot.isItemEqual(itemStack) && ItemStack.areItemStackTagsEqual(itemStack, itemInSlot) && itemStack.isStackable()) {
                            int itemCountInSlot = newItem ? 0 : itemInSlot.stackSize;
                            int moveCount = Math.min(subElement.getSizeLeft(), Math.min(inventory.getInventoryStackLimit(), itemStack.getMaxStackSize()) - itemCountInSlot);
                            moveCount = outputItemCounter.retrieveItemCount(moveCount);
                            moveCount = itemBufferElement.retrieveItemCount(moveCount);
                            if (moveCount > 0) {
                                if (newItem) {
                                    itemInSlot = itemStack.copy();
                                    itemInSlot.stackSize = 0;
                                }
                                itemBufferElement.decreaseStackSize(moveCount);
                                outputItemCounter.modifyStackSize(moveCount);
                                itemInSlot.stackSize += moveCount;
                                subElement.reduceAmount(moveCount);
                                if (newItem) {
                                    inventory.setInventorySlotContents(slot.getSlot(), itemInSlot);
                                }
                                boolean done = false;
                                if (subElement.getSizeLeft() == 0) {
                                    subElement.remove();
                                    itemBufferElement.removeSubElement();
                                    done = true;
                                }
                                inventory.markDirty();
                                subElement.onUpdate();
                                if (done) {
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    itemBufferElement.releaseSubElements();
}

[Buggy Hunk]
if (this.isSlotValid(inventory, itemStack, slot, false))

[Patch]
if (this.isSlotValid(inventory, itemStack, slot, false, true))