[Demonstration 1]

[Buggy Method]
@Override
public void readFromNBT(NBTTagCompound nbtTagCompound) {
    super.readFromNBT(nbtTagCompound);
    // Read in the ItemStacks in the inventory from NBT
    NBTTagList tagList = nbtTagCompound.getTagList(Names.NBT.ITEMS, 10);
    vatItemStacks = new ItemStack[this.getSizeInventory()];
    for (int i = 0; i < tagList.tagCount(); ++i) {
        NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
        byte slotIndex = tagCompound.getByte("Slot");
        if (slotIndex >= 0 && slotIndex < vatItemStacks.length) {
            vatItemStacks[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
        }
    }
    currentWaste.readFromNBT(nbtTagCompound);
}

[Buggy Hunk]
currentWaste.readFromNBT(nbtTagCompound);

[Patch]
tank.readFromNBT(nbtTagCompound);

[Demonstration 2]

[Buggy Method]
private Object createNbtTag(NbtType type, String name, Object value) {
    Object tag = invokeMethod(NBT_CREATE_TAG, null, (byte) type.id, name);
    if (value != null) {
        setFieldValue(getDataField(type, tag), tag, value);
    }
    return tag;
}

[Buggy Hunk]
Object tag = invokeMethod(NBT_CREATE_TAG, null, (byte)type.id, name);

[Patch]
Object tag = invokeMethod(NBT_CREATE_TAG, null, (byte)type.id);

[Demonstration 3]

[Buggy Method]
protected static List<ItemStack> copyAndExpand(@Nonnull ItemStack stack) {
    NonNullList<ItemStack> stacks = NonNullList.create();
    ItemStack base = stack.copy();
    stacks.add(base);
    if (base.isItemStackDamageable())
        base.setItemDamage(0);
    if (base.getMetadata() == OreDictionary.WILDCARD_VALUE && !base.getHasSubtypes())
        base.setItemDamage(0);
    else if (base.getMetadata() == OreDictionary.WILDCARD_VALUE && base.getHasSubtypes()) {
        Item item = base.getItem();
        int stackSize = base.getCount();
        NBTTagCompound tag = base.hasTagCompound() ? base.getTagCompound().copy() : null;
        NonNullList<ItemStack> processed_items = NonNullList.create();
        NonNullList<ItemStack> subItems = NonNullList.create();
        item.getSubItems(CreativeTabs.SEARCH, subItems);
        for (ItemStack subitem : subItems) {
            subitem = subitem.copy();
            subitem.setCount(stackSize);
            subitem.setTagCompound(tag);
            processed_items.add(subitem);
        }
        stacks = subItems;
    }
    return stacks;
}

[Buggy Hunk]
NBTTagCompound tag = base.hasTagCompound() ? base.getTagCompound().copy() : null;

[Patch]
NBTTagCompound tag = (base.hasTagCompound() && base.getTagCompound() != null) ? base.getTagCompound().copy() : null;