nus-yam/ex-repair huggingface dataset:
Program: 21458
Project: 21458
Buggy source:
/** 
 * Bricht den Watchdog ab. Alle laufenden downloads werden beendet und die downloadliste zurückgesetzt. Diese Funktion blockiert bis alle Downloads erfolgreich abgeborhcen wurden.
 */
void abort(){
  for (int i=0; i < this.activeLinks.size(); i++) {
    activeLinks.get(i).abortDownload();
  }
  boolean check=true;
  while (true) {
    check=true;
    for (int i=0; i < this.activeLinks.size(); i++) {
      if (activeLinks.get(i).isAlive()) {
        check=false;
        break;
      }
    }
    if (check)     break;
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
    }
  }
  this.aborted=true;
  this.clearDownloadListStatus();
}

Fixed version (ground truth):
/** 
 * Bricht den Watchdog ab. Alle laufenden downloads werden beendet und die downloadliste zurückgesetzt. Diese Funktion blockiert bis alle Downloads erfolgreich abgeborhcen wurden.
 */
void abort(){
  for (int i=0; i < this.activeLinks.size(); i++) {
    activeLinks.get(i).abortDownload();
  }
  deligateFireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,null));
  boolean check=true;
  while (true) {
    check=true;
    for (int i=0; i < this.activeLinks.size(); i++) {
      if (activeLinks.get(i).isAlive()) {
        check=false;
        break;
      }
    }
    if (check)     break;
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
    }
  }
  this.aborted=true;
  this.clearDownloadListStatus();
}
Program: 21459
Project: 21459
Buggy source:
public JDController(){
  downloadLinks=new Vector<DownloadLink>();
  speedMeter=new SpeedMeter(5000);
  clipboard=new ClipboardHandler(this);
  JDUtilities.setController(this);
}

Fixed version (ground truth):
public JDController(){
  downloadLinks=new Vector<DownloadLink>();
  speedMeter=new SpeedMeter(10000);
  clipboard=new ClipboardHandler(this);
  downloadStatus=DOWNLOAD_NOT_RUNNING;
  JDUtilities.setController(this);
}
Program: 21460
Project: 21460
Buggy source:
private void stopDownloads(){
  if (watchdog != null) {
    setDownloadStatus(DOWNLOAD_TERMINATION_IN_PROGRESS);
    watchdog.abort();
    setDownloadStatus(DOWNLOAD_NOT_RUNNING);
  }
}

Fixed version (ground truth):
/** 
 * Bricht den Download ab und blockiert bis er abgebrochen wurde.
 */
private void stopDownloads(){
  if (getDownloadStatus() == DOWNLOAD_RUNNING) {
    setDownloadStatus(DOWNLOAD_TERMINATION_IN_PROGRESS);
    fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_DOWNLOAD_TERMINATION_ACTIVE,this));
    watchdog.abort();
    setDownloadStatus(DOWNLOAD_NOT_RUNNING);
    fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_DOWNLOAD_TERMINATION_INACTIVE,this));
  }
}
Program: 21462
Project: 21462
Buggy source:
public void setDownloadStatus(int downloadStatus){
  this.downloadStatus=downloadStatus;
}

Fixed version (ground truth):
/** 
 * Setzt den Downloadstatus. Status Ids aus JDController.** sollten verwendet werden
 * @param downloadStatus
 */
public void setDownloadStatus(int downloadStatus){
  this.downloadStatus=downloadStatus;
}
Program: 21463
Project: 21463
Buggy source:
/** 
 * Lädt zum Start das erste Mal alle Links aus einer Datei
 */
