Program: 99024
Project: 99024
Buggy source:
@Override public void onCommand(String command){
  Scanner commandScanner=new Scanner(command);
  if (userDataLocations == null) {
    printError("String_Node_Str");
    return;
  }
  if (!commandScanner.hasNext()) {
    printError("String_Node_Str");
    return;
  }
  String commandName=commandScanner.next();
  if (commandName.equals(CREATE_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    if (commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    try {
      createNewUser(userName);
    }
 catch (    Exception e) {
      printError("String_Node_Str" + e.toString());
    }
  }
 else   if (commandName.equals(LOGIN_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    try {
      loginUser(userName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(LOGOUT_COMMAND)) {
    logoutUser();
  }
 else   if (commandName.equals(FRIEND_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    try {
      requestFriend(userName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(VIEW_REQUESTS_COMMAND)) {
    try {
      showRequests();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(ACCEPT_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    try {
      acceptFriend(userName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(MESSAGE_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    int messageStart=command.indexOf(' ');
    String messageContent=command.substring(messageStart + 1);
    messageContent=loggedInUser + "String_Node_Str" + messageContent+ "String_Node_Str";
    try {
      postMessage(messageContent);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(READ_COMMAND)) {
    try {
      readPosts();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(SHOW_USERS_COMMAND)) {
    try {
      showUsers();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(SHOW_FRIENDS_COMMAND)) {
    try {
      showFriends();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    printError("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onCommand(String command){
  Scanner commandScanner=new Scanner(command);
  if (userDataLocations == null) {
    printError("String_Node_Str");
    return;
  }
  if (!commandScanner.hasNext()) {
    printError("String_Node_Str");
    return;
  }
  String commandName=commandScanner.next();
  if (commandName.equals(CREATE_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    if (commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    try {
      createNewUser(userName);
    }
 catch (    Exception e) {
      printError("String_Node_Str" + e.toString());
    }
  }
 else   if (commandName.equals(LOGIN_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    try {
      loginUser(userName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(LOGOUT_COMMAND)) {
    logoutUser();
  }
 else   if (commandName.equals(FRIEND_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    try {
      requestFriend(userName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(VIEW_REQUESTS_COMMAND)) {
    try {
      showRequests();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(ACCEPT_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    String userName=commandScanner.next();
    try {
      acceptFriend(userName);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(MESSAGE_COMMAND)) {
    if (!commandScanner.hasNext()) {
      printError("String_Node_Str");
      return;
    }
    int messageStart=command.indexOf(' ');
    String messageContent=command.substring(messageStart + 1);
    messageContent=loggedInUser + "String_Node_Str" + messageContent+ '\n';
    try {
      postMessage(messageContent);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(READ_COMMAND)) {
    try {
      readPosts();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(SHOW_USERS_COMMAND)) {
    try {
      showUsers();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (commandName.equals(SHOW_FRIENDS_COMMAND)) {
    try {
      showFriends();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    printError("String_Node_Str");
  }
}