nus-yam/ex-repair huggingface dataset:
Program: 21414
Project: 21414
Buggy source:
@Override public Pattern getSupportedLinks(){
  String strSupported=this.getProperties().getStringProperty("String_Node_Str","String_Node_Str");
  String[] Supp=strSupported.split(System.getProperty("String_Node_Str"));
  String[] Supported=new String[Supp.length + SUPPORTEDHOSTS.length];
  for (int i=0; i < Supp.length; i++) {
    Supported[i]=Supp[i];
  }
  for (int i=0; i < SUPPORTEDHOSTS.length; i++) {
    Supported[Supp.length + i]=SUPPORTEDHOSTS[i];
  }
  String patternStr="String_Node_Str";
  if (Supported.length > 0) {
    Supported[0]=Supported[0].replaceFirst("String_Node_Str","String_Node_Str").trim();
    if (Supported[0].matches("String_Node_Str"))     Supported[0]=Supported[0].replaceFirst("String_Node_Str","String_Node_Str");
    patternStr+=Supported[0];
    for (int i=1; i < Supported.length; i++) {
      Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str").trim();
      if (Supported[i].matches("String_Node_Str"))       Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str");
      patternStr+="String_Node_Str" + Supported[i];
    }
  }
  patternStr+="String_Node_Str";
  return Pattern.compile(patternStr,Pattern.CASE_INSENSITIVE);
}

Fixed version (ground truth):
@Override public Pattern getSupportedLinks(){
  String strSupported=this.getProperties().getStringProperty("String_Node_Str","String_Node_Str");
  String[] Supp=strSupported.split(System.getProperty("String_Node_Str"));
  String[] Supported=new String[Supp.length + SUPPORTEDHOSTS.length];
  for (int i=0; i < Supp.length; i++) {
    Supported[i]=Supp[i];
  }
  for (int i=0; i < SUPPORTEDHOSTS.length; i++) {
    Supported[Supp.length + i]=SUPPORTEDHOSTS[i];
  }
  String patternStr="String_Node_Str";
  boolean b=false;
  for (int i=1; i < Supported.length; i++) {
    Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str").trim();
    if (Supported[i].matches("String_Node_Str"))     Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str");
    if (b && !Supported[i].trim().isEmpty())     patternStr+="String_Node_Str" + Supported[i];
 else     if (!b && !Supported[i].trim().isEmpty()) {
      b=true;
      patternStr+=Supported[0];
    }
  }
  patternStr+="String_Node_Str";
  logger.info(patternStr);
  return Pattern.compile(patternStr,Pattern.CASE_INSENSITIVE);
}
Program: 21416
Project: 21416
Buggy source:
/** 
 * Hier werden ControlEvent ausgewertet
 * @param event
 */
public void controlEvent(ControlEvent event){
  Vector<DownloadLink> links;
switch (event.getID()) {
case ControlEvent.CONTROL_SINGLE_DOWNLOAD_FINISHED:
    if (removeDownloadLinkFromActiveList((DownloadLink)event.getParameter())) {
      logger.info("String_Node_Str" + this.activeLinks.size());
    }
  links=getDownloadLinks();
for (int i=0; i < links.size(); i++) {
  if (links.get(i).waitsForReconnect()) {
    Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this);
    break;
  }
}
break;
case ControlEvent.CONTROL_CAPTCHA_LOADED:
break;
case ControlEvent.CONTROL_ALL_DOWNLOADS_FINISHED:
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED:
break;
case ControlEvent.CONTROL_PLUGIN_INTERACTION_INACTIVE:
case ControlEvent.CONTROL_PLUGIN_INTERACTION_RETURNED:
default :
break;
}
}

Fixed version (ground truth):
/** 
 * Hier werden ControlEvent ausgewertet
 * @param event
 */
public void controlEvent(ControlEvent event){
  Vector<DownloadLink> links;
switch (event.getID()) {
case ControlEvent.CONTROL_SINGLE_DOWNLOAD_FINISHED:
    if (removeDownloadLinkFromActiveList((DownloadLink)event.getParameter())) {
      logger.info("String_Node_Str" + this.activeLinks.size());
    }
  links=getDownloadLinks();
for (int i=0; i < links.size(); i++) {
  if (links.get(i).waitsForReconnect()) {
    Interaction.handleInteraction(Interaction.INTERACTION_BEFORE_RECONNECT,this);
    Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this);
    Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
    break;
  }
}
break;
case ControlEvent.CONTROL_CAPTCHA_LOADED:
break;
case ControlEvent.CONTROL_ALL_DOWNLOADS_FINISHED:
break;
case ControlEvent.CONTROL_DISTRIBUTE_FINISHED:
break;
case ControlEvent.CONTROL_PLUGIN_INTERACTION_INACTIVE:
case ControlEvent.CONTROL_PLUGIN_INTERACTION_RETURNED:
default :
break;
}
}
Program: 21418
Project: 21418
Buggy source:
/** 
 * Diese Funktion wird aufgerufen wenn Ein Download mit einem Waittimefehler abgebrochen wird
 * @param downloadLink
 * @param plugin
 * @param step
 */