public boolean initDownloadLinks(){
  Vector<DownloadLink> list=loadDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
  if (list != null) {
    downloadLinks=loadDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
    if (uiInterface != null)     uiInterface.setDownloadLinks(downloadLinks);
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Lädt zum Start das erste Mal alle Links aus einer Datei
 * @return true/False je nach Erfolg
 */
public boolean initDownloadLinks(){
  Vector<DownloadLink> list=loadDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
  if (list != null) {
    downloadLinks=loadDownloadLinks(JDUtilities.getResourceFile("String_Node_Str"));
    if (uiInterface != null)     uiInterface.setDownloadLinks(downloadLinks);
    return true;
  }
 else {
    return false;
  }
}
Program: 21464
Project: 21464
Buggy source:
public int getDownloadStatus(){
  if (watchdog == null || watchdog.isAborted()) {
    return DOWNLOAD_NOT_RUNNING;
  }
 else {
    return this.downloadStatus;
  }
}

Fixed version (ground truth):
/** 
 * Gibt den Status (ID) der downloads zurück
 * @return
 */
public int getDownloadStatus(){
  if (watchdog == null || watchdog.isAborted() && downloadStatus == DOWNLOAD_RUNNING) {
    setDownloadStatus(DOWNLOAD_NOT_RUNNING);
  }
  return this.downloadStatus;
}
Program: 21465
Project: 21465
Buggy source:
/** 
 * Bricht den Downloadvorgang ab.
 */
public void abortDownload(){
  aborted=true;
  if (currentPlugin != null)   currentPlugin.abort();
}

Fixed version (ground truth):
/** 
 * Bricht den Downloadvorgang ab.
 */
public void abortDownload(){
  downloadLink.setStatusText("String_Node_Str");
  aborted=true;
  if (currentPlugin != null)   currentPlugin.abort();
}
Program: 21467
Project: 21467
Buggy source:
/** 
 * Sortiert die Linklist
 */
@SuppressWarnings("String_Node_Str") public void sortLinkList(){
  Collections.sort(linkList);
}

Fixed version (ground truth):
/** 
 * Sortiert die Linklist
 */
@SuppressWarnings("String_Node_Str") public void sortLinkList(){
  Collections.sort(linkList,new Comparator(){
    public int compare(    Object a,    Object b){
      if (a instanceof DownloadLink && b instanceof DownloadLink) {
        if (((DownloadLink)a).extractFileNameFromURL().compareToIgnoreCase(((DownloadLink)b).extractFileNameFromURL()) > 0) {
          return -1;
        }
 else         if (((DownloadLink)a).extractFileNameFromURL().compareToIgnoreCase(((DownloadLink)b).extractFileNameFromURL()) < 0) {
          return 1;
        }
 else {
          return 0;
        }
      }
      return 0;
    }
  }
);
}
Program: 21468
Project: 21468
Buggy source:
/** 
 * Zeichnet die Linklist neu
 */
public void fireTableChanged(){
  DefaultListModel tmp=new DefaultListModel();
  list.removeAll();
  for (int i=0; i < linkList.size(); i++) {
    if (!linkList.elementAt(i).isAvailabilityChecked()) {
      tmp.addElement((i + 1) + "String_Node_Str" + linkList.elementAt(i).getPlugin().getPluginName()+ "String_Node_Str"+ linkList.elementAt(i).getFileNameFrom());
    }
 else {
      if (linkList.elementAt(i).isAvailable()) {
        tmp.addElement((i + 1) + "String_Node_Str" + linkList.elementAt(i).getPlugin().getPluginName()+ "String_Node_Str"+ linkList.elementAt(i).getFileInfomationString());
      }
 else {
        tmp.addElement((i + 1) + "String_Node_Str" + linkList.elementAt(i).getPlugin().getPluginName()+ "String_Node_Str"+ linkList.elementAt(i).getFileInfomationString());
      }
    }
  }
  list.setModel(tmp);
}

Fixed version (ground truth):
/** 
 * Zeichnet die Linklist neu
 */
public void fireTableChanged(){
  DefaultListModel tmp=new DefaultListModel();
  list.removeAll();
  for (int i=0; i < linkList.size(); i++) {
    if (!linkList.elementAt(i).isAvailabilityChecked()) {
      tmp.addElement((i + 1) + "String_Node_Str" + linkList.elementAt(i).getPlugin().getPluginName()+ "String_Node_Str"+ linkList.elementAt(i).extractFileNameFromURL());
    }
 else {
      if (linkList.elementAt(i).isAvailable()) {
        tmp.addElement((i + 1) + "String_Node_Str" + linkList.elementAt(i).getPlugin().getPluginName()+ "String_Node_Str"+ linkList.elementAt(i).getFileInfomationString());
      }
 else {
        tmp.addElement((i + 1) + "String_Node_Str" + linkList.elementAt(i).getPlugin().getPluginName()+ "String_Node_Str"+ linkList.elementAt(i).getFileInfomationString());
      }
    }
  }
  list.setModel(tmp);
}
Program: 21469
Project: 21469
Buggy source:
/** 
 * Bricht den Watchdog ab. Alle alufenden downloads werden beendet und die downloadliste zurückgesetzt
 */
void abort(){
  this.aborted=true;
  for (int i=0; i < this.activeLinks.size(); i++) {
    activeLinks.get(i).abortDownload();
  }
  this.clearDownloadListStatus();
}

Fixed version (ground truth):
/** 
 * Bricht den Watchdog ab. Alle laufenden downloads werden beendet und die downloadliste zurückgesetzt. Diese Funktion blockiert bis alle Downloads erfolgreich abgeborhcen wurden.
 */
void abort(){
  for (int i=0; i < this.activeLinks.size(); i++) {
    activeLinks.get(i).abortDownload();
  }
  boolean check=true;
  while (true) {
    check=true;
    for (int i=0; i < this.activeLinks.size(); i++) {
      if (activeLinks.get(i).isAlive()) {
        check=false;
        break;
      }
    }
    if (check)     break;
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
    }
  }
  this.aborted=true;
  this.clearDownloadListStatus();
}
Program: 21470
Project: 21470
Buggy source:
public boolean isAborted(){
  return aborted;
}

Fixed version (ground truth):
public boolean isAborted(){
  return !isAlive();
}
Program: 21471
Project: 21471
Buggy source:
private void stopDownloads(){
  if (watchdog != null) {
    watchdog.abort();
  }
}

Fixed version (ground truth):
private void stopDownloads(){
  if (watchdog != null) {
    setDownloadStatus(DOWNLOAD_TERMINATION_IN_PROGRESS);
    watchdog.abort();
    setDownloadStatus(DOWNLOAD_NOT_RUNNING);
  }
}
Program: 21472
Project: 21472
Buggy source:
/** 
 * Startet den Downloadvorgang. Dies eFUnkton sendet das startdownload event und aktiviert die ersten downloads
 */
private void startDownloads(){
  if (!isDownloadRunning()) {
    logger.info("String_Node_Str");
    this.watchdog=new DownloadWatchDog(this);
    watchdog.start();
  }
 else {
    fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_ALL_DOWNLOADS_FINISHED,false));
  }
}

Fixed version (ground truth):
/** 
 * Startet den Downloadvorgang. Dies eFUnkton sendet das startdownload event und aktiviert die ersten downloads
 */
private synchronized void startDownloads(){
  if (getDownloadStatus() == DOWNLOAD_NOT_RUNNING) {
    setDownloadStatus(DOWNLOAD_RUNNING);
    logger.info("String_Node_Str");
    this.watchdog=new DownloadWatchDog(this);
    watchdog.start();
  }
}
Program: 21473
Project: 21473
Buggy source:
/** 
 * Bricht den Downloadvorgang ab
 */
public void abortDownload(){
  aborted=true;
  if (currentPlugin != null)   currentPlugin.abort();
}

Fixed version (ground truth):
/** 
 * Bricht den Downloadvorgang ab.
 */
public void abortDownload(){
  aborted=true;
  if (currentPlugin != null)   currentPlugin.abort();
}
Program: 21475
Project: 21475
Buggy source:
public void actionPerformed(ActionEvent e){
  continueInstall=true;
  this.setVisible(false);
}

Fixed version (ground truth):
/** 
 * actionPerformed fÃ¼r die buttons
 * @param e ActionEvent
 */
public void actionPerformed(ActionEvent e){
  aborted=false;
  this.setVisible(false);
}
Program: 21476
Project: 21476
Buggy source:
public Installer(){
  super();
  setModal(false);
  setLayout(new GridBagLayout());
  this.setTitle("String_Node_Str");
  setLocation(20,20);
  this.setAlwaysOnTop(true);
  addWindowListener(new WindowAdapter(){
    public void windowClosing(    WindowEvent event){
      abortInstallation();
    }
  }
);
  pack();
}

Fixed version (ground truth):
/** 
 */
