Program: 98651
Project: 98651
Buggy source:
/** 
 * Checks whether to crash any live node or restart any failed node
 * @param currentRoundEvents The list of the current round's events that we should add to
 */
private void checkCrash(ArrayList<Event> currentRoundEvents){
  if (userControl.compareTo(FailureLvl.CRASH) < 0) {
    Integer[] addrCopy=nodes.keySet().toArray(new Integer[0]);
    for (    Integer i : addrCopy) {
      double rand=Utility.getRNG().nextDouble();
      if (rand < failureRate) {
        currentRoundEvents.add(Event.getFailure(i));
      }
    }
    addrCopy=crashedNodes.toArray(new Integer[0]);
    for (    Integer i : addrCopy) {
      double rand=Utility.getRNG().nextDouble();
      if (rand < recoveryRate) {
        currentRoundEvents.add(Event.getStart(i,0));
      }
    }
  }
 else {
    try {
      printLiveDead();
      String input;
      if (!nodes.isEmpty()) {
        System.out.println("String_Node_Str");
        input=m_prompt ? Replay.getLine().trim() : "String_Node_Str";
        if (!input.equals("String_Node_Str")) {
          String[] crashList=input.split("String_Node_Str");
          for (          String s : crashList) {
            currentRoundEvents.add(Event.getFailure(Integer.parseInt(s)));
          }
        }
      }
      if (!crashedNodes.isEmpty()) {
        System.out.println("String_Node_Str");
        input=m_prompt ? Replay.getLine().trim() : "String_Node_Str";
        if (!input.equals("String_Node_Str")) {
          String[] restartList=input.split("String_Node_Str");
          for (          String s : restartList) {
            currentRoundEvents.add(Event.getStart(Integer.parseInt(s),0));
          }
        }
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Checks whether to crash any live node or restart any failed node
 * @param currentRoundEvents The list of the current round's events that we should add to
 */
private void checkCrash(ArrayList<Event> currentRoundEvents){
  if (userControl.compareTo(FailureLvl.CRASH) < 0) {
    Integer[] addrCopy=nodes.keySet().toArray(new Integer[0]);
    for (    Integer i : addrCopy) {
      double rand=Utility.getRNG().nextDouble();
      if (rand < failureRate) {
        currentRoundEvents.add(Event.getFailure(i));
      }
    }
    addrCopy=crashedNodes.toArray(new Integer[0]);
    for (    Integer i : addrCopy) {
      double rand=Utility.getRNG().nextDouble();
      if (rand < recoveryRate) {
        currentRoundEvents.add(Event.getStart(i,0));
      }
    }
  }
 else {
    try {
      printLiveDead();
      String input;
      if (!nodes.isEmpty()) {
        input="String_Node_Str";
        if (m_prompt) {
          System.out.println("String_Node_Str");
          input=Replay.getLine().trim();
        }
        if (!input.equals("String_Node_Str")) {
          String[] crashList=input.split("String_Node_Str");
          for (          String s : crashList) {
            currentRoundEvents.add(Event.getFailure(Integer.parseInt(s)));
          }
        }
      }
      if (!crashedNodes.isEmpty()) {
        input="String_Node_Str";
        if (m_prompt) {
          System.out.println("String_Node_Str");
          input=Replay.getLine().trim();
        }
        if (!input.equals("String_Node_Str")) {
          String[] restartList=input.split("String_Node_Str");
          for (          String s : restartList) {
            currentRoundEvents.add(Event.getStart(Integer.parseInt(s),0));
          }
        }
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}