private void onErrorWaittime(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  logger.severe("String_Node_Str" + step);
  long milliSeconds=(Long)step.getParameter();
  downloadLink.setEndOfWaittime(System.currentTimeMillis() + milliSeconds);
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,downloadLink));
  boolean a=Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this);
  boolean b=Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOAD_WAITTIME),this);
  if (a || b) {
    downloadLink.setStatus(DownloadLink.STATUS_TODO);
    downloadLink.setEndOfWaittime(0);
  }
  downloadLink.setStatusText("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Diese Funktion wird aufgerufen wenn Ein Download mit einem Waittimefehler abgebrochen wird
 * @param downloadLink
 * @param plugin
 * @param step
 */
private void onErrorWaittime(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  logger.severe("String_Node_Str" + step);
  long milliSeconds=(Long)step.getParameter();
  downloadLink.setEndOfWaittime(System.currentTimeMillis() + milliSeconds);
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,downloadLink));
  Interaction.handleInteraction(Interaction.INTERACTION_BEFORE_RECONNECT,this);
  boolean a=Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this);
  Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
  boolean b=Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOAD_WAITTIME),this);
  if (a || b) {
    downloadLink.setStatus(DownloadLink.STATUS_TODO);
    downloadLink.setEndOfWaittime(0);
  }
  downloadLink.setStatusText("String_Node_Str");
}
Program: 21419
Project: 21419
Buggy source:
/** 
 * Diese Funktion wird aufgerufen sobald ein Download wegen einer Botdetection abgebrochen wird
 * @param downloadLink
 * @param plugin2
 * @param step
 */
private void onErrorBotdetection(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  logger.severe("String_Node_Str");
  downloadLink.setInProgress(false);
  downloadLink.setStatusText("String_Node_Str");
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,downloadLink));
  if (Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this) || Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOAD_WAITTIME),this)) {
    downloadLink.setStatus(DownloadLink.STATUS_TODO);
    downloadLink.setEndOfWaittime(0);
  }
  logger.severe("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Diese Funktion wird aufgerufen sobald ein Download wegen einer Botdetection abgebrochen wird
 * @param downloadLink
 * @param plugin2
 * @param step
 */
private void onErrorBotdetection(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  logger.severe("String_Node_Str");
  downloadLink.setInProgress(false);
  downloadLink.setStatusText("String_Node_Str");
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,downloadLink));
  Interaction.handleInteraction(Interaction.INTERACTION_BEFORE_RECONNECT,this);
  if (Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this) || Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOAD_WAITTIME),this)) {
    downloadLink.setStatus(DownloadLink.STATUS_TODO);
    downloadLink.setEndOfWaittime(0);
  }
  Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
  logger.severe("String_Node_Str");
}
Program: 21420
Project: 21420
Buggy source:
/** 
 * Wird aufgerufen wenn Das Plugin eine Immer gleiche Wartezeit meldet. z.B. bei unbekannter Wartezeit
 * @param downloadLink
 * @param plugin
 * @param step
 */
private void onErrorStaticWaittime(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  logger.severe("String_Node_Str" + step);
  long milliSeconds;
  if (step.getParameter() != null) {
    milliSeconds=(Long)step.getParameter();
  }
 else {
    milliSeconds=10000;
  }
  downloadLink.setEndOfWaittime(System.currentTimeMillis() + milliSeconds);
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,downloadLink));
  if (Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this) || Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOAD_WAITTIME),this)) {
    downloadLink.setStatus(DownloadLink.STATUS_TODO);
    downloadLink.setEndOfWaittime(0);
  }
  downloadLink.setStatusText("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Wird aufgerufen wenn Das Plugin eine Immer gleiche Wartezeit meldet. z.B. bei unbekannter Wartezeit
 * @param downloadLink
 * @param plugin
 * @param step
 */
private void onErrorStaticWaittime(DownloadLink downloadLink,PluginForHost plugin,PluginStep step){
  logger.severe("String_Node_Str" + step);
  long milliSeconds;
  if (step.getParameter() != null) {
    milliSeconds=(Long)step.getParameter();
  }
 else {
    milliSeconds=10000;
  }
  downloadLink.setEndOfWaittime(System.currentTimeMillis() + milliSeconds);
  downloadLink.setStatusText("String_Node_Str");
  downloadLink.setInProgress(false);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_SINGLE_DOWNLOAD_CHANGED,downloadLink));
  Interaction.handleInteraction((Interaction.INTERACTION_BEFORE_RECONNECT),this);
  if (Interaction.handleInteraction((Interaction.INTERACTION_NEED_RECONNECT),this) || Interaction.handleInteraction((Interaction.INTERACTION_DOWNLOAD_WAITTIME),this)) {
    downloadLink.setStatus(DownloadLink.STATUS_TODO);
    downloadLink.setEndOfWaittime(0);
  }
  Interaction.handleInteraction(Interaction.INTERACTION_AFTER_RECONNECT,this);
  downloadLink.setStatusText("String_Node_Str");
}
Program: 21422
Project: 21422
Buggy source:
@Override public Pattern getSupportedLinks(){
  String strSupported=this.getProperties().getStringProperty("String_Node_Str","String_Node_Str");
  String[] Supp=strSupported.split(System.getProperty("String_Node_Str"));
  String[] Supported=new String[Supp.length + SUPPORTEDHOSTS.length];
  for (int i=0; i < Supp.length; i++) {
    Supported[i]=Supp[i];
  }
  for (int i=0; i < SUPPORTEDHOSTS.length; i++) {
    Supported[Supp.length + i]=SUPPORTEDHOSTS[i];
  }
  String patternStr="String_Node_Str";
  boolean b=false;
  for (int i=0; i < Supported.length; i++) {
    Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str").trim();
    if (Supported[i].matches("String_Node_Str"))     Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str");
    if (b && !Supported[i].trim().isEmpty())     patternStr+="String_Node_Str" + Supported[i];
 else     if (!b && !Supported[i].trim().isEmpty()) {
      b=true;
      patternStr+=Supported[0];
    }
  }
  patternStr+="String_Node_Str";
  logger.info(patternStr);
  return Pattern.compile(patternStr,Pattern.CASE_INSENSITIVE);
}