public Installer(){
  super();
  setModal(true);
  setLayout(new GridBagLayout());
  this.setTitle("String_Node_Str");
  this.setAlwaysOnTop(true);
  setLocation(20,20);
  lblMessage=new JLabel();
  browseFile=new BrowseFile(50);
  btnOK=new JButton("String_Node_Str");
  btnOK.addActionListener(this);
  addWindowListener(this);
  JDUtilities.addToGridBag(this,lblMessage,0,0,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  JDUtilities.addToGridBag(this,browseFile,0,1,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  JDUtilities.addToGridBag(this,btnOK,0,2,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
}
Program: 21477
Project: 21477
Buggy source:
public void windowClosing(WindowEvent event){
  abortInstallation();
}

Fixed version (ground truth):
public void windowClosing(WindowEvent e){
  abortInstallation();
}
Program: 21478
Project: 21478
Buggy source:
/** 
 * Bricht die Installation ab
 */
public void abortInstallation(){
  cancelInstall=true;
  this.setVisible(false);
  clearPanel();
}

Fixed version (ground truth):
/** 
 * Bricht die Installation ab
 */
public void abortInstallation(){
  aborted=true;
  this.setVisible(false);
}
Program: 21479
Project: 21479
Buggy source:
/** 
 * @param str
 * @param path
 * @return Fragt einen Ordner beim User ab.  mit str kann man gezielt nach einem ordner fragen
 */
public String getDirectory(String str,File path){
  clearPanel();
  logger.info("String_Node_Str");
  continueInstall=false;
  cancelInstall=false;
  JLabel label1=new JLabel(str);
  JDUtilities.addToGridBag(this,label1,0,0,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  panels.add(label1);
  BrowseFile browse1=new BrowseFile(50);
  panels.add(browse1);
  browse1.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  browse1.setCurrentPath(path);
  JDUtilities.addToGridBag(this,browse1,0,1,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  JButton button1=new JButton("String_Node_Str");
  panels.add(button1);
  button1.addActionListener(this);
  JDUtilities.addToGridBag(this,button1,0,2,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  pack();
  setVisible(true);
  if (waitFor()) {
    return browse1.getText();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Fragt einen Ordner beim User ab.  mit str kann man gezielt nach einem ordner fragen
 * @param message Die Nachricht, die dem Benutzer gezeigt werden soll
 * @param path Standardpfad
 * @return Dateipfad 
 */
public String getDirectory(String message,File path){
  logger.info("String_Node_Str");
  lblMessage.setText(message);
  browseFile.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  browseFile.setCurrentPath(path);
  pack();
  setVisible(true);
  if (aborted)   return null;
 else   return browseFile.getText();
}
Program: 21480
Project: 21480
Buggy source:
/** 
 * Führt ein Webupdate nach der Installation aus und gibt im erfolgsfall true zurück, sonst false
 * @return true/Fasle
 */
public boolean doUpdate(){
  logger.info("String_Node_Str");
  clearPanel();
  continueInstall=false;
  cancelInstall=false;
  JLabel label=new JLabel("String_Node_Str");
  panels.add(label);
  JDUtilities.addToGridBag(this,label,0,0,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  final JLabel ticker=new JLabel("String_Node_Str");
  panels.add(ticker);
  JDUtilities.addToGridBag(this,ticker,0,2,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  pack();
  setVisible(true);
  Thread th=new Thread(){
    public void run(){
      while (true) {
        try {
          Thread.sleep(300);
        }
 catch (        InterruptedException e) {
        }
        if (ticker.getText().equals("String_Node_Str")) {
          ticker.setText("String_Node_Str");
        }
 else         if (ticker.getText().equals("String_Node_Str")) {
          ticker.setText("String_Node_Str");
        }
 else         if (ticker.getText().equals("String_Node_Str")) {
          ticker.setText("String_Node_Str");
        }
      }
    }
  }
;
  th.start();
  WebUpdater updater=new WebUpdater(null);
  updater.run();
  ticker.setText("String_Node_Str" + updater.getUpdatedFiles());
  try {
    Thread.sleep(2000);
  }
 catch (  InterruptedException e) {
  }
  this.setVisible(false);
  return true;
}

Fixed version (ground truth):
/** 
 * FÃ¼hrt ein Webupdate nach der Installation aus und gibt im erfolgsfall true zurÃ¼ck, sonst false
 * @return true/Fasle
 */
public boolean doUpdate(){
  logger.info("String_Node_Str");
  JLabel label=new JLabel("String_Node_Str");
  JDUtilities.addToGridBag(this,label,0,0,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  final JLabel ticker=new JLabel("String_Node_Str");
  JDUtilities.addToGridBag(this,ticker,0,2,1,1,0,0,null,GridBagConstraints.CENTER,GridBagConstraints.CENTER);
  pack();
  setVisible(true);
  Thread th=new Thread(){
    public void run(){
      while (true) {
        try {
          Thread.sleep(300);
        }
 catch (        InterruptedException e) {
        }
        if (ticker.getText().equals("String_Node_Str")) {
          ticker.setText("String_Node_Str");
        }
 else         if (ticker.getText().equals("String_Node_Str")) {
          ticker.setText("String_Node_Str");
        }
 else         if (ticker.getText().equals("String_Node_Str")) {
          ticker.setText("String_Node_Str");
        }
      }
    }
  }
;
  th.start();
  WebUpdater updater=new WebUpdater(null);
  updater.run();
  ticker.setText("String_Node_Str" + updater.getUpdatedFiles());
  try {
    Thread.sleep(2000);
  }
 catch (  InterruptedException e) {
  }
  this.setVisible(false);
  return true;
}
Program: 21484
Project: 21484
Buggy source:
/** 
 * Lädt eine LinkListe
 * @param file Die Datei, aus der die Links gelesen werden
 * @return Ein neuer Vector mit den DownloadLinks
 */
public Vector<DownloadLink> loadDownloadLinks(File file){
  if (file.exists()) {
    Object obj=JDUtilities.loadObject(null,file,false);
    if (obj != null && obj instanceof Vector) {
      return (Vector<DownloadLink>)obj;
    }
  }
  return new Vector<DownloadLink>();
}

Fixed version (ground truth):
/** 
 * Lädt eine LinkListe
 * @param file Die Datei, aus der die Links gelesen werden
 * @return Ein neuer Vector mit den DownloadLinks
 */
public Vector<DownloadLink> loadDownloadLinks(File file){
  if (file.exists()) {
    Object obj=JDUtilities.loadObject(null,file,false);
    if (obj != null && obj instanceof Vector) {
      Vector<DownloadLink> links=(Vector<DownloadLink>)obj;
      Iterator<DownloadLink> iterator=links.iterator();
      DownloadLink localLink;
      PluginForHost pluginForHost;
      while (iterator.hasNext()) {
        localLink=iterator.next();
        pluginForHost=JDUtilities.getPluginForHost(localLink.getHost());
        if (pluginForHost != null) {
          localLink.setPlugin(pluginForHost);
        }
 else {
          logger.severe("String_Node_Str" + localLink.getHost() + "String_Node_Str"+ localLink.getName());
        }
      }
      return links;
    }
  }
  return new Vector<DownloadLink>();
}
Program: 21486
Project: 21486
Buggy source:
private double scanPreIntersection(int xx,int yy,int left,int top,int tmpIntersectionWidth,int tmpIntersectionHeight){
  double tmpError;
  int yStep=tmpIntersectionHeight / (preScanFaktor + 1);
  tmpPixelBoth=0;
  tmpPixelBButNotA=0;
  tmpPixelAButNotB=0;
  pixelAll=0;
  for (int y=yStep; y <= tmpIntersectionHeight - yStep; y+=yStep) {
    for (int x=0; x < tmpIntersectionWidth; x++) {
      pixelAll++;
      int pixelType=getPixelType(x,y,xx,yy,left,top);
switch (pixelType) {
case 0:
        tmpPixelBoth++;
      break;
case 1:
    tmpPixelBButNotA++;
  break;
case 2:
tmpPixelAButNotB++;
break;
}
}
}
if (pixelAll > 0) {
tmpErrorA=(double)tmpPixelAButNotB / (double)(tmpPixelBoth + tmpPixelAButNotB);
tmpErrorB=(double)tmpPixelBButNotA / (double)(tmpPixelBButNotA + tmpPixelBoth);
tmpErrorTotal=tmpErrorA * errorAWeight + tmpErrorB * errorbWeight;
localHeightPercent=(double)tmpIntersectionHeight / a.getHeight();
localWidthPercent=(double)tmpIntersectionWidth / a.getWidth();
heightFaktor=Math.min(1.0,Math.pow(1.0 - localHeightPercent,2) * intersectionDimensionWeight);
widthFaktor=Math.min(1.0,Math.pow(1.0 - localWidthPercent,2) * intersectionDimensionWeight);
tmpError=tmpErrorTotal;
tmpError+=heightFaktor;
tmpError+=widthFaktor;
tmpError/=4.0;
tmpError*=1.2;
tmpError=Math.min(1.0,tmpError);
return (int)(100 * tmpError);
}
 else {
return 100;
}
}

Fixed version (ground truth):
private double scanPreIntersection(int xx,int yy,int left,int top,int tmpIntersectionWidth,int tmpIntersectionHeight){
  double tmpError;
  int yStep=tmpIntersectionHeight / (preScanFaktor + 1);
  tmpPixelBoth=0;
  tmpPixelBButNotA=0;
  tmpPixelAButNotB=0;
  pixelAll=0;
  for (int y=yStep; y <= tmpIntersectionHeight - yStep; y+=yStep) {
    for (int x=0; x < tmpIntersectionWidth; x++) {
      pixelAll++;
      int pixelType=getPixelType(x,y,xx,yy,left,top);
switch (pixelType) {
case 0:
        tmpPixelBoth++;
      break;
case 1:
    tmpPixelBButNotA++;
  break;
case 2:
tmpPixelAButNotB++;
break;
}
}
}
if (pixelAll > 0) {
tmpErrorA=(double)tmpPixelAButNotB / (double)(tmpPixelBoth + tmpPixelAButNotB);
tmpErrorB=(double)tmpPixelBButNotA / (double)(tmpPixelBButNotA + tmpPixelBoth);
tmpErrorTotal=tmpErrorA * errorAWeight + tmpErrorB * errorbWeight;
localHeightPercent=(double)tmpIntersectionHeight / (double)b.getHeight();
localWidthPercent=(double)tmpIntersectionWidth / (double)b.getWidth();
tmpHeightFaktor=Math.pow(1.0 - localHeightPercent,2);
tmpWidthFaktor=Math.pow(1.0 - localWidthPercent,2);
tmpError=tmpErrorTotal;
tmpError+=Math.min(1.0,tmpHeightFaktor * intersectionDimensionWeight);
tmpError+=Math.min(1.0,tmpWidthFaktor * intersectionDimensionWeight);
tmpError/=4.0;
tmpError*=1.2;
tmpError=Math.min(1.0,tmpError);
return (int)(100 * tmpError);
}
 else {
return 100;
}
}
Program: 21487
Project: 21487
Buggy source:
public void actionPerformed(ActionEvent e){
  if (e.getSource() == this.btnOk) {
    if (linkList.size() == 0) {
      this.setVisible(false);
      return;
    }
    FilePackage fp=new FilePackage();
    fp.setComment(txfComment.getText().trim());
    fp.setPassword(txfPassword.getText().trim());
    fp.setDownloadDirectory(bfSubFolder.getText().trim());
    for (int i=0; i < linkList.size(); i++) {
      linkList.elementAt(i).setFilePackage(fp);
    }
    File file=new File(JDUtilities.getConfiguration().getDownloadDirectory());
    if (bfSubFolder.getText().trim().length() > 0) {
      file=new File(new File(bfSubFolder.getText().trim()),linkList.elementAt(0).getFileName() + "String_Node_Str");
    }
 else {
      file=new File(file,linkList.elementAt(0).getFileName() + "String_Node_Str");
    }
    logger.info(file.getAbsolutePath());
    JDUtilities.writeLocalFile(file,fp.getComment() + "String_Node_Str" + fp.getDownloadDirectory()+ "String_Node_Str"+ fp.getPassword());
    parent.fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_GRABBED,linkList));
    this.setVisible(false);
    parent.setDropTargetText("String_Node_Str" + linkList.size());
  }
  if (e.getSource() == this.btnRemove) {
    removeSelectedLinks();
  }
  if (e.getSource() == this.btnCancel) {
    this.setVisible(false);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if (e.getSource() == this.btnOk) {
    if (linkList.size() == 0) {
      this.setVisible(false);
      return;
    }
    Color c=new Color((int)(Math.random() * 0xffffff));
    c=c.brighter();
    FilePackage fp=new FilePackage();
    fp.setProperty("String_Node_Str",c);
    fp.setComment(txfComment.getText().trim());
    fp.setPassword(txfPassword.getText().trim());
    fp.setDownloadDirectory(bfSubFolder.getText().trim());
    for (int i=0; i < linkList.size(); i++) {
      linkList.elementAt(i).setFilePackage(fp);
    }
    File file=new File(JDUtilities.getConfiguration().getDownloadDirectory());
    if (bfSubFolder.getText().trim().length() > 0) {
      file=new File(new File(bfSubFolder.getText().trim()),linkList.elementAt(0).getFileName() + "String_Node_Str");
    }
 else {
      file=new File(file,linkList.elementAt(0).getFileName() + "String_Node_Str");
    }
    logger.info(file.getAbsolutePath());
    JDUtilities.writeLocalFile(file,fp.getComment() + "String_Node_Str" + fp.getDownloadDirectory()+ "String_Node_Str"+ fp.getPassword());
    parent.fireUIEvent(new UIEvent(this,UIEvent.UI_LINKS_GRABBED,linkList));
    this.setVisible(false);
    parent.setDropTargetText("String_Node_Str" + linkList.size());
  }
  if (e.getSource() == this.btnRemove) {
    removeSelectedLinks();
  }
  if (e.getSource() == this.btnCancel) {
    this.setVisible(false);
  }
}
Program: 21488
Project: 21488
Buggy source:
/** 
 * Delligiert die Pluginevents weiter an das host/decryptpanel. CHangedEvents werden abgefangen und im sekundeninterval weitergegeben.
 */
public void deligatedPluginEvent(PluginEvent event){
  if (event.getSource() instanceof PluginForHost && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
    this.hostPluginDataChanged=event;
    return;
  }
  if (event.getSource() instanceof PluginForDecrypt && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
    this.decryptPluginDataChanged=event;
    return;
  }
  if (event.getSource() instanceof PluginForHost) {
    tabDownloadTable.pluginEvent(event);
    return;
  }
  if (event.getSource() instanceof PluginForDecrypt) {
    splitpane.setDividerLocation(0.8);
    tabPluginActivity.pluginEvent(event);
    return;
  }
}

Fixed version (ground truth):
/** 
 * Delligiert die Pluginevents weiter an das host/decryptpanel. CHangedEvents werden abgefangen und im sekundeninterval weitergegeben.
 */
public void deligatedPluginEvent(PluginEvent event){
  if (event.getSource() instanceof PluginForHost && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
    this.hostPluginDataChanged=event;
    return;
  }
  if (event.getSource() instanceof PluginForDecrypt && event.getEventID() == PluginEvent.PLUGIN_DATA_CHANGED) {
    this.decryptPluginDataChanged=event;
    return;
  }
  if (event.getSource() instanceof PluginForHost) {
    tabDownloadTable.pluginEvent(event);
    return;
  }
  if (event.getSource() instanceof PluginForDecrypt) {
    logger.info("String_Node_Str");
    tabPluginActivity.pluginEvent(event);
    splitpane.setDividerLocation(0.8);
    return;
  }
}
Program: 21489
Project: 21489
Buggy source:
public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column){
  if (value instanceof JProgressBar)   return (JProgressBar)value;
  Component c=super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
  if (!isSelected) {
    DownloadLink dLink=allLinks.get(row);
    if (!dLink.isEnabled()) {
      c.setBackground(COLOR_DISABLED);
    }
 else     if (dLink.getRemainingWaittime() > 0) {
      c.setBackground(COLOR_WAIT);
    }
 else     if (dLink.getStatus() == DownloadLink.STATUS_DONE) {
      c.setBackground(COLOR_DONE);
    }
 else     if (dLink.getStatus() != DownloadLink.STATUS_TODO && dLink.getStatus() != DownloadLink.STATUS_ERROR_DOWNLOAD_LIMIT && dLink.getStatus() != DownloadLink.STATUS_DOWNLOAD_IN_PROGRESS) {
      c.setBackground(COLOR_ERROR);
    }
 else     c.setBackground(Color.WHITE);
  }
  return c;
}

Fixed version (ground truth):
public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column){
  if (value instanceof JProgressBar)   return (JProgressBar)value;
  Component c=super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
  if (!isSelected) {
    DownloadLink dLink=allLinks.get(row);
    if (!dLink.isEnabled()) {
      c.setBackground(COLOR_DISABLED);
    }
 else     if (dLink.getRemainingWaittime() > 0) {
      c.setBackground(COLOR_WAIT);
    }
 else     if (dLink.getStatus() == DownloadLink.STATUS_DONE) {
      c.setBackground(COLOR_DONE);
    }
 else     if (dLink.getStatus() != DownloadLink.STATUS_TODO && dLink.getStatus() != DownloadLink.STATUS_ERROR_DOWNLOAD_LIMIT && dLink.getStatus() != DownloadLink.STATUS_DOWNLOAD_IN_PROGRESS) {
      c.setBackground(COLOR_ERROR);
    }
 else {
      c.setBackground(Color.WHITE);
    }
    if (column == 0) {
      c.setBackground((Color)dLink.getFilePackage().getProperty("String_Node_Str"));
    }
  }
  return c;
}
Program: 21490
Project: 21490
Buggy source:
/** 
 * Führt einen befehl aus und wartet nicht! bis dieser abgearbeitet wurde
 * @param command
 * @throws IOException
 */
public static void runCommand(String command) throws IOException {
  if (command == null) {
    return;
  }
  Runtime rt=Runtime.getRuntime();
  rt.exec(command,null,new File(command.split("String_Node_Str")[0]).getParentFile());
}

Fixed version (ground truth):
/** 
 * Führt einen befehl aus und wartet nicht! bis dieser abgearbeitet wurde
 * @param command
 * @throws IOException
 */
public static void runCommand(String command) throws IOException {
  if (command == null) {
    return;
  }
  try {
    Runtime rt=Runtime.getRuntime();
    rt.exec(command,null,new File(command.split("String_Node_Str")[0]).getParentFile());
  }
 catch (  Exception e) {
    logger.severe("String_Node_Str" + e.getMessage());
  }
}
Program: 21491
Project: 21491
Buggy source:
/** 
 * Führt einen Befehl aus, wartet bis dieser abgearbeitet wurde und gibt dessen rückgabe als String zurück
 * @param command
 * @return
 * @throws IOException
 */
public static String runCommandWaitAndReturn(String command) throws IOException {
  String ret="String_Node_Str";
  Runtime rt=Runtime.getRuntime();
  Process pr=rt.exec(command,null,new File(command.split("String_Node_Str")[0]).getParentFile());
  BufferedReader br=new BufferedReader(new InputStreamReader(pr.getInputStream()));
  String line;
  while ((line=br.readLine()) != null) {
    ret+=line;
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Führt einen Befehl aus, wartet bis dieser abgearbeitet wurde und gibt dessen rückgabe als String zurück
 * @param command
 * @return
 * @throws IOException
 */
public static String runCommandWaitAndReturn(String command) throws IOException {
  String ret="String_Node_Str";
  try {
    Runtime rt=Runtime.getRuntime();
    Process pr=rt.exec(command,null,new File(command.split("String_Node_Str")[0]).getParentFile());
    BufferedReader br=new BufferedReader(new InputStreamReader(pr.getInputStream()));
    String line;
    while ((line=br.readLine()) != null) {
      ret+=line;
    }
  }
 catch (  Exception e) {
    logger.severe("String_Node_Str" + e.getMessage());
    return null;
  }
  return ret;
}
Program: 21492
Project: 21492
Buggy source:
/** 
 * Führt einen Shell befehl aus und wartet bis dieser abgearbeitet ist
 * @param command
 * @throws IOException
 */
public static void runCommandAndWait(String command) throws IOException {
  Runtime rt=Runtime.getRuntime();
  Process pr=rt.exec(command,null,new File(command.split("String_Node_Str")[0]).getParentFile());
  BufferedReader br=new BufferedReader(new InputStreamReader(pr.getInputStream()));
  while ((br.readLine()) != null) {
  }
}

Fixed version (ground truth):
/** 
 * Führt einen Shell befehl aus und wartet bis dieser abgearbeitet ist
 * @param command
 * @throws IOException
 */
public static void runCommandAndWait(String command) throws IOException {
  try {
    Runtime rt=Runtime.getRuntime();
    Process pr=rt.exec(command,null,new File(command.split("String_Node_Str")[0]).getParentFile());
    BufferedReader br=new BufferedReader(new InputStreamReader(pr.getInputStream()));
    while ((br.readLine()) != null) {
    }
  }
 catch (  Exception e) {
    logger.severe("String_Node_Str" + e.getMessage());
  }
}
Program: 21493
Project: 21493
Buggy source:
private void onErrorAbused(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  downloadLink.setInProgress(false);
}

Fixed version (ground truth):
private void onErrorAbused(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED));
}
Program: 21494
Project: 21494
Buggy source:
private void onErrorCaptchaImage(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  downloadLink.setInProgress(false);
}

Fixed version (ground truth):
private void onErrorCaptchaImage(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED));
}
Program: 21495
Project: 21495
Buggy source:
private void onErrorFileNotFound(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  downloadLink.setInProgress(false);
}

Fixed version (ground truth):
private void onErrorFileNotFound(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED));
}
Program: 21497
Project: 21497
Buggy source:
/** 
 * Diese Methode prüft wiederholt die Downloadlinks solange welche dabei sind die Wartezeit haben. Läuft die Wartezeit ab, oder findet ein reconnect statt, wird wieder die Run methode aufgerifen
 */
private void waitForDownloadLinks(){
  Vector<DownloadLink> links;
  DownloadLink link;
  boolean hasWaittimeLinks=false;
  boolean returnToRun=false;
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED));
  links=controller.getDownloadLinks();
  for (int i=0; i < links.size(); i++) {
    link=links.elementAt(i);
    if (!link.isEnabled())     continue;
    if (link.getStatus() == DownloadLink.STATUS_ERROR_DOWNLOAD_LIMIT) {
      if (link.getRemainingWaittime() == 0) {
        link.setStatus(DownloadLink.STATUS_TODO);
        link.setEndOfWaittime(0);
        returnToRun=true;
      }
      hasWaittimeLinks=true;
    }
 else     if (link.getStatus() == DownloadLink.STATUS_TODO) {
      returnToRun=true;
    }
  }
  if (aborted) {
    clearDownloadListStatus();
    logger.warning("String_Node_Str");
    return;
  }
 else   if (returnToRun) {
    run();
    return;
  }
  if (!hasWaittimeLinks) {
    fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_ALL_DOWNLOADS_FINISHED));
    Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOADS_FINISHED_ALL),this);
    logger.info("String_Node_Str");
  }
 else {
    waitForDownloadLinks();
  }
}

