nus-yam/ex-repair huggingface dataset:
Program: 80967
Project: 80967
Buggy source:
public String getCurrentButtonLink(){
  try {
    URL urlToConnectTo=new URL(getWebsiteLink(expoToCheck) + "String_Node_Str");
    String link=findShowclixLink(urlToConnectTo);
    if (link.equals("String_Node_Str") && expoToCheck == Expo.PRIME) {
      System.out.println("String_Node_Str");
      URL urlToConnectTo2=new URL("String_Node_Str");
      link=findShowclixLink(urlToConnectTo2);
    }
    return link;
  }
 catch (  MalformedURLException mue) {
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String getCurrentButtonLink(){
  try {
    URL urlToConnectTo=new URL(getWebsiteLink(expoToCheck) + "String_Node_Str");
    String link=findShowclixLink(urlToConnectTo);
    return link;
  }
 catch (  MalformedURLException mue) {
  }
  return "String_Node_Str";
}
Program: 80968
Project: 80968
Buggy source:
@Override public void run(){
  setIconImage(image);
  setTrayIcon("String_Node_Str",image);
}

Fixed version (ground truth):
@Override public void run(){
  JLInformation.setText("String_Node_Str");
}
Program: 80969
Project: 80969
Buggy source:
@Override protected Object doInBackground() throws Exception {
  long startTime=System.nanoTime();
  long delayTime=INFORMATION_CLEAR_DELAY_TIME * 1000000000L;
  do {
    int secondsLeft=(int)((delayTime - (System.nanoTime() - startTime)) / 1000000000L);
    setProgress((INFORMATION_CLEAR_DELAY_TIME - secondsLeft) / INFORMATION_CLEAR_DELAY_TIME * 100);
  }
 while (System.nanoTime() - startTime < delayTime && !super.isCancelled());
  setProgress(100);
  return null;
}

Fixed version (ground truth):
@Override protected Object doInBackground() throws Exception {
  long startTime=System.nanoTime();
  long delayTime=INFORMATION_CLEAR_DELAY_TIME * 1000000000L;
  do {
    int secondsLeft=(int)((delayTime - (System.nanoTime() - startTime)) / 1000000000L);
    setProgress((INFORMATION_CLEAR_DELAY_TIME - secondsLeft) / INFORMATION_CLEAR_DELAY_TIME * 100);
    Thread.sleep(250);
  }
 while (System.nanoTime() - startTime < delayTime && !super.isCancelled());
  setProgress(100);
  return null;
}
Program: 80970
Project: 80970
Buggy source:
@Override protected void process(java.util.List<String> chunks){
  if (!chunks.isEmpty()) {
    JBTestText.setText(chunks.get(chunks.size() - 1));
  }
}

Fixed version (ground truth):
@Override protected void process(final java.util.List<String> chunks){
  if (!chunks.isEmpty()) {
    invokeAndWaitOnEDT(new Runnable(){
      @Override public void run(){
        JBTestText.setText(chunks.get(chunks.size() - 1));
      }
    }
);
  }
}
Program: 80971
Project: 80971
Buggy source:
@Override protected void done(){
  if (!super.isCancelled()) {
    setInformationText("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override protected void done(){
  if (!super.isCancelled()) {
    invokeAndWaitOnEDT(new Runnable(){
      @Override public void run(){
        JLInformation.setText("String_Node_Str");
      }
    }
);
  }
}
Program: 80972
Project: 80972
Buggy source:
private static void loadNotifications(Startup window,boolean anonymous,PreferenceHandler prefs){
  window.setStatus("String_Node_Str");
  String lastID=prefs.getStringPreference("String_Node_Str");
  if (lastID == null) {
    lastID="String_Node_Str";
  }
  NotificationHandler notifications=new NotificationHandler(anonymous,lastID);
  notifications.loadNotifications();
  String newID=notifications.showNewNotifications();
  prefs.getPreferenceObject("String_Node_Str").setValue(newID);
  prefs.savePreferences();
}

Fixed version (ground truth):
private static void loadNotifications(Startup window,boolean anonymous,boolean headless,PreferenceHandler prefs){
  window.setStatus("String_Node_Str");
  String lastID=prefs.getStringPreference("String_Node_Str");
  if (lastID == null) {
    lastID="String_Node_Str";
  }
  NotificationHandler notifications=new NotificationHandler(lastID);
  if (anonymous) {
    notifications.setAnonymous();
  }
  if (headless) {
    notifications.setHeadless();
  }
  notifications.loadNotifications();
  String newID=notifications.showNewNotifications();
  if (newID == null) {
    newID=lastID;
  }
  prefs.getPreferenceObject("String_Node_Str").setValue(newID);
  prefs.savePreferences();
}
Program: 80975
Project: 80975
Buggy source:
/** 
 * Creates a new NotificationHandler.
 * @param anonymousStatistics True for anonymous statistics, false for usage tracking
 * @param lastNotificationID The ID of the last notification loaded, or null or "DISABLE" to disable notifications
 */
public NotificationHandler(boolean anonymousStatistics,String lastNotificationID){
  if (lastNotificationID == null) {
    this.lastNotificationID="String_Node_Str";
  }
 else {
    this.lastNotificationID=lastNotificationID;
  }
  this.anonymousStatistics=anonymousStatistics;
}

Fixed version (ground truth):
/** 
 * Creates a new NotificationHandler.
 * @param anonymousStatistics True for anonymous statistics, false for usage tracking
 * @param lastNotificationID The ID of the last notification loaded, or null or "DISABLE" to disable notifications
 */
public NotificationHandler(String lastNotificationID){
  if (lastNotificationID == null) {
    this.lastNotificationID="String_Node_Str";
  }
 else {
    this.lastNotificationID=lastNotificationID;
  }
}
Program: 80977
Project: 80977
Buggy source:
/** 
 * Plays the alarm. Note that this checks   {@link #soundEnabled()} to make sure it's supposed to play. This method only allows one sound to play at atime, and resets the sound currently playing to the beginning.
 * @return True if the alarm was successfully started, false if not
 */
public static boolean playAlarm(){
  if (!playSound) {
    return false;
  }
  try {
    if (clip != null) {
      clip.stop();
      clip.setFramePosition(0);
    }
    clip=AudioSystem.getClip();
    clip.addLineListener(listener);
    InputStream audioSrc;
    if (alarmFile != null) {
      audioSrc=new FileInputStream(alarmFile);
    }
 else {
      audioSrc=ResourceLoader.loadResource("String_Node_Str");
    }
    InputStream bufferedIn=new BufferedInputStream(audioSrc);
    AudioInputStream inputStream=AudioSystem.getAudioInputStream(bufferedIn);
    clip.open(inputStream);
    clip.start();
    return true;
  }
 catch (  LineUnavailableException|UnsupportedAudioFileException|IOException e) {
    e.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Plays the alarm. Note that this checks   {@link #soundEnabled()} to make sure it's supposed to play. This method only allows one sound to play at atime, and resets the sound currently playing to the beginning.
 * @return True if the alarm was successfully started, false if not
 */
public static boolean playAlarm(){
  if (!playSound) {
    return false;
  }
  try {
    if (clip != null) {
      clip.stop();
    }
    InputStream audioSrc;
    if (alarmFile != null) {
      audioSrc=new FileInputStream(alarmFile);
    }
 else {
      audioSrc=ResourceLoader.loadResource("String_Node_Str");
    }
    InputStream bufferedIn=new BufferedInputStream(audioSrc);
    AudioInputStream inputStream=AudioSystem.getAudioInputStream(bufferedIn);
    DataLine.Info lineInfo=new DataLine.Info(Clip.class,inputStream.getFormat());
    clip=(Clip)AudioSystem.getLine(lineInfo);
    clip.addLineListener(new LListener());
    clip.open(inputStream);
    clip.start();
    return true;
  }
 catch (  Exception e) {
    e.printStackTrace();
    new ErrorBuilder().setErrorTitle(e.toString()).setErrorMessage(e.getMessage() == null ? "String_Node_Str" : e.getMessage()).setError(e).buildWindow();
  }
  return false;
}
Program: 80978
Project: 80978
Buggy source:
/** 
 * Sets up a new HttpURLConnection with PAXChecker defaults. Connection has a 5-second connection timeout, 6-second read timeout.
 * @param url The URL to connect to
 * @return A new HttpURLConnection, or null if unable to set it up or if url is null
 */
public static HttpURLConnection setUpConnection(URL url){
  if (url == null) {
    return null;
  }
  try {
    HttpURLConnection httpCon=(HttpURLConnection)url.openConnection();
    httpCon.addRequestProperty("String_Node_Str","String_Node_Str");
    httpCon.setConnectTimeout(5000);
    httpCon.setReadTimeout(6000);
    return httpCon;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Sets up a new HttpURLConnection with PAXChecker defaults. Connection has a 5-second connection timeout, 6-second read timeout.
 * @param url The URL to connect to
 * @return A new HttpURLConnection, or null if unable to set it up or if url is null
 */
public static HttpURLConnection setUpConnection(URL url){
  if (url == null) {
    return null;
  }
  try {
    HttpURLConnection httpCon=(HttpURLConnection)url.openConnection();
    httpCon.addRequestProperty("String_Node_Str","String_Node_Str");
    httpCon.addRequestProperty("String_Node_Str","String_Node_Str");
    httpCon.setConnectTimeout(5000);
    httpCon.setReadTimeout(6000);
    return httpCon;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 80979
Project: 80979
Buggy source:
final void updateLinkFromSet(Set<String> mySet){
  for (  String i : mySet) {
    if (!alreadyChecked.contains(i)) {
      System.out.println("String_Node_Str" + i);
      if (ShowclixReader.isPaxPage(i)) {
        originalLink=i;
        currentLink=Browser.unshortenURL(i);
        System.out.println("String_Node_Str" + originalLink + "String_Node_Str"+ currentLink);
        break;
      }
 else {
        System.out.println("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
final void updateLinkFromSet(Set<String> mySet){
  for (  String i : mySet) {
    if (!alreadyChecked.contains(i)) {
      System.out.println("String_Node_Str" + i);
      if (ShowclixReader.isPaxPage(i)) {
        originalLink=i;
        currentLink=Browser.unshortenURL(i);
        System.out.println("String_Node_Str" + originalLink + "String_Node_Str"+ currentLink);
        break;
      }
 else {
        System.out.println("String_Node_Str");
        alreadyChecked.add(i);
      }
    }
  }
}
Program: 80980
Project: 80980
Buggy source:
@Override public synchronized void reset(){
  if (currentLink == null) {
    Set<String> mySet=getLinks();
    for (    String i : mySet) {
      alreadyChecked.add(i);
      currentLink=i;
    }
  }
 else {
    alreadyChecked.add(originalLink);
  }
}

Fixed version (ground truth):
@Override public synchronized void reset(){
  if (currentLink == null) {
    Set<String> mySet=getLinks();
    for (    String i : mySet) {
      alreadyChecked.add(i);
      currentLink=i;
    }
  }
 else {
    System.out.println("String_Node_Str" + originalLink + "String_Node_Str");
    alreadyChecked.add(originalLink);
  }
}
Program: 80981
Project: 80981
Buggy source:
/** 
 * Checks whether or not the registered Checkers have an update. This method may block for several seconds.
 * @return True if an update is found, false if not
 */
public static boolean isUpdated(){
  if (status != null) {
    status.setForceButtonState(false);
  }
  for (  Check c : checks) {
    threadPool.submit(c);
  }
  System.out.println("String_Node_Str");
  threadWait.arriveAndAwaitAdvance();
  System.out.println("String_Node_Str");
  for (  Check c : checks) {
    if (c.ticketsFound()) {
      if (!hasOpenedLink(c.getLink())) {
        System.out.println("String_Node_Str" + c.getLink());
        setLinkFound(c.getLink());
        c.reset();
        return true;
      }
 else {
        System.out.println("String_Node_Str" + c.getLink());
        c.reset();
      }
    }
 else {
      System.out.println("String_Node_Str" + c.getLink());
    }
  }
  if (status != null) {
    status.setForceButtonState(true);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether or not the registered Checkers have an update. This method may block for several seconds.
 * @return True if an update is found, false if not
 */
public static boolean isUpdated(){
  if (status != null) {
    status.setForceButtonState(false);
  }
  for (  Check c : checks) {
    threadPool.submit(c);
  }
  System.out.println("String_Node_Str");
  threadWait.arriveAndAwaitAdvance();
  System.out.println("String_Node_Str");
  for (  Check c : checks) {
    if (c.ticketsFound()) {
      if (!hasOpenedLink(c.getLink())) {
        System.out.println("String_Node_Str" + c.getLink());
        linkFound(c.getLink());
        c.reset();
        return true;
      }
 else {
        System.out.println("String_Node_Str" + c.getLink());
        c.reset();
      }
    }
 else {
      System.out.println("String_Node_Str" + c.getLink());
    }
  }
  if (status != null) {
    status.setForceButtonState(true);
  }
  return false;
}
Program: 80982
Project: 80982
Buggy source:
private static boolean openSystemSpecific(String what){
  EnumOS os=getOs();
  if (os.isLinux()) {
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
 else     if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
  }
  if (os.isMac()) {
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
  }
  if (os.isWindows()) {
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean openSystemSpecific(String what){
  EnumOS os=getOs();
  if (os.isLinux()) {
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
 else     if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
 else     if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
  }
  if (os.isMac()) {
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
  }
  if (os.isWindows()) {
    if (runCommand("String_Node_Str","String_Node_Str",what)) {
      return true;
    }
  }
  return false;
}
Program: 80983
Project: 80983
Buggy source:
final void updateLink(String link){
  if (linkLabel != null) {
    linkLabel.setText("String_Node_Str" + link);
  }
}

Fixed version (ground truth):
final void updateLink(String link){
  if (linkLabel != null) {
    if (this.getClass().getSimpleName().length() <= 5) {
      linkLabel.setText("String_Node_Str" + link);
    }
 else {
      linkLabel.setText("String_Node_Str" + this.getClass().getSimpleName().substring(5) + "String_Node_Str"+ link);
    }
  }
}
Program: 80984
Project: 80984
Buggy source:
private static void loadNotifications(LoadingWindow window){
  window.setStatus("String_Node_Str");
  NotificationHandler notifications=new NotificationHandler(false,"String_Node_Str");
  notifications.loadNotifications();
  notifications.showNewNotifications();
}

Fixed version (ground truth):
private static void loadNotifications(Startup window){
  window.setStatus("String_Node_Str");
  NotificationHandler notifications=new NotificationHandler(false,"String_Node_Str");
  notifications.loadNotifications();
  notifications.showNewNotifications();
}
Program: 80985
Project: 80985
Buggy source:
private static TicketChecker initChecker(Setup mySetup,Status myStatus,String expo){
  TicketChecker myChecker=new TicketChecker(myStatus);
  if (mySetup.shouldCheckPAXWebsite()) {
    myChecker.addChecker(new CheckPaxsite(expo));
  }
  if (mySetup.shouldCheckShowclix()) {
    myChecker.addChecker(new CheckShowclix(expo));
  }
  if (mySetup.shouldCheckKnownEvents()) {
    myChecker.addChecker(new CheckShowclixEventPage());
  }
  myChecker.initCheckers();
  return myChecker;
}

Fixed version (ground truth):
private static TicketChecker initChecker(Setup mySetup,StatusGUI myStatus,String expo){
  TicketChecker myChecker=new TicketChecker(myStatus);
  if (mySetup.shouldCheckPAXWebsite()) {
    myChecker.addChecker(new CheckPaxsite(expo));
  }
  if (mySetup.shouldCheckShowclix()) {
    myChecker.addChecker(new CheckShowclix(expo));
  }
  if (mySetup.shouldCheckKnownEvents()) {
    myChecker.addChecker(new CheckShowclixEventPage());
  }
  myChecker.initCheckers();
  return myChecker;
}
Program: 80987
Project: 80987
Buggy source:
private static String loadUpdates(LoadingWindow window){
  String notes=null;
  try {
    window.setStatus("String_Node_Str");
    PatchNotesDownloader notesDownloader=new PatchNotesDownloader(PATCH_NOTES_LINK);
    notesDownloader.downloadVersionNotes(VERSION);
    notes=notesDownloader.getVersionNotes();
    if (notesDownloader.updateAvailable()) {
      UpdateDownloader myDownloader=new UpdateDownloader(UPDATE_LINK,BETA_UPDATE_LINK);
      UpdatePrompt myPrompt=new UpdatePrompt("String_Node_Str",myDownloader.getUpdateSize(),notesDownloader.getUpdateLevel(),"String_Node_Str",notesDownloader.getVersionNotes(VERSION));
      window.setVisible(false);
      myPrompt.showWindow();
      try {
        myPrompt.waitForClose();
      }
 catch (      InterruptedException e) {
      }
      if (myPrompt.shouldUpdateProgram()) {
        myDownloader.updateProgram(myPrompt,new File(PAXChecker.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()));
        System.exit(0);
      }
 else {
        window.showWindow();
      }
    }
  }
 catch (  IOException|URISyntaxException e) {
    e.printStackTrace();
  }
  return notes;
}

Fixed version (ground truth):
private static String loadUpdates(Startup window){
  String notes=null;
  try {
    window.setStatus("String_Node_Str");
    PatchNotesDownloader notesDownloader=new PatchNotesDownloader(PATCH_NOTES_LINK);
    notesDownloader.downloadVersionNotes(VERSION);
    notes=notesDownloader.getVersionNotes();
    if (notesDownloader.updateAvailable()) {
      UpdateDownloader myDownloader=new UpdateDownloader(UPDATE_LINK,BETA_UPDATE_LINK);
      UpdatePrompt myPrompt=new UpdatePrompt("String_Node_Str",myDownloader.getUpdateSize(),notesDownloader.getUpdateLevel(),"String_Node_Str",notesDownloader.getVersionNotes(VERSION));
      window.stop();
      myPrompt.showWindow();
      try {
        myPrompt.waitForClose();
      }
 catch (      InterruptedException e) {
      }
      if (myPrompt.shouldUpdateProgram()) {
        myDownloader.updateProgram(myPrompt,new File(PAXChecker.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()));
        System.exit(0);
      }
 else {
        window.start();
      }
    }
  }
 catch (  IOException|URISyntaxException e) {
    e.printStackTrace();
  }
  return notes;
}
Program: 80989
Project: 80989
Buggy source:
private static void loadResources(final LoadingWindow window,boolean redownload){
  ResourceDownloader download=new ResourceDownloader(){
    private String currentFile;
    @Override public void startingFile(    String fileName){
      currentFile=fileName;
      window.setStatus("String_Node_Str" + currentFile);
    }
    @Override public void filePercentage(    int percent){
      super.filePercentage(percent);
      window.setStatus("String_Node_Str" + currentFile + "String_Node_Str"+ percent+ "String_Node_Str");
    }
    @Override public void finishedFile(    String fileName){
      window.setStatus("String_Node_Str" + fileName);
    }
  }
;
  if (redownload) {
    download.forceRedownload();
  }
  download.downloadResources();
}

Fixed version (ground truth):
private static void loadResources(final Startup window,boolean redownload){
  ResourceDownloader download=new ResourceDownloader(){
    private String currentFile;
    @Override public void startingFile(    String fileName){
      currentFile=fileName;
      window.setStatus("String_Node_Str" + currentFile);
    }
    @Override public void filePercentage(    int percent){
      super.filePercentage(percent);
      window.setStatus("String_Node_Str" + currentFile + "String_Node_Str"+ percent+ "String_Node_Str");
    }
    @Override public void finishedFile(    String fileName){
      window.setStatus("String_Node_Str" + fileName);
    }
  }
;
  if (redownload) {
    download.forceRedownload();
  }
  download.downloadResources();
}
Program: 80990
Project: 80990
Buggy source:
public void init(com.github.sunnybat.paxchecker.gui.Status s,java.util.concurrent.Phaser cB){
  if (s != null) {
    linkLabel=s.addLinkJLabel();
  }
  updateLabel(s,"String_Node_Str");
  cycBar=cB;
  cycBar.register();
  reset();
}

Fixed version (ground truth):
public void init(com.github.sunnybat.paxchecker.status.StatusGUI s,java.util.concurrent.Phaser cB){
  if (s != null) {
    linkLabel=s.addLinkJLabel();
  }
  updateLabel(s,"String_Node_Str");
  cycBar=cB;
  cycBar.register();
  reset();
}
Program: 80991
Project: 80991
Buggy source:
public final void updateLabel(com.github.sunnybat.paxchecker.gui.Status s,String text){
  if (s != null) {
    s.updateJLabel(linkLabel,text);
  }
}

Fixed version (ground truth):
public final void updateLabel(com.github.sunnybat.paxchecker.status.StatusGUI s,String text){
  if (s != null) {
    s.updateJLabel(linkLabel,text);
  }
}
Program: 80992
Project: 80992
Buggy source:
@Override public synchronized void init(com.github.sunnybat.paxchecker.gui.Status s,java.util.concurrent.Phaser cB){
  super.init(s,cB);
  updateLabel(s,"String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void init(com.github.sunnybat.paxchecker.status.StatusGUI s,java.util.concurrent.Phaser cB){
  super.init(s,cB);
  updateLabel(s,"String_Node_Str");
}
Program: 80993
Project: 80993
Buggy source:
@Override public synchronized void init(com.github.sunnybat.paxchecker.gui.Status s,java.util.concurrent.Phaser cB){
  super.init(s,cB);
  updateLabel(s,"String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void init(com.github.sunnybat.paxchecker.status.StatusGUI s,java.util.concurrent.Phaser cB){
  super.init(s,cB);
  updateLabel(s,"String_Node_Str");
}
Program: 80994
Project: 80994
Buggy source:
@Override public synchronized void init(com.github.sunnybat.paxchecker.gui.Status s,java.util.concurrent.Phaser cB){
  super.init(s,cB);
  updateLabel(s,"String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void init(com.github.sunnybat.paxchecker.status.StatusGUI s,java.util.concurrent.Phaser cB){
  super.init(s,cB);
  updateLabel(s,"String_Node_Str");
}
Program: 80995
Project: 80995
Buggy source:
/** 
 * Initializes the TicketChecker class.
 * @param s The Status to update, or null if none
 */
public TicketChecker(com.github.sunnybat.paxchecker.gui.Status s){
  status=s;
  threadPool=Executors.newCachedThreadPool();
  threadWait=new Phaser();
  threadWait.register();
}

Fixed version (ground truth):
/** 
 * Initializes the TicketChecker class.
 * @param s The StatusGUI to update, or null if none
 */
public TicketChecker(com.github.sunnybat.paxchecker.status.StatusGUI s){
  status=s;
  threadPool=Executors.newCachedThreadPool();
  threadWait=new Phaser();
  threadWait.register();
}
Program: 80996
Project: 80996
Buggy source:
@Override public void onException(Exception ex){
  ex.printStackTrace();
  if (++successiveErrorCount == 1) {
    if (ex.getMessage().contains("String_Node_Str")) {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
  }
 else   if (successiveErrorCount == 3) {
    if (ex.getMessage().contains("String_Node_Str")) {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
 else {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
    myStream.shutdown();
  }
}

Fixed version (ground truth):
@Override public void onException(Exception ex){
  ex.printStackTrace();
  if (++successiveErrorCount == 1) {
    if (ex.getMessage().contains("String_Node_Str")) {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
  }
 else   if (successiveErrorCount == 3) {
    if (ex.getMessage().contains("String_Node_Str")) {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
 else     if (ex.getMessage().contains("String_Node_Str")) {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
 else {
      new ErrorBuilder().setError(ex).setErrorTitle("String_Node_Str").setErrorMessage("String_Node_Str" + "String_Node_Str").buildWindow();
    }
    myStream.shutdown();
  }
}
Program: 80997
Project: 80997
Buggy source:
/** 
 * Starts looking for Twitter updates. If the stream is already started -- connected or disconnected -- this method does nothing.
 */
public void startStreamingTwitter(){
  if (isStreamingTwitter()) {
    System.out.println("String_Node_Str");
    return;
  }
  try {
    myStream=new TwitterStreamFactory().getInstance(myTwitter.getAuthorization());
    myStream.addListener(listener);
    myStream.addConnectionLifeCycleListener(cLCListener);
    long[] ids=new long[usersToCheck.size()];
    for (int i=0; i < usersToCheck.size(); i++) {
      User toAdd=myTwitter.showUser(usersToCheck.get(i));
      ids[i]=toAdd.getId();
    }
    FilterQuery filter=new FilterQuery(0,ids);
    myStream.filter(filter);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Starts looking for Twitter updates. If the stream is already started -- connected or disconnected -- this method does nothing.
 */
public void startStreamingTwitter(){
  if (isStreamingTwitter()) {
    System.out.println("String_Node_Str");
    return;
  }
  try {
    myStream=new TwitterStreamFactory().getInstance(myTwitter.getAuthorization());
    myStream.addListener(listener);
    myStream.addConnectionLifeCycleListener(cLCListener);
    long[] ids=new long[usersToCheck.size()];
    for (int i=0; i < usersToCheck.size(); i++) {
      try {
        User toAdd=myTwitter.showUser(usersToCheck.get(i));
        ids[i]=toAdd.getId();
      }
 catch (      TwitterException tE) {
        System.out.println("String_Node_Str" + usersToCheck.get(i) + "String_Node_Str");
      }
    }
    FilterQuery filter=new FilterQuery(0,ids);
    myStream.filter(filter);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 81000
Project: 81000
Buggy source:
private static int getSellerID(String expo){
switch (expo.toLowerCase()) {
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
    return 48;
case "String_Node_Str":
case "String_Node_Str":
  return 48;
case "String_Node_Str":
case "String_Node_Str":
return 48;
case "String_Node_Str":
case "String_Node_Str":
return 75;
default :
System.out.println("String_Node_Str" + expo);
return 48;
}
}

Fixed version (ground truth):
private static int getSellerID(String expo){
  if (expo == null) {
    return 48;
  }
switch (expo.toLowerCase()) {
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
    return 48;
case "String_Node_Str":
case "String_Node_Str":
  return 48;
case "String_Node_Str":
case "String_Node_Str":
return 48;
case "String_Node_Str":
case "String_Node_Str":
return 75;
default :
System.out.println("String_Node_Str" + expo);
return 48;
}
}
Program: 81001
Project: 81001
Buggy source:
public long getLatestTweetID(){
  try {
    Paging p=new Paging(lastIDFound);
    List<Status> statuses=twitter.getUserTimeline(TWITTER_HANDLE,p);
    System.out.println("String_Node_Str" + statuses.size());
    if (statuses.isEmpty()) {
      return lastIDFound;
    }
    lastIDFound=statuses.get(0).getId();
    return lastIDFound;
  }
 catch (  TwitterException twitterException) {
  }
  return -1;
}

Fixed version (ground truth):
public long getLatestTweetID(){
  try {
    Paging p=new Paging(lastIDFound);
    List<Status> statuses=twitter.getUserTimeline(TWITTER_HANDLE,p);
    if (statuses.isEmpty()) {
      return lastIDFound;
    }
    lastIDFound=statuses.get(0).getId();
    return lastIDFound;
  }
 catch (  TwitterException twitterException) {
  }
  return -1;
}
Program: 81002
Project: 81002
Buggy source:
@Override public void run(){
  updateLink();
  System.out.println("String_Node_Str" + this.getClass().getSimpleName());
  cycBar.arriveAndAwaitAdvance();
}

Fixed version (ground truth):
@Override public final void run(){
  updateLink();
  System.out.println("String_Node_Str" + this.getClass().getSimpleName());
  cycBar.arriveAndAwaitAdvance();
}
Program: 81005
Project: 81005
Buggy source:
/** 
 * @param args the command line arguments
 */
public static void main(String[] args){
  System.out.println("String_Node_Str");
  if (isCLine(args)) {
    enableCommandLine();
  }
 else {
    try {
      start=new LoadingWindow();
      start.setStatus("String_Node_Str");
      start.showWindow();
      javax.swing.ToolTipManager.sharedInstance().setDismissDelay(600000);
      setup=new Setup();
    }
 catch (    java.awt.HeadlessException e) {
      System.out.println("String_Node_Str");
      enableCommandLine();
    }
  }
  initClasses();
  setupProgram(args);
}

Fixed version (ground truth):
/** 
 * @param args the command line arguments
 */
public static void main(String[] args){
  System.out.println("String_Node_Str");
  if (isCLine(args)) {
    enableCommandLine();
  }
 else {
    try {
      start=new LoadingWindow();
      start.showWindow();
      Thread.setDefaultUncaughtExceptionHandler(new com.github.sunnybat.commoncode.error.ExceptionHandler());
      javax.swing.ToolTipManager.sharedInstance().setDismissDelay(600000);
      setup=new Setup();
    }
 catch (    java.awt.HeadlessException e) {
      System.out.println("String_Node_Str");
      enableCommandLine();
    }
  }
  initClasses();
  setupProgram(args);
}
Program: 81006
Project: 81006
Buggy source:
private static int getSellerID(String expo){
  if (expo == null) {
    return 48;
  }
switch (expo.toLowerCase()) {
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
    return 48;
case "String_Node_Str":
case "String_Node_Str":
  return 48;
case "String_Node_Str":
case "String_Node_Str":
return 48;
case "String_Node_Str":
case "String_Node_Str":
return 75;
default :
System.out.println("String_Node_Str" + expo);
return 48;
}
}

Fixed version (ground truth):
private static int getSellerID(String expo){
  if (expo == null) {
    return 48;
  }
switch (expo.toLowerCase()) {
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
case "String_Node_Str":
    return 48;
case "String_Node_Str":
case "String_Node_Str":
  return 75;
default :
System.out.println("String_Node_Str" + expo);
return 48;
}
}
Program: 81007
Project: 81007
Buggy source:
public static boolean isPaxPage(int showclixID){
  try {
    HttpURLConnection connect=Browser.setUpConnection(new URL("String_Node_Str" + showclixID));
    BufferedReader reader=new BufferedReader(new InputStreamReader(connect.getInputStream()));
    String text="String_Node_Str";
    String line;
    while ((line=reader.readLine()) != null) {
      DataTracker.addDataUsed(line.length());
      text+=line.toLowerCase();
    }
    if (text.contains(Browser.getExpo().toLowerCase())) {
      System.out.println("String_Node_Str");
      return true;
    }
  }
 catch (  IOException iOException) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Checks whether or not the page associated with the given ShowclixID is a PAX ticket page.
 * @param showclixID The Showclix ID to check
 * @return True if it is, false if not
 */
public static boolean isPaxPage(int showclixID){
  try {
    HttpURLConnection connect=Browser.setUpConnection(new URL("String_Node_Str" + showclixID));
    BufferedReader reader=new BufferedReader(new InputStreamReader(connect.getInputStream()));
    String text="String_Node_Str";
    String line;
    while ((line=reader.readLine()) != null) {
      DataTracker.addDataUsed(line.length());
      text+=line.toLowerCase();
    }
    if (text.contains(Browser.getExpo().toLowerCase())) {
      System.out.println("String_Node_Str");
      return true;
    }
  }
 catch (  IOException iOException) {
  }
  return false;
}
Program: 81008
Project: 81008
Buggy source:
@Override public synchronized boolean ticketsFound(){
  if (currentShowclixEventID > lastShowclixEventID) {
    if (pageFiltering) {
      return ShowclixReader.isPaxPage(currentShowclixEventID);
    }
 else {
      return true;
    }
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public synchronized boolean ticketsFound(){
  if (currentShowclixEventID > lastShowclixEventID) {
    return ShowclixReader.isPaxPage(currentShowclixEventID);
  }
 else {
    return false;
  }
}
Program: 81009
Project: 81009
Buggy source:
public static void runTwitterStream(Twitter twitter,String[] handles){
  if (isStreamingTwitter()) {
    return;
  }
  System.out.println(Arrays.toString(handles));
  myStream=new TwitterStreamFactory().getInstance(twitter.getAuthorization());
  myStream.addListener(listener);
  myStream.user(handles);
}

Fixed version (ground truth):
public static void runTwitterStream(Twitter twitter,String[] handles){
  if (isStreamingTwitter()) {
    return;
  }
  System.out.println(Arrays.toString(handles));
  myStream=new TwitterStreamFactory().getInstance(twitter.getAuthorization());
  myStream.addListener(listener);
  myStream.user(handles);
  usersToCheck=handles.clone();
}
Program: 81010
Project: 81010
Buggy source:
@Override public void onException(Exception ex){
  ex.printStackTrace();
  System.out.println("String_Node_Str" + ex.getMessage());
}

Fixed version (ground truth):
@Override public void onException(Exception ex){
  ex.printStackTrace();
  System.out.println("String_Node_Str" + ex.getMessage());
  ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str" + "String_Node_Str",ex);
}
Program: 81011
Project: 81011
Buggy source:
@Override public void onStatus(Status status){
  System.out.println("String_Node_Str" + status.getUser().getScreenName() + "String_Node_Str"+ status.getText());
  if (!TwitterReader.hasKeyword(status.getText())) {
    System.out.println("String_Node_Str");
    return;
  }
  String link=Browser.parseLink(status.getText());
  if (!TicketChecker.hasOpenedLink(link)) {
    CheckSetup.linkFound(link);
    TicketChecker.addLinkFound(link);
  }
}

Fixed version (ground truth):
@Override public void onStatus(Status status){
  System.out.println("String_Node_Str" + status.getUser().getScreenName() + "String_Node_Str"+ status.getText());
  if (!TwitterReader.hasKeyword(status.getText())) {
    System.out.println("String_Node_Str");
  }
 else {
    for (    String s : usersToCheck) {
      if (s.startsWith("String_Node_Str")) {
        s=s.replaceFirst("String_Node_Str","String_Node_Str");
      }
      if (s.toLowerCase().equals(status.getUser().getScreenName().toLowerCase())) {
        String link=Browser.parseLink(status.getText());
        if (!TicketChecker.hasOpenedLink(link)) {
          CheckSetup.linkFound(link);
          TicketChecker.addLinkFound(link);
        }
        return;
      }
    }
    System.out.println("String_Node_Str");
  }
}
Program: 81015
Project: 81015
Buggy source:
/** 
 * Gets the index of the given Expo for the Setup JComboBox. The proper input for the method is the same Strings as the JComboBox in the Setup GUI.
 * @param eventName The expo ("Pax EXPO") to get the index of
 * @return The index of the given expo, or 0 for incorrect inputs.
 */
public static final int getIndexOfEvent(String eventName){
switch (eventName.toLowerCase()) {
case "String_Node_Str":
default :
    return 0;
case "String_Node_Str":
  return 1;
case "String_Node_Str":
return 2;
case "String_Node_Str":
return 3;
}
}

Fixed version (ground truth):
/** 
 * Gets the index of the given Expo for the Setup JComboBox. The proper input for the method is the same Strings as the JComboBox in the Setup GUI.
 * @param eventName The expo ("Pax EXPO") to get the index of
 * @return The index of the given expo, or 0 for incorrect inputs.
 */
public static final int getIndexOfEvent(String eventName){
  if (eventName == null) {
    return 0;
  }
switch (eventName.toLowerCase()) {
case "String_Node_Str":
default :
    return 0;
case "String_Node_Str":
  return 1;
case "String_Node_Str":
return 2;
case "String_Node_Str":
return 3;
}
}
Program: 81016
Project: 81016
Buggy source:
private void JCBSavePreferencesActionPerformed(java.awt.event.ActionEvent evt){
  boolean selected=JCBSavePreferences.isSelected();
  JCBSaveCellnum.setEnabled(selected);
  JCBSaveCheckPax.setEnabled(selected);
  JCBSaveCheckShowclix.setEnabled(selected);
  JCBSaveCheckTwitter.setEnabled(selected);
  JCBSaveEmail.setEnabled(selected);
  JCBSaveEvent.setEnabled(selected);
  JCBSavePlayAlarm.setEnabled(selected);
  JCBSaveRefreshTime.setEnabled(selected);
}

Fixed version (ground truth):
private void JCBSavePreferencesActionPerformed(java.awt.event.ActionEvent evt){
  boolean selected=JCBSavePreferences.isSelected();
  JCBSaveCellnum.setEnabled(selected);
  JCBSaveCheckPax.setEnabled(selected);
  JCBSaveCheckShowclix.setEnabled(selected);
  JCBSaveCheckTwitter.setEnabled(selected);
  JCBSaveEmail.setEnabled(selected);
  JCBSaveEvent.setEnabled(selected);
  JCBSavePlayAlarm.setEnabled(selected);
  JCBSaveRefreshTime.setEnabled(selected);
  JCBUseBeta.setEnabled(selected);
  JCBCheckUpdates.setEnabled(selected);
  JCBLoadNotifications.setEnabled(selected);
  JCBSaveTwitterKeys.setEnabled(selected);
}
Program: 81017
Project: 81017
Buggy source:
/** 
 * Gets the index of the given provider for the Set JComboBox. The proper input for this method is the same Strings as the JComboBox in the Setup GUI.
 * @param provider The provider to get the index of
 * @return The index of the given provider, or 0 for incorrect inputs.
 */
public static final int getIndexOfProvider(String provider){
switch (provider.toLowerCase()) {
case "String_Node_Str":
default :
    return 0;
case "String_Node_Str":
  return 1;
case "String_Node_Str":
return 2;
case "String_Node_Str":
return 3;
case "String_Node_Str":
return 4;
case "String_Node_Str":
return 5;
case "String_Node_Str":
return 6;
}
}

Fixed version (ground truth):
/** 
 * Gets the index of the given provider for the Set JComboBox. The proper input for this method is the same Strings as the JComboBox in the Setup GUI.
 * @param provider The provider to get the index of
 * @return The index of the given provider, or 0 for incorrect inputs.
 */
public static final int getIndexOfProvider(String provider){
  if (provider == null) {
    return 0;
  }
switch (provider.toLowerCase()) {
case "String_Node_Str":
default :
    return 0;
case "String_Node_Str":
  return 1;
case "String_Node_Str":
return 2;
case "String_Node_Str":
return 3;
case "String_Node_Str":
return 4;
case "String_Node_Str":
return 5;
case "String_Node_Str":
return 6;
}
}
Program: 81018
Project: 81018
Buggy source:
/** 
 * Sets the last Notification ID loaded. Set to DISABLE to disable notifications.
 * @param lNID The last Notification ID loaded
 */
public static void setLastNotificationID(String lNID){
  lastNotificationID=lNID;
}

Fixed version (ground truth):
/** 
 * Sets the last Notification ID loaded. Set to DISABLE to disable notifications.
 * @param lNID The last Notification ID loaded
 */
public static void setLastNotificationID(String lNID){
  if (lNID == null) {
    return;
  }
  lastNotificationID=lNID;
}
Program: 81019
Project: 81019
Buggy source:
public void setValue(Object val){
  if (val == null) {
    System.out.println("String_Node_Str");
  }
  value=val;
  System.out.println("String_Node_Str" + value);
}

Fixed version (ground truth):
public void setValue(Object val){
  if (val == null) {
    System.out.println("String_Node_Str");
  }
  value=val;
  System.out.println(type.name() + "String_Node_Str" + value);
}
Program: 81020
Project: 81020
Buggy source:
protected static synchronized boolean isInPrefs(Preference.TYPES pref){
  try {
    String prefT=pref.name();
    String[] keys=myPrefs.keys();
    for (    String k : keys) {
      if (k.equalsIgnoreCase(prefT)) {
        return true;
      }
    }
  }
 catch (  BackingStoreException bse) {
    bse.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
protected static synchronized boolean isInPrefs(Preference.TYPES pref){
  try {
    String prefT=pref.name();
    String[] keys=myPrefs.keys();
    for (    String k : keys) {
      if (k.equalsIgnoreCase(prefT)) {
        System.out.println("String_Node_Str" + pref.name() + "String_Node_Str");
        return true;
      }
    }
  }
 catch (  BackingStoreException bse) {
    bse.printStackTrace();
  }
  return false;
}
Program: 81021
Project: 81021
Buggy source:
/** 
 * Creates all Preference objects that the program will use. Feels somewhat hacked together at the moment. Can be run more than once without repercussion.
 */
public static synchronized void init(){
  for (  Preference.TYPES pTypes : Preference.TYPES.values()) {
    getPreferenceObject(pTypes);
  }
}

Fixed version (ground truth):
/** 
 * Creates all Preference objects that the program will use. Feels somewhat hacked together at the moment. Can be run more than once without repercussion.
 */
public static synchronized void init(){
  for (  Preference.TYPES pTypes : Preference.TYPES.values()) {
    getPreferenceObject(pTypes);
  }
  getPreferenceObject(Preference.TYPES.LAST_NOTIFICATION_ID).setForceSave(true);
  getPreferenceObject(Preference.TYPES.SAVE_PREFS).setForceSave(true);
}
Program: 81022
Project: 81022
Buggy source:
public static synchronized void savePreferences(){
  boolean shouldSave=getPreferenceObject(Preference.TYPES.SAVE_PREFS).shouldSave();
  try {
    for (    Preference p : prefArray) {
      if (p.getValue() == null || !shouldSave) {
        myPrefs.remove(p.getPrefType().name());
      }
 else {
        myPrefs.put(p.getPrefType().name(),String.valueOf(p.getValue()));
      }
    }
    myPrefs.sync();
  }
 catch (  BackingStoreException bse) {
  }
}

Fixed version (ground truth):
public static synchronized void savePreferences(){
  boolean shouldSave=getBooleanPreference(Preference.TYPES.SAVE_PREFS);
  System.out.println("String_Node_Str" + shouldSave);
  try {
    for (    Preference p : prefArray) {
      if (p.getValue() == null || (!shouldSave && !p.forceSave())) {
        myPrefs.remove(p.getPrefType().name());
      }
 else {
        myPrefs.put(p.getPrefType().name(),String.valueOf(p.getValue()));
      }
    }
    myPrefs.sync();
  }
 catch (  BackingStoreException bse) {
  }
}
Program: 81023
Project: 81023
Buggy source:
public static synchronized String getStringPreference(Preference.TYPES type){
  return myPrefs.get(type.name(),null);
}

Fixed version (ground truth):
public static synchronized String getStringPreference(Preference.TYPES type){
  String str=String.valueOf(getPreferenceObject(type).getValue());
  if (str.equalsIgnoreCase("String_Node_Str")) {
    str=null;
  }
  return str;
}
Program: 81024
Project: 81024
Buggy source:
/** 
 * Gets the integer value for the given preference.
 * @param type The Preference to get the value of
 * @return The integer value, or -1 if preference is not an integer OR does not exist
 */
public static synchronized int getIntegerPreference(Preference.TYPES type){
  try {
    return Integer.parseInt(String.valueOf(loadPreferenceValue(type)));
  }
 catch (  NumberFormatException numberFormatException) {
    return -1;
  }
}

Fixed version (ground truth):
/** 
 * Gets the integer value for the given preference.
 * @param type The Preference to get the value of
 * @return The integer value, or -1 if preference is not an integer OR does not exist
 */
public static synchronized int getIntegerPreference(Preference.TYPES type){
  try {
    return Integer.parseInt(String.valueOf(getPreferenceObject(type).getValue()));
  }
 catch (  NumberFormatException numberFormatException) {
    return -1;
  }
}
Program: 81025
Project: 81025
Buggy source:
public static synchronized boolean getBooleanPreference(Preference.TYPES type){
  return Boolean.parseBoolean(String.valueOf(loadPreferenceValue(type)));
}

Fixed version (ground truth):
public static synchronized boolean getBooleanPreference(Preference.TYPES type){
  System.out.println("String_Node_Str" + type.name() + "String_Node_Str"+ Boolean.parseBoolean(String.valueOf(getPreferenceObject(type).getValue())));
  return Boolean.parseBoolean(String.valueOf(getPreferenceObject(type).getValue()));
}
Program: 81026
Project: 81026
Buggy source:
/** 
 * Opens the URL given in the computer's default browser. Note that this will NOT work if the desktop environment isn't supported (generally a non-issue). Also note that this will simply open the URL -- it will not parse through it to make sure it is valid!
 * @param url The URL to open in the computer's default browser
 */
public static void openLinkInBrowser(URL url){
  if (url == null) {
    ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",null);
    return;
  }
  Desktop desktop=Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
  if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
    try {
      desktop.browse(url.toURI());
    }
 catch (    URISyntaxException|IOException e) {
      ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",e);
    }
  }
 else {
    ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",null);
  }
}

Fixed version (ground truth):
/** 
 * Opens the URL given in the computer's default browser. Note that this will NOT work if the desktop environment isn't supported (generally a non-issue). Also note that this will simply open the URL -- it will not parse through it to make sure it is valid!
 * @param url The URL to open in the computer's default browser
 */
public static void openLinkInBrowser(URL url){
  if (url == null) {
    ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",null);
    return;
  }
  Desktop desktop=Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
  if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
    try {
      desktop.browse(url.toURI());
    }
 catch (    URISyntaxException|IOException e) {
      ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",e);
    }
  }
 else {
    try {
      if (!browse(url.toURI())) {
        ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",null);
      }
    }
 catch (    URISyntaxException use) {
      ErrorDisplay.showErrorWindow("String_Node_Str","String_Node_Str",use);
    }
  }
}