Fixed version (ground truth):
@Override public Pattern getSupportedLinks(){
  String strSupported=this.getProperties().getStringProperty("String_Node_Str","String_Node_Str").trim();
  String[] Supported;
  if (!strSupported.isEmpty()) {
    String[] Supp=strSupported.split(System.getProperty("String_Node_Str"));
    Supported=new String[Supp.length + SUPPORTEDHOSTS.length];
    for (int i=0; i < Supp.length; i++) {
      Supported[i]=Supp[i];
    }
    for (int i=0; i < SUPPORTEDHOSTS.length; i++) {
      Supported[Supp.length + i]=SUPPORTEDHOSTS[i];
    }
  }
 else   Supported=SUPPORTEDHOSTS;
  if (Supported == null || Supported.length < 1)   return null;
  String patternStr="String_Node_Str";
  boolean b=false;
  for (int i=0; i < Supported.length; i++) {
    Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str").trim();
    if (Supported[i].matches("String_Node_Str"))     Supported[i]=Supported[i].replaceFirst("String_Node_Str","String_Node_Str");
    if (b && !Supported[i].trim().isEmpty())     patternStr+="String_Node_Str" + Supported[i];
 else     if (!b && !Supported[i].trim().isEmpty()) {
      b=true;
      patternStr+=Supported[0];
    }
  }
  patternStr+="String_Node_Str";
  logger.info(patternStr);
  return Pattern.compile(patternStr,Pattern.CASE_INSENSITIVE);
}
Program: 21424
Project: 21424
Buggy source:
private void go(){
  String methodsPath=UTILITIES.getFullPath(new String[]{JDUtilities.getJDHomeDirectory().getAbsolutePath(),"String_Node_Str","String_Node_Str","String_Node_Str"});
  String hoster="String_Node_Str";
  JAntiCaptcha jac=new JAntiCaptcha(methodsPath,hoster);
  jac.setShowDebugGui(true);
  UTILITIES.getLogger().info("String_Node_Str" + JAntiCaptcha.hasMethod(methodsPath,hoster));
  LetterComperator.CREATEINTERSECTIONLETTER=true;
  jac.displayLibrary();
  jac.getJas().set("String_Node_Str",100);
  jac.showPreparedCaptcha(new File(JDUtilities.getJDHomeDirectory().getAbsolutePath() + "String_Node_Str" + "String_Node_Str"+ hoster+ "String_Node_Str"+ "String_Node_Str"));
}

Fixed version (ground truth):
private void go(){
  String methodsPath=UTILITIES.getFullPath(new String[]{JDUtilities.getJDHomeDirectory().getAbsolutePath(),"String_Node_Str","String_Node_Str","String_Node_Str"});
  String hoster="String_Node_Str";
  JAntiCaptcha jac=new JAntiCaptcha(methodsPath,hoster);
  jac.setShowDebugGui(true);
  UTILITIES.getLogger().info("String_Node_Str" + JAntiCaptcha.hasMethod(methodsPath,hoster));
  jac.displayLibrary();
  jac.getJas().set("String_Node_Str",50);
  jac.showPreparedCaptcha(new File(JDUtilities.getJDHomeDirectory().getAbsolutePath() + "String_Node_Str" + "String_Node_Str"+ hoster+ "String_Node_Str"+ "String_Node_Str"));
}
Program: 21426
Project: 21426
Buggy source:
@Override public void initConfig(){
  ConfigEntry cfg;
  String[] keys=new String[Replacer.KEYS.length];
  for (int i=0; i < Replacer.KEYS.length; i++) {
    keys[i]="String_Node_Str" + Replacer.KEYS[i][0] + "String_Node_Str"+ "String_Node_Str"+ Replacer.KEYS[i][1]+ "String_Node_Str";
  }
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,this,"String_Node_Str",keys,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,this,PROPERTY_DISABLED,"String_Node_Str").setDefaultValue(false));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD,this,PROPERTY_COMMAND,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD,this,PROPERTY_PARAMETER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,this,PROPERTY_EXECUTE_FOLDER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PROPERTY_WAIT_FOR_RETURN,"String_Node_Str",0,600).setDefaultValue(0));
}

Fixed version (ground truth):
@Override public void initConfig(){
  ConfigEntry cfg;
  String[] keys=new String[Replacer.KEYS.length];
  for (int i=0; i < Replacer.KEYS.length; i++) {
    keys[i]="String_Node_Str" + Replacer.KEYS[i][0] + "String_Node_Str"+ "String_Node_Str"+ Replacer.KEYS[i][1]+ "String_Node_Str";
  }
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,this,"String_Node_Str",keys,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,this,PROPERTY_DISABLED,"String_Node_Str").setDefaultValue(false));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD,this,PROPERTY_COMMAND,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTAREA,this,PROPERTY_PARAMETER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,this,PROPERTY_EXECUTE_FOLDER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PROPERTY_WAIT_FOR_RETURN,"String_Node_Str",0,600).setDefaultValue(0));
}
Program: 21427
Project: 21427
Buggy source:
@Override public boolean doInteraction(Object arg){
  if (getBooleanProperty(PROPERTY_DISABLED,false)) {
    logger.info("String_Node_Str");
    return false;
  }
  int waitForReturn=getIntegerProperty(PROPERTY_WAIT_FOR_RETURN,0);
  String executeIn=Replacer.insertVariables(getStringProperty(PROPERTY_EXECUTE_FOLDER));
  String command=Replacer.insertVariables(getStringProperty(PROPERTY_COMMAND));
  String parameter=Replacer.insertVariables(getStringProperty(PROPERTY_PARAMETER));
  logger.finer("String_Node_Str" + JDUtilities.runCommand(command,parameter,executeIn,waitForReturn));
  return true;
}