Fixed version (ground truth):
/** 
 * Diese Methode prüft wiederholt die Downloadlinks solange welche dabei sind die Wartezeit haben. Läuft die Wartezeit ab, oder findet ein reconnect statt, wird wieder die Run methode aufgerifen
 */
private void waitForDownloadLinks(){
  Vector<DownloadLink> links;
  DownloadLink link;
  boolean hasWaittimeLinks=false;
  boolean returnToRun=false;
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED));
  links=controller.getDownloadLinks();
  for (int i=0; i < links.size(); i++) {
    link=links.elementAt(i);
    if (!link.isEnabled())     continue;
    if (link.getStatus() == DownloadLink.STATUS_ERROR_DOWNLOAD_LIMIT) {
      if (link.getRemainingWaittime() == 0) {
        link.setStatus(DownloadLink.STATUS_TODO);
        link.setEndOfWaittime(0);
        returnToRun=true;
      }
      hasWaittimeLinks=true;
    }
 else     if (link.getStatus() == DownloadLink.STATUS_TODO) {
      returnToRun=true;
    }
  }
  if (aborted) {
    clearDownloadListStatus();
    logger.warning("String_Node_Str");
    return;
  }
 else   if (returnToRun) {
    run();
    return;
  }
  if (!hasWaittimeLinks) {
    logger.info("String_Node_Str");
  }
 else {
    waitForDownloadLinks();
  }
}
Program: 21498
Project: 21498
Buggy source:
@Override public boolean doInteraction(Object arg){
  retries++;
  int maxRetries=0;
  if (JDUtilities.getConfiguration().getProperty(PROPERTY_IP_RETRIES) != null)   maxRetries=Integer.parseInt((String)JDUtilities.getConfiguration().getProperty(PROPERTY_IP_RETRIES));
  logger.info("String_Node_Str" + NAME + "String_Node_Str"+ retries);
  String ipBefore;
  String ipAfter;
  ipBefore=getIPAddress();
  logger.fine("String_Node_Str" + ipBefore);
  try {
    logger.info(JDUtilities.runCommandWaitAndReturn((String)JDUtilities.getConfiguration().getProperty(PROPERTY_RECONNECT_COMMAND)));
  }
 catch (  IOException e1) {
    e1.printStackTrace();
    return false;
  }
  if (JDUtilities.getConfiguration().getProperty(PROPERTY_IP_WAITCHECK) != null) {
    try {
      Thread.sleep(Integer.parseInt((String)JDUtilities.getConfiguration().getProperty(PROPERTY_IP_WAITCHECK)) * 1000);
    }
 catch (    NumberFormatException e) {
    }
catch (    InterruptedException e) {
    }
  }
  ipAfter=getIPAddress();
  logger.fine("String_Node_Str" + ipAfter);
  if (ipBefore == null || ipAfter == null || ipBefore.equals(ipAfter)) {
    logger.severe("String_Node_Str");
    if (retries < maxRetries || maxRetries <= 0) {
      return interact(arg);
    }
    this.setCallCode(Interaction.INTERACTION_CALL_ERROR);
    retries=0;
    return false;
  }
  this.setCallCode(Interaction.INTERACTION_CALL_SUCCESS);
  retries=0;
  return true;
}

