Program: 80962
Project: 80962
Buggy source:
/** 
 * Checks for tickets. Blocks indefinitely. Note that if checker is not checking anything, this method does not block and only modifies the StatusGUI GUI status text.
 * @param status The StatusGUI window to update
 * @param checker The TicketChecker to use
 * @param email The EmailAccount to use, or null for none
 * @param checkTime The time between checks
 * @throws NullPointerException if any arguments besides email are null
 */
private static void checkForTickets(Status status,TicketChecker checker,EmailAccount email,int checkTime){
  if (checker.isCheckingAnything()) {
    while (true) {
      status.setLastCheckedText("String_Node_Str");
      long startTime=System.currentTimeMillis();
      if (checker.isUpdated()) {
        Browser.openLinkInBrowser(checker.getLinkFound());
        if (email != null) {
          try {
            email.sendMessage("String_Node_Str","String_Node_Str" + checker.getLinkFound());
          }
 catch (          IllegalStateException e) {
            System.out.println("String_Node_Str" + e.getMessage() + "String_Node_Str");
          }
        }
        Tickets ticketWindow=new Tickets(checker.getLinkFound());
        ticketWindow.showWindow();
      }
      status.setDataUsageText(DataTracker.getDataUsedMB());
      while (System.currentTimeMillis() - startTime < checkTime * 1000) {
synchronized (status) {
          int button=status.getButtonPressed();
          if (button > 0) {
            status.resetButtonPressed();
            if (button == 1) {
              break;
            }
 else             if (button == 2) {
              if (email != null) {
                status.setInformationText("String_Node_Str");
                try {
                  if (email.sendMessage("String_Node_Str","String_Node_Str")) {
                    status.setInformationText("String_Node_Str");
                  }
 else {
                    status.setInformationText("String_Node_Str");
                  }
                }
 catch (                IllegalStateException e) {
                  status.setInformationText("String_Node_Str");
                }
              }
            }
 else             if (button == 3) {
              if (Audio.playAlarm()) {
                status.setInformationText("String_Node_Str");
              }
 else {
                status.setInformationText("String_Node_Str");
              }
            }
 else             if (button == 4) {
              if (myStreamer != null) {
                myStreamer.startStreamingTwitter();
              }
            }
          }
        }
        status.setLastCheckedText(checkTime - (int)((System.currentTimeMillis() - startTime) / 1000));
        try {
          Thread.sleep(200);
        }
 catch (        InterruptedException iE) {
          iE.printStackTrace();
        }
      }
    }
  }
 else {
    status.setLastCheckedText("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Checks for tickets. Blocks indefinitely. Note that if checker is not checking anything, this method does not block and only modifies the StatusGUI GUI status text.
 * @param status The StatusGUI window to update
 * @param checker The TicketChecker to use
 * @param email The EmailAccount to use, or null for none
 * @param checkTime The time between checks
 * @throws NullPointerException if any arguments besides email are null
 */
private static void checkForTickets(Status status,TicketChecker checker,EmailAccount email,int checkTime){
  if (checker.isCheckingAnything()) {
    while (true) {
      status.setLastCheckedText("String_Node_Str");
      long startTime=System.currentTimeMillis();
      if (checker.isUpdated()) {
        Browser.openLinkInBrowser(checker.getLinkFound());
        Audio.playAlarm();
        if (email != null) {
          try {
            email.sendMessage("String_Node_Str","String_Node_Str" + checker.getLinkFound());
          }
 catch (          IllegalStateException e) {
            System.out.println("String_Node_Str" + e.getMessage() + "String_Node_Str");
          }
        }
        if (status instanceof StatusGUI) {
          Tickets ticketWindow=new Tickets(checker.getLinkFound());
          ticketWindow.showWindow();
        }
      }
      status.setDataUsageText(DataTracker.getDataUsedMB());
      while (System.currentTimeMillis() - startTime < checkTime * 1000) {
synchronized (status) {
          int button=status.getButtonPressed();
          if (button > 0) {
            status.resetButtonPressed();
            if (button == 1) {
              break;
            }
 else             if (button == 2) {
              if (email != null) {
                status.setInformationText("String_Node_Str");
                try {
                  if (email.sendMessage("String_Node_Str","String_Node_Str")) {
                    status.setInformationText("String_Node_Str");
                  }
 else {
                    status.setInformationText("String_Node_Str");
                  }
                }
 catch (                IllegalStateException e) {
                  status.setInformationText("String_Node_Str");
                }
              }
            }
 else             if (button == 3) {
              if (Audio.playAlarm()) {
                status.setInformationText("String_Node_Str");
              }
 else {
                status.setInformationText("String_Node_Str");
              }
            }
 else             if (button == 4) {
              if (myStreamer != null) {
                myStreamer.startStreamingTwitter();
              }
            }
          }
        }
        status.setLastCheckedText(checkTime - (int)((System.currentTimeMillis() - startTime) / 1000));
        try {
          Thread.sleep(200);
        }
 catch (        InterruptedException iE) {
          iE.printStackTrace();
        }
      }
    }
  }
 else {
    status.setLastCheckedText("String_Node_Str");
  }
}