Fixed version (ground truth):
@Override public boolean doInteraction(Object arg){
  if (getBooleanProperty(PROPERTY_DISABLED,false)) {
    logger.info("String_Node_Str");
    return false;
  }
  int waitForReturn=getIntegerProperty(PROPERTY_WAIT_FOR_RETURN,0);
  String executeIn=Replacer.insertVariables(getStringProperty(PROPERTY_EXECUTE_FOLDER));
  String command=Replacer.insertVariables(getStringProperty(PROPERTY_COMMAND));
  String parameter=Replacer.insertVariables(getStringProperty(PROPERTY_PARAMETER));
  logger.finer("String_Node_Str" + JDUtilities.runCommand(command,JDUtilities.splitByNewline(parameter),executeIn,waitForReturn));
  return true;
}
Program: 21428
Project: 21428
Buggy source:
@Override public void initConfig(){
  ConfigEntry cfg;
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,this,PROPERTY_EXTERN_RECONNECT_DISABLED,"String_Node_Str").setDefaultValue(false));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD,this,PROPERTY_RECONNECT_COMMAND,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD,this,PROPERTY_RECONNECT_PARAMETER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,this,PROPERTY_RECONNECT_EXECUTE_FOLDER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PARAM_IPCHECKWAITTIME,"String_Node_Str",0,600).setDefaultValue(0));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PARAM_RETRIES,"String_Node_Str",-1,20).setDefaultValue(0));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PARAM_WAITFORIPCHANGE,"String_Node_Str",0,600).setDefaultValue(10));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PROPERTY_IP_WAIT_FOR_RETURN,"String_Node_Str",0,600).setDefaultValue(0));
}

Fixed version (ground truth):
@Override public void initConfig(){
  ConfigEntry cfg;
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,this,PROPERTY_EXTERN_RECONNECT_DISABLED,"String_Node_Str").setDefaultValue(false));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD,this,PROPERTY_RECONNECT_COMMAND,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_TEXTAREA,this,PROPERTY_RECONNECT_PARAMETER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,this,PROPERTY_RECONNECT_EXECUTE_FOLDER,"String_Node_Str"));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PARAM_IPCHECKWAITTIME,"String_Node_Str",0,600).setDefaultValue(0));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PARAM_RETRIES,"String_Node_Str",-1,20).setDefaultValue(0));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PARAM_WAITFORIPCHANGE,"String_Node_Str",0,600).setDefaultValue(10));
  config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,this,PROPERTY_IP_WAIT_FOR_RETURN,"String_Node_Str",0,600).setDefaultValue(0));
}
Program: 21431
Project: 21431
Buggy source:
@Override public void run(){
}

Fixed version (ground truth):
@Override public void run(){
  JDController controller=JDUtilities.getController();
  DownloadLink dLink=controller.getLastFinishedDownloadLink();
  String password=null;
  if (dLink != null)   password=dLink.getFilePackage().getPassword();
  jdUnrar unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
  if (password != null && !password.isEmpty()) {
    if (!password.matches("String_Node_Str"))     unrar.standardPassword=password;
    unrar.addToPasswordlist(password);
  }
  unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
  unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
  unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
  unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
  unrar.unrar();
  unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
  unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
  unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
  unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
  unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
  unrar.unrar();
}
Program: 21432
Project: 21432
Buggy source:
@Override public boolean doInteraction(Object arg){
  new Thread(new Runnable(){
    public void run(){
      JDController controller=JDUtilities.getController();
      DownloadLink dLink=controller.getLastFinishedDownloadLink();
      String password=null;
      if (dLink != null)       password=dLink.getFilePackage().getPassword();
      jdUnrar unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      if (password != null && !password.isEmpty()) {
        if (!password.matches("String_Node_Str"))         unrar.standardPassword=password;
        unrar.addToPasswordlist(password);
      }
      unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
      unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
      unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
      unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
      unrar.unrar();
      unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
      unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
      unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
      unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
      unrar.unrar();
    }
  }
).start();
  return true;
}

