[Demonstration 1]

[Buggy Method]
public static void ageItem(Item item, int ticksToAge) {
    try {
        Class<?> itemClass = getBukkitClass("net.minecraft.server.EntityItem");
        Object handle = getHandle(item);
        Field ageField = itemClass.getDeclaredField("age");
        ageField.setAccessible(true);
        ageField.set(handle, ticksToAge);
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}

[Buggy Hunk]
Class<?> itemClass = getBukkitClass("net.minecraft.server.EntityItem");

[Patch]
Class<?> itemClass = fixBukkitClass("net.minecraft.server.EntityItem");

[Demonstration 2]

[Buggy Method]
private Panel createRootPanel(final Context context) {
    final Panel panel = new Panel();
    // HELP
    //
    // Add a command to print a list of all commands and their description when
    // the user for "help" while on the root panel.
    //
    panel.register("help", new Panel.Command() {

        @Override
        public void invoke(List<String> args) {
            System.out.println("ROOT MODE");
            System.out.println("  info");
            System.out.println("    Version information about the server.");
            System.out.println("  u-list");
            System.out.println("    List all users.");
            System.out.println("  u-add <name>");
            System.out.println("    Add a new user with the given name.");
            System.out.println("  u-sign-in <name>");
            System.out.println("    Sign in as the user with the given name.");
            System.out.println("  exit");
            System.out.println("    Exit the program.");
        }
    });
    panel.register("info", new Panel.Command() {

        @Override
        public void invoke(Scanner args) {
            final ServerInfo info = context.getInfo();
            if (info == null) {
                System.out.println("ERROR: Failed to send a valid info object");
            } else {
                System.out.println(info);
            }
        }
    });
    // U-LIST (user list)
    //
    // Add a command to print all users registered on the server when the user
    // enters "u-list" while on the root panel.
    //
    panel.register("u-list", new Panel.Command() {

        @Override
        public void invoke(List<String> args) {
            for (final UserContext user : context.allUsers()) {
                System.out.format("USER %s (UUID:%s)\n", user.user.name, user.user.id);
            }
        }
    });
    // U-ADD (add user)
    //
    // Add a command to add and sign-in as a new user when the user enters
    // "u-add" while on the root panel.
    //
    panel.register("u-add", new Panel.Command() {

        @Override
        public void invoke(List<String> args) {
            final String name = args.size() > 0 ? args.get(0) : "";
            if (name.length() > 0) {
                if (context.create(name) == null) {
                    System.out.println("ERROR: Failed to create new user");
                }
            } else {
                System.out.println("ERROR: Missing <username>");
            }
        }
    });
    // U-SIGN-IN (sign in user)
    //
    // Add a command to sign-in as a user when the user enters "u-sign-in"
    // while on the root panel.
    //
    panel.register("u-sign-in", new Panel.Command() {

        @Override
        public void invoke(List<String> args) {
            final String name = args.size() > 0 ? args.get(0) : "";
            if (name.length() > 0) {
                final UserContext user = findUser(name);
                if (user == null) {
                    System.out.format("ERROR: Failed to sign in as '%s'\n", name);
                } else {
                    panels.push(createUserPanel(user));
                }
            } else {
                System.out.println("ERROR: Missing <username>");
            }
        }

        // Find the first user with the given name and return a user context
        // for that user. If no user is found, the function will return null.
        private UserContext findUser(String name) {
            for (final UserContext user : context.allUsers()) {
                if (user.user.name.equals(name)) {
                    return user;
                }
            }
            return null;
        }
    });
    // Now that the panel has all its commands registered, return the panel
    // so that it can be used.
    return panel;
}

[Buggy Hunk]
public void invoke(Scanner args) {

[Patch]
public void invoke(List<String> args) {

[Demonstration 3]

[Buggy Method]
private void fillOptions(final CompilerOptions options, final List<String> filenames, List<String> args) {
    if (filenames != null) {
        args.addAll(filenames);
    }
    if (options != null) {
        if (options.isAllowJs()) {
            args.add("--allowJs");
        }
        if (options.isListFiles()) {
            args.add("--listFiles");
        }
        if (!StringUtils.isEmpty(options.getMapRoot())) {
            args.add("--mapRoot");
            args.add(options.getMapRoot());
        }
        if (!StringUtils.isEmpty(options.getOutDir())) {
            args.add("--outDir");
            args.add(options.getOutDir());
        }
        if (options.isSourceMap()) {
            args.add("--sourceMap");
        }
        if (!StringUtils.isEmpty(options.getSourceRoot())) {
            args.add("--sourceRoot");
            args.add(options.getSourceRoot());
        }
        if (options.isTraceResolution()) {
            args.add("--traceResolution");
        }
        Boolean watch = options.isWatch();
        if (watch != null && watch) {
            args.add("--watch");
        }
    }
}

[Buggy Hunk]
if (options.isAllowJs()) {

[Patch]
if (options.isAllowJs() != null && options.isAllowJs()) {