Fixed version (ground truth):
@Override public boolean doInteraction(Object arg){
  retries++;
  int maxRetries=0;
  if (JDUtilities.getConfiguration().getProperty(PROPERTY_IP_RETRIES) != null)   maxRetries=Integer.parseInt((String)JDUtilities.getConfiguration().getProperty(PROPERTY_IP_RETRIES));
  logger.info("String_Node_Str" + NAME + "String_Node_Str"+ retries);
  String ipBefore;
  String ipAfter;
  ipBefore=getIPAddress();
  logger.fine("String_Node_Str" + ipBefore);
  try {
    logger.info(JDUtilities.runCommandWaitAndReturn((String)JDUtilities.getConfiguration().getProperty(PROPERTY_RECONNECT_COMMAND)));
  }
 catch (  IOException e1) {
    e1.printStackTrace();
    return false;
  }
  if (JDUtilities.getConfiguration().getProperty(PROPERTY_IP_WAITCHECK) != null) {
    try {
      Thread.sleep(Integer.parseInt((String)JDUtilities.getConfiguration().getProperty(PROPERTY_IP_WAITCHECK)) * 1000);
    }
 catch (    NumberFormatException e) {
    }
catch (    InterruptedException e) {
    }
  }
  ipAfter=getIPAddress();
  logger.fine("String_Node_Str" + ipAfter);
  if (ipBefore == null || ipAfter == null || ipBefore.equals(ipAfter)) {
    logger.severe("String_Node_Str");
    if (retries < ExternReconnect.MAX_RETRIES && (retries < maxRetries || maxRetries <= 0)) {
      return doInteraction(arg);
    }
    this.setCallCode(Interaction.INTERACTION_CALL_ERROR);
    retries=0;
    return false;
  }
  this.setCallCode(Interaction.INTERACTION_CALL_SUCCESS);
  retries=0;
  return true;
}
Program: 21500
Project: 21500
Buggy source:
public String toString(){
  return name;
}