Fixed version (ground truth):
@Override public boolean doInteraction(Object arg){
  start();
  return true;
}
Program: 21436
Project: 21436
Buggy source:
@Override public boolean getFileInformation(DownloadLink downloadLink){
  try {
    requestInfo=getRequest(new URL(downloadLink.getUrlDownloadDecrypted()),null,null,true);
    if (requestInfo.getHtmlCode().indexOf("String_Node_Str") >= 0) {
      return false;
    }
 else {
      String fileName=JDUtilities.htmlDecode(getSimpleMatch(requestInfo.getHtmlCode(),DOWNLOAD_INFO,0));
      String fileSize=getSimpleMatch(requestInfo.getHtmlCode(),DOWNLOAD_INFO,3);
      downloadLink.setName(fileName);
      if (fileSize != null) {
        try {
          int length=(int)(Double.parseDouble(fileSize.trim()) * 1024 * 1024);
          downloadLink.setDownloadMax(length);
        }
 catch (        Exception e) {
        }
      }
    }
  }
 catch (  MalformedURLException e) {
    return false;
  }
catch (  IOException e) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean getFileInformation(DownloadLink downloadLink){
  try {
    requestInfo=getRequest(new URL(downloadLink.getUrlDownloadDecrypted()),null,null,true);
    if (requestInfo.getHtmlCode().indexOf("String_Node_Str") >= 0) {
      return false;
    }
 else {
      String fileName=JDUtilities.htmlDecode(getSimpleMatch(requestInfo.getHtmlCode().replaceAll("String_Node_Str","String_Node_Str"),DOWNLOAD_INFO,0));
      String fileSize=getSimpleMatch(requestInfo.getHtmlCode(),DOWNLOAD_INFO,3);
      downloadLink.setName(fileName);
      if (fileSize != null) {
        try {
          int length=(int)(Double.parseDouble(fileSize.trim()) * 1024 * 1024);
          downloadLink.setDownloadMax(length);
        }
 catch (        Exception e) {
        }
      }
    }
  }
 catch (  MalformedURLException e) {
    return false;
  }
catch (  IOException e) {
    return false;
  }
  return true;
}
Program: 21437
Project: 21437
Buggy source:
/** 
 * Versucht den Programmpfad von unrar bzw unrar.exe zu finden
 * @return
 */
public static String autoGetUnrarCommand(){
  String programm=null;
  String OS=System.getProperty("String_Node_Str").toLowerCase();
  if ((OS.indexOf("String_Node_Str") > -1) || (OS.indexOf("String_Node_Str") > -1)) {
    try {
      File unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
      if (unrarexe.isFile())       programm=unrarexe.getAbsolutePath();
 else {
        File winrarexe=new File(new File(System.getenv("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
        if (unrarexe.isFile()) {
          logger.info("String_Node_Str" + winrarexe.getAbsolutePath());
          logger.info("String_Node_Str" + unrarexe.getAbsolutePath());
          copy(winrarexe,unrarexe);
          programm=unrarexe.getAbsolutePath();
        }
      }
    }
 catch (    Throwable e) {
    }
  }
 else {
    try {
      String[] charset=System.getenv("String_Node_Str").split("String_Node_Str");
      String Programmname="String_Node_Str";
      for (int i=0; i < charset.length; i++) {
        File fi=new File(charset[i],Programmname);
        if (fi.isFile()) {
          programm=fi.getAbsolutePath();
          break;
        }
      }
    }
 catch (    Throwable e) {
    }
  }
  return programm;
}

Fixed version (ground truth):
/** 
 * Versucht den Programmpfad von unrar bzw unrar.exe zu finden
 * @return
 */
public static String autoGetUnrarCommand(){
  String programm=null;
  String OS=System.getProperty("String_Node_Str").toLowerCase();
  if ((OS.indexOf("String_Node_Str") > -1) || (OS.indexOf("String_Node_Str") > -1)) {
    try {
      File unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
      if (unrarexe.isFile())       programm=unrarexe.getAbsolutePath();
 else {
        File winrarexe=new File(new File(System.getenv("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
        if (winrarexe.isFile()) {
          logger.info("String_Node_Str" + winrarexe.getAbsolutePath());
          logger.info("String_Node_Str" + unrarexe.getAbsolutePath());
          copy(winrarexe,unrarexe);
          programm=unrarexe.getAbsolutePath();
        }
      }
    }
 catch (    Throwable e) {
    }
  }
 else {
    try {
      String[] charset=System.getenv("String_Node_Str").split("String_Node_Str");
      String Programmname="String_Node_Str";
      for (int i=0; i < charset.length; i++) {
        File fi=new File(charset[i],Programmname);
        if (fi.isFile()) {
          programm=fi.getAbsolutePath();
          break;
        }
      }
    }
 catch (    Throwable e) {
    }
  }
  return programm;
}
Program: 21438
Project: 21438
Buggy source:
@Override public boolean doInteraction(Object arg){
  new Thread(new Runnable(){
    public void run(){
      JDController controller=JDUtilities.getController();
      DownloadLink dLink=controller.getLastFinishedDownloadLink();
      String password=null;
      if (dLink != null)       password=dLink.getFilePackage().getPassword();
      jdUnrar unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      if (!password.isEmpty()) {
        if (!password.matches("String_Node_Str"))         unrar.standardPassword=password;
        unrar.addToPasswordlist(password);
      }
      unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
      unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
      unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
      unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
      unrar.unrar();
      unrar.unrar();
    }
  }
).start();
  return true;
}

Fixed version (ground truth):
@Override public boolean doInteraction(Object arg){
  new Thread(new Runnable(){
    public void run(){
      JDController controller=JDUtilities.getController();
      DownloadLink dLink=controller.getLastFinishedDownloadLink();
      String password=null;
      if (dLink != null)       password=dLink.getFilePackage().getPassword();
      jdUnrar unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      if (password != null && !password.isEmpty()) {
        if (!password.matches("String_Node_Str"))         unrar.standardPassword=password;
        unrar.addToPasswordlist(password);
      }
      unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
      unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
      unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
      unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
      unrar.unrar();
      unrar=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      unrar.overwriteFiles=getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
      unrar.autoDelete=getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
      unrar.unrar=getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
      unrar.maxFilesize=getIntegerProperty(Unrar.PROPERTY_MAX_FILESIZE,2);
      unrar.unrar();
    }
  }
).start();
  return true;
}
Program: 21439
Project: 21439
Buggy source:
/** 
 * Versucht den Programmpfad von unrar bzw unrar.exe zu finden
 * @return
 */
public static String autoGetUnrarCommand(){
  String programm=null;
  String OS=System.getProperty("String_Node_Str").toLowerCase();
  if ((OS.indexOf("String_Node_Str") > -1) || (OS.indexOf("String_Node_Str") > -1)) {
    try {
      File unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
      if (unrarexe.isFile())       programm=unrarexe.getAbsolutePath();
 else {
        unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
        if (unrarexe.isFile())         programm=unrarexe.getAbsolutePath();
      }
    }
 catch (    Throwable e) {
    }
  }
 else {
    try {
      String[] charset=System.getenv("String_Node_Str").split("String_Node_Str");
      String Programmname="String_Node_Str";
      for (int i=0; i < charset.length; i++) {
        File fi=new File(charset[i],Programmname);
        if (fi.isFile()) {
          programm=fi.getAbsolutePath();
          break;
        }
      }
    }
 catch (    Throwable e) {
    }
  }
  return programm;
}

Fixed version (ground truth):
/** 
 * Versucht den Programmpfad von unrar bzw unrar.exe zu finden
 * @return
 */
public static String autoGetUnrarCommand(){
  String programm=null;
  String OS=System.getProperty("String_Node_Str").toLowerCase();
  if ((OS.indexOf("String_Node_Str") > -1) || (OS.indexOf("String_Node_Str") > -1)) {
    try {
      File unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
      if (unrarexe.isFile())       programm=unrarexe.getAbsolutePath();
 else {
        File winrarexe=new File(new File(System.getenv("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
        if (unrarexe.isFile()) {
          logger.info("String_Node_Str" + winrarexe.getAbsolutePath());
          logger.info("String_Node_Str" + unrarexe.getAbsolutePath());
          copy(winrarexe,unrarexe);
          programm=unrarexe.getAbsolutePath();
        }
      }
    }
 catch (    Throwable e) {
    }
  }
 else {
    try {
      String[] charset=System.getenv("String_Node_Str").split("String_Node_Str");
      String Programmname="String_Node_Str";
      for (int i=0; i < charset.length; i++) {
        File fi=new File(charset[i],Programmname);
        if (fi.isFile()) {
          programm=fi.getAbsolutePath();
          break;
        }
      }
    }
 catch (    Throwable e) {
    }
  }
  return programm;
}
Program: 21440
Project: 21440
Buggy source:
@Override public void initPanel(){
  GUIConfigEntry ce;
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_BROWSEFILE,unrar,Unrar.PROPERTY_UNRARCOMMAND,"String_Node_Str").setDefaultValue(new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY)).getUnrarCommand()));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,unrar,Unrar.PROPERTY_AUTODELETE,"String_Node_Str").setDefaultValue(true));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,unrar,Unrar.PROPERTY_OVERWRITE_FILES,"String_Node_Str").setDefaultValue(false));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER,unrar,Unrar.PROPERTY_MAX_FILESIZE,"String_Node_Str",0,500).setDefaultValue(2));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_BUTTON,this,"String_Node_Str"));
  addGUIConfigEntry(ce);
  add(panel,BorderLayout.CENTER);
}

