[Demonstration 1]

[Buggy Method]
public static void main(String[] args) throws Exception {
    URL xmlConfig = null;
    if (args.length < 1) {
        ClassLoader cl = Main.class.getClassLoader();
        xmlConfig = cl.getResource("standalone.xml");
    } else {
        File xmlFile = new File(args[0]);
        if (xmlFile.canRead()) {
            xmlConfig = xmlFile.toURI().toURL();
        }
    }
    if (null == xmlConfig) {
        System.out.println("Standalone.xml snippet must be found on command line arg or as resource. Stopping...");
        return;
    }
    Container container = new Container(false).withXmlConfig(xmlConfig);
    container.fraction(new AgentFraction());
    container.start();
}

[Buggy Hunk]
container.start();

[Patch]
container.start(true);

[Demonstration 2]

[Buggy Method]
@SuppressWarnings("unchecked")
@Deprecated
public void addValue(int id, String name, UUID uuid) {
    if (ReflectionUtil.isVersionHigherThan(1, 8)) {
        Object packet = ReflectionUtil.instantiate((Constructor<?>) ReflectionUtil.getConstructor(PACKET_PLAYER_INFO_CLASS).get());
        List<Object> players = (List<Object>) ReflectionUtil.getInstanceField(packet, "b");
        Object gameProfile = ReflectionUtil.instantiate(GAMEPROPHILECONSTRUCTOR, uuid, getNameFromID(id));
        Object craftChatMessage;
        Object[] array = (Object[]) ReflectionUtil.invokeMethod(CRAFT_CHAT_MESSAGE_CLASS, null, "fromString", new Class[] { String.class }, getNameFromID(id) + name);
        craftChatMessage = array[0];
        Object data = ReflectionUtil.instantiate(PACKET_PLAYER_INFO_DATA_CONSTRUCTOR, packet, gameProfile, 1, WORLD_GAME_MODE_NOT_SET, craftChatMessage);
        Object profile = GAMEPROFILECLASS.cast(ReflectionUtil.invokeMethod(data, "a", new Class[0]));
        tabs[getIDFromName((String) ReflectionUtil.invokeMethod(profile, "getName", null))] = (String) ReflectionUtil.invokeMethod(profile, "getName", null);
        players.add(data);
        datas.add(data);
        sendNEWPackets(Bukkit.getPlayer(uuid), packet, players, PACKET_PLAYER_INFO_ACTION_ADD_PLAYER);
    } else {
        Object packet = null;
        try {
            packet = ReflectionUtil.instantiate((Constructor<?>) ReflectionUtil.getConstructor(PACKET_PLAYER_INFO_CLASS).get());
        } catch (Exception e) {
            error();
            e.printStackTrace();
        }
        sendOLDPackets(Bukkit.getPlayer(uuid), packet, getNameFromID(id) + name, true);
        tabs[id] = name;
        datasOLD.put(id, getNameFromID(id) + name);
    }
}

[Buggy Hunk]
sendNEWPackets(Bukkit.getPlayer(uuid), packet, players,

[Patch]
sendNEWPackets(Bukkit.getPlayer(this.uuid), packet, players,

[Demonstration 3]

[Buggy Method]
public boolean setReplace(Coord4D obj, int index) {
    IBlockState state = obj.getBlockState(worldObj);
    Block block = state.getBlock();
    EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer) worldObj, obj.xCoord, obj.yCoord, obj.zCoord).get();
    BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(worldObj, obj.getPos(), state, dummy);
    MinecraftForge.EVENT_BUS.post(event);
    if (!event.isCanceled()) {
        ItemStack stack = getReplace(index);
        if (stack != null) {
            worldObj.setBlockState(obj.getPos(), Block.getBlockFromItem(stack.getItem()).getStateFromMeta(stack.getItemDamage()), 3);
            IBlockState s = obj.getBlockState(worldObj);
            if (s.getBlock() instanceof BlockBush && !((BlockBush) s.getBlock()).canBlockStay(worldObj, obj.getPos(), s)) {
                s.getBlock().dropBlockAsItem(worldObj, obj.getPos(), s, 1);
                worldObj.setBlockToAir(obj.getPos());
            }
            return true;
        } else {
            MinerFilter filter = replaceMap.get(index);
            if (filter == null || (filter.replaceStack == null || !filter.requireStack)) {
                worldObj.setBlockToAir(obj.getPos());
                return true;
            }
            missingStack = filter.replaceStack;
            return false;
        }
    }
    return false;
}

[Buggy Hunk]
EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)worldObj, obj.xCoord, obj.yCoord, obj.zCoord).get();

[Patch]
EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)worldObj, this.xCoord, this.yCoord, this.zCoord).get();