Fixed version (ground truth):
public String toString(){
  return name + "String_Node_Str" + description+ "String_Node_Str";
}
Program: 21501
Project: 21501
Buggy source:
public String toString(){
  return NAME;
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str";
}
Program: 21502
Project: 21502
Buggy source:
public String toString(){
  return NAME;
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str";
}
Program: 21503
Project: 21503
Buggy source:
public String toString(){
  return NAME;
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str";
}
Program: 21505
Project: 21505
Buggy source:
public Interaction(){
  configuration=JDUtilities.getConfiguration();
}

Fixed version (ground truth):
public Interaction(){
}
Program: 21507
Project: 21507
Buggy source:
/** 
 * MTH File wird geladen und verarbeitet
 */
private void loadMTHFile() throws IOException {
  URL url=UTILITIES.getResourceURL(pathMethod + "String_Node_Str");
  if (url == null) {
    logger.severe("String_Node_Str");
    return;
  }
 else {
    mth=UTILITIES.parseXmlFile(url.openStream(),false);
  }
  createLetterDBFormMTH();
}

Fixed version (ground truth):
/** 
 * MTH File wird geladen und verarbeitet
 */
private void loadMTHFile() throws IOException {
  URL url=UTILITIES.getResourceURL(UTILITIES.getFullPath(new String[]{pathMethod.toString(),"String_Node_Str"}));
  if (url == null) {
    logger.severe("String_Node_Str");
    return;
  }
 else {
    mth=UTILITIES.parseXmlFile(url.openStream(),false);
  }
  createLetterDBFormMTH();
}
Program: 21508
Project: 21508
Buggy source:
/** 
 * @param methodsPath
 * @param methodName
 * @param methodDir
 */