Fixed version (ground truth):
@Override public void initPanel(){
  GUIConfigEntry ce;
  String unrarcmd=JDUtilities.getConfiguration().getStringProperty("String_Node_Str");
  if (unrarcmd == null) {
    unrarcmd=new jdUnrar(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY)).getUnrarCommand();
    if (unrarcmd == null)     JDUtilities.getConfiguration().setProperty("String_Node_Str","String_Node_Str");
 else     JDUtilities.getConfiguration().setProperty("String_Node_Str",unrarcmd);
  }
 else   if (unrarcmd.matches("String_Node_Str"))   unrarcmd=null;
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_BROWSEFILE,unrar,Unrar.PROPERTY_UNRARCOMMAND,"String_Node_Str").setDefaultValue(unrarcmd));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,unrar,Unrar.PROPERTY_AUTODELETE,"String_Node_Str").setDefaultValue(true));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX,unrar,Unrar.PROPERTY_OVERWRITE_FILES,"String_Node_Str").setDefaultValue(false));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER,unrar,Unrar.PROPERTY_MAX_FILESIZE,"String_Node_Str",0,500).setDefaultValue(2));
  addGUIConfigEntry(ce);
  ce=new GUIConfigEntry(new ConfigEntry(ConfigContainer.TYPE_BUTTON,this,"String_Node_Str"));
  addGUIConfigEntry(ce);
  add(panel,BorderLayout.CENTER);
}
Program: 21441
Project: 21441
Buggy source:
/** 
 * Versucht den Programmpfad von unrar bzw unrar.exe zu finden
 * @return
 */
