[Demonstration 1]

[Buggy Method]
public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    System.out.println("JSON Parser");
    ArrayList<String> keys = new ArrayList<String>();
    boolean toArray = false;
    String arrayInput;
    do {
        System.out.print("Would you like to make objects or an array (OBJ for object, or ARR for array)?: ");
        arrayInput = stdIn.nextLine();
        if (arrayInput.toLowerCase().equals("arr"))
            toArray = true;
        else if (arrayInput.toLowerCase().equals("obj"))
            toArray = false;
    } while (!arrayInput.toLowerCase().equals("arr") && !arrayInput.toLowerCase().equals("obj"));
    String arrayName = "";
    if (toArray) {
        do {
            System.out.print("Enter an array name: ");
            arrayName = stdIn.nextLine();
        } while (arrayName.toUpperCase().equals(""));
    }
    String input = "";
    do {
        System.out.print("Enter a key for your JSON object (ESC to quit): ");
        input = stdIn.nextLine();
        if (!input.toUpperCase().equals("ESC"))
            keys.add(input);
    } while (!input.toUpperCase().equals("ESC"));
    ArrayList<String[]> values = new ArrayList<>();
    String[] autoValue = new String[keys.size()];
    do {
        values.add(new String[keys.size()]);
        for (int i = 0; i < keys.size(); ++i) {
            if (autoValue[i] == null) {
                System.out.print("Enter a value for key \"" + keys.get(i) + "\" (ESC to quit): ");
                input = stdIn.nextLine();
                if (input.contains("AUTO:")) {
                    autoValue[i] = input.substring(input.indexOf(':') + 1);
                    values.get(values.size() - 1)[i] = input.substring(input.indexOf(':') + 1);
                    continue;
                }
                if (input.toUpperCase().equals("ESC")) {
                    values.remove(values.size() - 1);
                    break;
                } else
                    values.get(values.size() - 1)[i] = input;
            } else {
                values.get(values.size() - 1)[i] = autoValue[i];
            }
        }
    } while (!input.toUpperCase().equals("ESC"));
    if (values.size() == 0)
        return;
    String output = "";
    for (int j = 0; j < values.get(0).length; ++j) {
        output += "{";
        for (int i = 0; i < keys.size(); ++i) {
            output += "\"" + keys.get(i) + "\":\"" + values.get(j)[i] + "\",";
        }
        output = output.substring(0, output.length() - 1);
        output += "},";
    }
    output = output.substring(0, output.length() - 1);
    if (toArray) {
        output = "{\"" + arrayName + "\":{[" + output;
        output += "]}";
    }
    System.out.println(output);
}

[Buggy Hunk]
for (int j = 0; j < values.get(0).length; ++j) {

[Patch]
for (int j = 0; j < values.size(); ++j) {

[Demonstration 2]

[Buggy Method]
@Override
public String[] getFileLines(String path) {
    try (BufferedReader reader = getReader(path)) {
        ArrayList<String> data = new ArrayList<>();
        String temp;
        while ((temp = reader.readLine()) != null) {
            data.add(temp);
        }
        return ((String[]) data.toArray());
    } catch (IOException e) {
        e.printStackTrace();
        return new String[0];
    }
}

[Buggy Hunk]
return ((String[]) data.toArray());

[Patch]
return (data.toArray(new String[data.size()]));

[Demonstration 3]

[Buggy Method]
@Override
protected String getSortKey() {
    return Author != null ? Author.SortKey : null;
}

[Buggy Hunk]
return Author != null ? Author.SortKey : null;

[Patch]
return Author != null ? Author.SortKey + ":" + Author.DisplayName : null;