[Demonstration 1]

[Buggy Method]
public String userStringInput(String request) {
    System.out.println(request);
    String userInput = scanner.nextLine();
    return userInput;
}

[Buggy Hunk]
String userInput = scanner.nextLine();

[Patch]
String userInput = scanner.next();

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) {
    nflManagerController = new NFLManagerController();
    String input = "";
    scanner = new Scanner(System.in);
    System.out.println("Hello and welcome to the NFL Trade Machine!");
    System.out.println("--------------------------------------------\n");
    while (!input.equals("Exit") && !input.equals("exit")) {
        System.out.println("Please enter one of the following commands: trade, getTeam, getPlayer, getPlayersFromTeam, exit");
        input = scanner.next();
        if (input.equals("getTeam")) {
            getTeam();
        }
        if (input.toLowerCase().equals("getPlayersFromTeam".toLowerCase())) {
            getPlayersFromTeam();
        }
    }
}

[Buggy Hunk]
input = scanner.next();

[Patch]
input = scanner.nextLine();

[Demonstration 3]

[Buggy Method]
public static Transaction constructDepositTransaction(List<AccountNo> validAccountNoList, int currentDepositAmount, SessionMode mode) {
    AccountNo accountNo = null;
    String userInput;
    int depositAmount = -1;
    while (accountNo == null) {
        System.out.println("Please enter the account number of the account you wish to deposit to.");
        userInput = sc.next().toLowerCase();
        if (userInput.equals("cancel")) {
            System.out.println("You have cancelled the deposit.");
            return null;
        } else {
            try {
                accountNo = new AccountNo(userInput);
            } catch (Exception e) {
                System.out.println(e.getMessage());
                continue;
            }
            if (validAccountNoList.contains(accountNo)) {
                accountNo = validateAccountNoInput(userInput);
            } else {
                System.out.println("This account does not exist");
                accountNo = null;
            }
        }
    }
    while (depositAmount < 0) {
        System.out.println("Please enter the amount you would like to deposit (in number of cents).");
        userInput = sc.next().toLowerCase();
        if (userInput.equals("cancel")) {
            System.out.println("You have cancelled the deposit.");
            return null;
        } else {
            try {
                int amount = Integer.parseInt(userInput);
                if (amount < 100) {
                    throw new InvalidParameterException();
                }
                if (amount > -1 && mode == SessionMode.ATM && (currentDepositAmount + amount) > SessionMode.ATM.getMaxTransfer()) {
                    System.out.println("Could not complete transaction due to surpassing deposit limit.");
                    return null;
                } else if (mode == SessionMode.AGENT && (currentDepositAmount + amount) > SessionMode.AGENT.getMaxTransfer()) {
                    System.out.println("Could not complete transaction due to surpassing deposit limit.");
                    return null;
                } else {
                    depositAmount = amount;
                }
            } catch (Exception e) {
                System.out.println("Invalid money amount. You must deposit at least 100 cents.");
            }
        }
    }
    return new Transaction(TransactionType.DEPOSIT, accountNo, null, null, depositAmount);
}

[Buggy Hunk]
return new Transaction(TransactionType.DEPOSIT, accountNo, null, null, depositAmount);

[Patch]
return new Transaction(TransactionType.DEPOSIT, null, accountNo, null, depositAmount);