public static String autoGetUnrarCommand(){
  String programm=null;
  String OS=System.getProperty("String_Node_Str").toLowerCase();
  if ((OS.indexOf("String_Node_Str") > -1) || (OS.indexOf("String_Node_Str") > -1)) {
    try {
      File unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
      if (unrarexe.isFile())       programm=unrarexe.getAbsolutePath();
 else {
        File winrarexe=new File(new File(System.getenv("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
        if (winrarexe.isFile()) {
          logger.info("String_Node_Str" + winrarexe.getAbsolutePath());
          logger.info("String_Node_Str" + unrarexe.getAbsolutePath());
          copy(winrarexe,unrarexe);
          programm=unrarexe.getAbsolutePath();
        }
      }
    }
 catch (    Throwable e) {
    }
  }
 else {
    try {
      String[] charset=System.getenv("String_Node_Str").split("String_Node_Str");
      String Programmname="String_Node_Str";
      for (int i=0; i < charset.length; i++) {
        File fi=new File(charset[i],Programmname);
        if (fi.isFile()) {
          programm=fi.getAbsolutePath();
          break;
        }
      }
    }
 catch (    Throwable e) {
    }
  }
  return programm;
}

Fixed version (ground truth):
/** 
 * Versucht den Programmpfad von unrar bzw unrar.exe zu finden
 * @return
 */
public static String autoGetUnrarCommand(){
  String programm=null;
  String OS=System.getProperty("String_Node_Str").toLowerCase();
  if ((OS.indexOf("String_Node_Str") > -1) || (OS.indexOf("String_Node_Str") > -1)) {
    try {
      File unrarexe=new File(JDUtilities.getJDHomeDirectory(),"String_Node_Str");
      if (unrarexe.isFile())       programm=unrarexe.getAbsolutePath();
 else {
        File winrarexe=new File(new File(System.getenv("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
        if (winrarexe.isFile()) {
          logger.info("String_Node_Str" + winrarexe.getAbsolutePath());
          logger.info("String_Node_Str" + unrarexe.getAbsolutePath());
          JDUtilities.copyFile(winrarexe,unrarexe);
          programm=unrarexe.getAbsolutePath();
        }
      }
    }
 catch (    Throwable e) {
    }
  }
 else {
    try {
      String[] charset=System.getenv("String_Node_Str").split("String_Node_Str");
      String Programmname="String_Node_Str";
      for (int i=0; i < charset.length; i++) {
        File fi=new File(charset[i],Programmname);
        if (fi.isFile()) {
          programm=fi.getAbsolutePath();
          break;
        }
      }
    }
 catch (    Throwable e) {
    }
  }
  return programm;
}
Program: 21442
Project: 21442
Buggy source:
private static Vector<File> vFileList(File file){
  Vector<File> ret=new Vector<File>();
  File[] list=file.listFiles();
  for (int i=0; i < list.length; i++) {
    if (list[i].isDirectory())     ret.addAll(vFileList(list[i]));
 else     ret.add(list[i]);
  }
  return ret;
}

Fixed version (ground truth):
private static Vector<File> vFileList(File file){
  Vector<File> ret=new Vector<File>();
  if (file == null) {
    logger.severe("String_Node_Str");
    return ret;
  }
  if (!file.isDirectory()) {
    logger.severe(file.getAbsolutePath() + "String_Node_Str");
    return ret;
  }
  File[] list=file.listFiles();
  for (int i=0; i < list.length; i++) {
    if (list[i].isDirectory())     ret.addAll(vFileList(list[i]));
 else     ret.add(list[i]);
  }
  return ret;
}
Program: 21443
Project: 21443
Buggy source:
private void removeOfflineAndMirrorFiles(){
  new Thread(){
    public void run(){
      Vector<String> mirrorlist=new Vector<String>();
      for (int i=linkList.size() - 1; i >= 0 && isVisible() && linkList.size() > i; i--) {
        DownloadLink link=linkList.elementAt(i);
        if (!link.isAvailable()) {
          linkList.remove(i);
        }
 else         if (mirrorlist.contains(linkList.elementAt(i).getName().toLowerCase().replaceFirst("String_Node_Str","String_Node_Str"))) {
          linkList.remove(i);
        }
 else         mirrorlist.add(linkList.elementAt(i).getName().toLowerCase().replaceFirst("String_Node_Str","String_Node_Str"));
        fireTableChanged();
        try {
          Thread.sleep(20);
        }
 catch (        InterruptedException e) {
        }
      }
    }
  }
.start();
}

Fixed version (ground truth):
private void removeOfflineAndMirrorFiles(){
  new Thread(){
    public void run(){
      Vector<String> mirrorlist=new Vector<String>();
      Vector<DownloadLink> mirrorlinks=new Vector<DownloadLink>();
      for (int i=0; i < linkList.size(); i++) {
        if (linkList.elementAt(i).isAvailabilityChecked()) {
          if (linkList.elementAt(i).isAvailable()) {
            if (mirrorlist.contains(linkList.elementAt(i).getName().toLowerCase().replaceFirst("String_Node_Str","String_Node_Str")))             mirrorlinks.add(linkList.elementAt(i));
 else {
              mirrorlist.add(linkList.elementAt(i).getName().toLowerCase().replaceFirst("String_Node_Str","String_Node_Str"));
            }
          }
        }
      }
      for (int i=linkList.size() - 1; i >= 0 && isVisible() && linkList.size() > i; i--) {
        DownloadLink link=linkList.elementAt(i);
        if (!link.isAvailable() || mirrorlinks.contains(link)) {
          linkList.remove(i);
          fireTableChanged();
        }
        try {
          Thread.sleep(20);
        }
 catch (        InterruptedException e) {
        }
      }
    }
  }
.start();
}
Program: 21444
Project: 21444
Buggy source:
public oXygenWarez(){
  super();
  steps.add(new PluginStep(PluginStep.STEP_DECRYPT,null));
  currentStep=steps.firstElement();
}

Fixed version (ground truth):
public oXygenWarez(){
  super();
  steps.add(new PluginStep(PluginStep.STEP_DECRYPT,null));
  currentStep=steps.firstElement();
  this.setConfigElements();
}
Program: 21446
Project: 21446
Buggy source:
/** 
 * @param parent GUI
 * @param linkList neue links
 */
public LinkGrabber(SimpleGUI parent,final DownloadLink[] linkList){
  super();
  this.linkList=new Vector<DownloadLink>();
  this.parent=parent;
  setLayout(new BorderLayout());
  this.setTitle("String_Node_Str");
  initGrabber();
  pack();
  JFrame frame=parent.getFrame();
  this.setTitle("String_Node_Str");
  setLocation((int)(frame.getLocation().getX() + frame.getWidth() / 2 - this.getWidth() / 2),(int)(frame.getLocation().getY() + frame.getHeight() / 2 - this.getHeight() / 2));
  addLinks(linkList);
  pack();
}

Fixed version (ground truth):
/** 
 * @param parent GUI
 * @param linkList neue links
 */
public LinkGrabber(SimpleGUI parent,final DownloadLink[] linkList){
  super();
  this.linkList=new Vector<DownloadLink>();
  this.parent=parent;
  setLayout(new BorderLayout());
  this.setTitle("String_Node_Str");
  initGrabber();
  pack();
  JFrame frame=parent.getFrame();
  this.setTitle("String_Node_Str");
  this.setIconImage(JDUtilities.getImage("String_Node_Str"));
  setLocation((int)(frame.getLocation().getX() + frame.getWidth() / 2 - this.getWidth() / 2),(int)(frame.getLocation().getY() + frame.getHeight() / 2 - this.getHeight() / 2));
  addLinks(linkList);
  pack();
}
Program: 21447
Project: 21447
Buggy source:
/** 
 * Untersucht zwei String, ob zwei String ähnlich anfangen. Der übereinstimmende Text wird dann zurückgegeben 
 * @param a Erster String, der vergleicht werden soll
 * @param b Zweiter String, der vergleicht werden soll
 * @return Übereinstimmender Text
 */
public static String getEqualString(String a,String b){
  String first, second;
  int index=0;
  if (a.length() <= b.length()) {
    first=a.toLowerCase();
    second=b.toLowerCase();
  }
 else {
    first=b;
    second=a;
  }
  for (int i=0; i < first.length(); i++) {
    if (first.charAt(i) == second.charAt(i))     index=i;
  }
  if (index > 0)   return first.substring(0,index);
 else   return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Untersucht zwei String, ob zwei String ähnlich anfangen. Der übereinstimmende Text wird dann zurückgegeben 
 * @param a Erster String, der vergleicht werden soll
 * @param b Zweiter String, der vergleicht werden soll
 * @return Übereinstimmender Text
 */
public static String getEqualString(String a,String b){
  String first, second;
  int index=0;
  if (a.length() <= b.length()) {
    first=a.toLowerCase();
    second=b.toLowerCase();
  }
 else {
    first=b;
    second=a;
  }
  for (int i=0; i < first.length(); i++) {
    if (first.charAt(i) == second.charAt(i))     index=i;
 else     break;
  }
  if (index > 0)   return first.substring(0,index + 1);
 else   return "String_Node_Str";
}
Program: 21449
Project: 21449
Buggy source:
/** 
 * ruft die doInteraction Funktion auf. Und setzt das Ergebnis als callCode. Der Statuscode kann mit getCallCode abgerufen werden
 * @param arg
 * @return
 */
public boolean interact(Object arg){
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_PLUGIN_INTERACTION_ACTIVE,this));
  this.setCallCode(Interaction.INTERACTION_CALL_RUNNING);
  boolean success=doInteraction(arg);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_PLUGIN_INTERACTION_RETURNED,this));
  if (!this.isAlive()) {
    fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_PLUGIN_INTERACTION_INACTIVE,this));
  }
  return success;
}

Fixed version (ground truth):
/** 
 * ruft die doInteraction Funktion auf. Und setzt das Ergebnis als callCode. Der Statuscode kann mit getCallCode abgerufen werden
 * @param arg
 * @return
 */
public boolean interact(Object arg){
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_PLUGIN_INTERACTION_ACTIVE,this));
  resetInteraction();
  this.setCallCode(Interaction.INTERACTION_CALL_RUNNING);
  boolean success=doInteraction(arg);
  fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_PLUGIN_INTERACTION_RETURNED,this));
  if (!this.isAlive()) {
    fireControlEvent(new ControlEvent(this,ControlEvent.CONTROL_PLUGIN_INTERACTION_INACTIVE,this));
  }
  return success;
}
Program: 21453
Project: 21453
Buggy source:
/** 
 * Entfernt die aktuell selektierten Links
 */