public JAntiCaptcha(String methodsPath,String methodName){
  if (methodsPath == null) {
    methodsPath=UTILITIES.getFullPath(new String[]{JDUtilities.getJDHomeDirectory().getAbsolutePath(),"String_Node_Str","String_Node_Str","String_Node_Str"});
  }
  this.methodDir=methodName;
  try {
    this.pathMethod=new File(methodsPath + UTILITIES.FS + methodName).toURI().toURL();
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  try {
    if (isMethodPathValid(this.pathMethod)) {
      getJACInfo();
      jas=new JACScript(this,UTILITIES.getResourceURL(pathMethod + "String_Node_Str"),methodDir);
      loadMTHFile();
      logger.fine("String_Node_Str" + letterDB.size());
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * @param methodsPath
 * @param methodName
 * @param methodDir
 */
public JAntiCaptcha(String methodsPath,String methodName){
  if (methodsPath == null) {
    methodsPath=UTILITIES.getFullPath(new String[]{JDUtilities.getJDHomeDirectory().getAbsolutePath(),"String_Node_Str","String_Node_Str","String_Node_Str"});
  }
  this.methodDir=methodName;
  try {
    this.pathMethod=new File(methodsPath + UTILITIES.FS + methodName).toURI().toURL();
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  try {
    if (isMethodPathValid(this.pathMethod)) {
      getJACInfo();
      jas=new JACScript(this,UTILITIES.getResourceURL(UTILITIES.getFullPath(new String[]{pathMethod.toString(),"String_Node_Str"})),methodDir);
      loadMTHFile();
      logger.fine("String_Node_Str" + letterDB.size());
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 21509
Project: 21509
Buggy source:
private void getJACInfo() throws IOException {
  URL url=UTILITIES.getResourceURL(pathMethod + "String_Node_Str");
  if (url == null) {
    logger.severe("String_Node_Str" + pathMethod + "String_Node_Str");
    return;
  }
  Document doc=UTILITIES.parseXmlFile(url.openStream(),false);
  NodeList nl=doc.getFirstChild().getChildNodes();
  for (int i=0; i < nl.getLength(); i++) {
    Node childNode=nl.item(i);
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setMethodAuthor(UTILITIES.getAttribute(childNode,"String_Node_Str"));
      this.setMethodName(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setLetterNum(Integer.parseInt(UTILITIES.getAttribute(childNode,"String_Node_Str")));
      this.setImageType(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setSourceImage(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setResultFile(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
private void getJACInfo(){
  URL url=UTILITIES.getResourceURL(UTILITIES.getFullPath(new String[]{pathMethod.toString(),"String_Node_Str"}));
  if (url == null) {
    logger.severe("String_Node_Str" + pathMethod + "String_Node_Str");
    return;
  }
  Document doc;
  try {
    doc=UTILITIES.parseXmlFile(url.openStream(),false);
  }
 catch (  IOException e) {
    logger.severe("String_Node_Str" + pathMethod + "String_Node_Str");
    return;
  }
  NodeList nl=doc.getFirstChild().getChildNodes();
  for (int i=0; i < nl.getLength(); i++) {
    Node childNode=nl.item(i);
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setMethodAuthor(UTILITIES.getAttribute(childNode,"String_Node_Str"));
      this.setMethodName(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setLetterNum(Integer.parseInt(UTILITIES.getAttribute(childNode,"String_Node_Str")));
      this.setImageType(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setSourceImage(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
    if (childNode.getNodeName().equals("String_Node_Str")) {
      this.setResultFile(UTILITIES.getAttribute(childNode,"String_Node_Str"));
    }
  }
}
Program: 21511
Project: 21511
Buggy source:
public LogStreamHandler(OutputStream stream){
  super();
  setOutputStream(stream);
}

Fixed version (ground truth):
public LogStreamHandler(OutputStream stream){
  setOutputStream(stream);
}
Program: 21512
Project: 21512
Buggy source:
/** 
 * Hier wird die komplette Oberfläche der Applikation zusammengestrickt
 */
private void buildUI(){
  tabbedPane=new JTabbedPane();
  tabDownloadTable=new TabDownloadLinks(this);
  tabPluginActivity=new TabPluginActivity();
  statusBar=new StatusBar();
  tabbedPane.addTab(JDUtilities.getResourceString("String_Node_Str"),tabDownloadTable);
  tabbedPane.addTab(JDUtilities.getResourceString("String_Node_Str"),tabPluginActivity);
  btnStartStop=new JToggleButton(actionStartStopDownload);
  btnStartStop.setSelectedIcon(new ImageIcon(JDUtilities.getImage("String_Node_Str")));
  btnStartStop.setFocusPainted(false);
  btnStartStop.setBorderPainted(false);
  btnStartStop.setText(null);
  JButton btnAdd=new JButton(actionAdd);
  btnAdd.setFocusPainted(false);
  btnAdd.setBorderPainted(false);
  btnAdd.setText(null);
  JButton btnDelete=new JButton(actionDelete);
  btnDelete.setFocusPainted(false);
  btnDelete.setBorderPainted(false);
  btnDelete.setText(null);
  toolBar.setFloatable(false);
  toolBar.add(btnStartStop);
  toolBar.add(btnAdd);
  toolBar.add(btnDelete);
  frame.setLayout(new GridBagLayout());
  JDUtilities.addToGridBag(frame,toolBar,0,0,1,1,0,0,null,GridBagConstraints.HORIZONTAL,GridBagConstraints.NORTH);
  JDUtilities.addToGridBag(frame,tabbedPane,0,1,1,1,1,1,null,GridBagConstraints.BOTH,GridBagConstraints.CENTER);
  JDUtilities.addToGridBag(frame,statusBar,0,2,1,1,0,0,null,GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST);
}

Fixed version (ground truth):
/** 
 * Hier wird die komplette Oberfläche der Applikation zusammengestrickt
 */
private void buildUI(){
  tabbedPane=new JTabbedPane();
  tabDownloadTable=new TabDownloadLinks(this);
  tabPluginActivity=new TabPluginActivity();
  statusBar=new StatusBar();
  tabbedPane.addTab(JDUtilities.getResourceString("String_Node_Str"),tabDownloadTable);
  tabbedPane.addTab(JDUtilities.getResourceString("String_Node_Str"),tabPluginActivity);
  btnStartStop=new JToggleButton(actionStartStopDownload);
  btnStartStop.setSelectedIcon(new ImageIcon(JDUtilities.getImage("String_Node_Str")));
  btnStartStop.setFocusPainted(false);
  btnStartStop.setBorderPainted(false);
  btnStartStop.setText(null);
  JButton btnAdd=new JButton(actionAdd);
  btnAdd.setFocusPainted(false);
  btnAdd.setBorderPainted(false);
  btnAdd.setText(null);
  JButton btnDelete=new JButton(actionDelete);
  btnDelete.setFocusPainted(false);
  btnDelete.setBorderPainted(false);
  btnDelete.setText(null);
  toolBar.setFloatable(false);
  toolBar.add(btnStartStop);
  toolBar.add(btnAdd);
  toolBar.add(btnDelete);
  frame.setLayout(new GridBagLayout());
  JDUtilities.addToGridBag(frame,toolBar,0,0,1,1,0,0,null,GridBagConstraints.HORIZONTAL,GridBagConstraints.NORTH);
  JDUtilities.addToGridBag(frame,tabbedPane,0,1,1,1,1,1,null,GridBagConstraints.BOTH,GridBagConstraints.CENTER);
  JDUtilities.addToGridBag(frame,statusBar,0,2,1,1,0,0,null,GridBagConstraints.HORIZONTAL,GridBagConstraints.WEST);
  logDialog=new LogDialog(getFrame(),logger);
  logDialog.setVisible(true);
  logDialog.addWindowListener(new LogDialogWindowAdapter());
  logger.warning("String_Node_Str");
}
Program: 21513
Project: 21513
Buggy source:
@Override public DownloadLink getNextDownloadLink(){
  if (tabDownloadTable != null)   tabDownloadTable.getNextDownloadLink();
  return null;
}

Fixed version (ground truth):
@Override public DownloadLink getNextDownloadLink(){
  if (tabDownloadTable != null)   return tabDownloadTable.getNextDownloadLink();
  return null;
}