public void removeSelectedLinks(){
  Vector<DownloadLink> linksToDelete=getSelectedObjects();
  allLinks.removeAll(linksToDelete);
  table.getSelectionModel().clearSelection();
  fireTableChanged();
}

Fixed version (ground truth):
/** 
 * Entfernt die aktuell selektierten Links
 */
public void removeSelectedLinks(){
  if (parent.showConfirmDialog("String_Node_Str")) {
    Vector<DownloadLink> linksToDelete=getSelectedObjects();
    allLinks.removeAll(linksToDelete);
    table.getSelectionModel().clearSelection();
    fireTableChanged();
  }
}
Program: 21454
Project: 21454
Buggy source:
private void importFromRoutersDat(){
  File fileRoutersDat;
  Vector<RouterData> routerData;
  fileRoutersDat=JDUtilities.getResourceFile("String_Node_Str");
  if (fileRoutersDat != null) {
    RouterParser parser=new RouterParser();
    routerData=parser.parseXMLFile(fileRoutersDat);
    Object selected=JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null,routerData.toArray(),null);
    if (selected != null) {
      this.routerData=(RouterData)selected;
      load();
    }
  }
}

Fixed version (ground truth):
private void importFromRoutersDat(){
  File fileRoutersDat;
  Vector<RouterData> routerData;
  fileRoutersDat=JDUtilities.getResourceFile("String_Node_Str");
  if (fileRoutersDat != null) {
    RouterParser parser=new RouterParser();
    routerData=parser.parseXMLFile(fileRoutersDat);
    Collections.sort(routerData,new Comparator<Object>(){
      public int compare(      Object a,      Object b){
        if (a instanceof RouterData && b instanceof RouterData) {
          if (((RouterData)a).getRouterName().compareToIgnoreCase(((RouterData)b).getRouterName()) > 0) {
            return 1;
          }
 else           if (((RouterData)a).getRouterName().compareToIgnoreCase(((RouterData)b).getRouterName()) < 0) {
            return -1;
          }
 else {
            return 0;
          }
        }
        return 0;
      }
    }
);
    Object selected=JOptionPane.showInputDialog(this,"String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null,routerData.toArray(),null);
    if (selected != null) {
      this.routerData=(RouterData)selected;
      load();
    }
  }
}
Program: 21456
Project: 21456
Buggy source:
private String getServerFromAbbreviation(String abb){
  Iterator<String> iter=serverMap.keySet().iterator();
  while (iter.hasNext()) {
    if (serverMap.get((String)iter.next()).equals(abb))     return (String)iter.next();
  }
  return null;
}

Fixed version (ground truth):
private String getServerFromAbbreviation(String abb){
  Iterator<String> iter=serverMap.keySet().iterator();
  Object next;
  while (iter.hasNext()) {
    next=iter.next();
    if (serverMap.get((String)next).equals(abb))     return (String)next;
  }
  return null;
}