nus-yam/ex-repair huggingface dataset:
Program: 21330
Project: 21330
Buggy source:
public void valueChanged(ListSelectionEvent e){
  if (plugins.get(((DefaultListSelectionModel)e.getSource()).getMinSelectionIndex()).getConfig().getEntries().size() != 0)   btnEdit.setEnabled(true);
 else   btnEdit.setEnabled(false);
}

Fixed version (ground truth):
public void valueChanged(ListSelectionEvent e){
  if ((((DefaultListSelectionModel)e.getSource()).getMinSelectionIndex() != -1) && (plugins.get(((DefaultListSelectionModel)e.getSource()).getMinSelectionIndex()).getConfig().getEntries().size() != 0))   btnEdit.setEnabled(true);
 else   btnEdit.setEnabled(false);
}
Program: 21331
Project: 21331
Buggy source:
public void fireTableChanged(){
  int rowIndex=table.getSelectedRow();
  table.tableChanged(new TableModelEvent(table.getModel()));
  table.getSelectionModel().addSelectionInterval(rowIndex,rowIndex);
}

Fixed version (ground truth):
public void fireTableChanged(){
  int rowIndex=table.getSelectedRow();
  table.tableChanged(new TableModelEvent(this.table.getModel()));
  table.getSelectionModel().addSelectionInterval(rowIndex,rowIndex);
}
Program: 21332
Project: 21332
Buggy source:
public String getColumnName(int column){
switch (column) {
case 0:
    return JDLocale.L("String_Node_Str","String_Node_Str");
case 1:
  return JDLocale.L("String_Node_Str","String_Node_Str");
case 2:
return JDLocale.L("String_Node_Str","String_Node_Str");
case 3:
return JDLocale.L("String_Node_Str","String_Node_Str");
case 4:
return JDLocale.L("String_Node_Str","String_Node_Str");
case 5:
return JDLocale.L("String_Node_Str","String_Node_Str");
}
return super.getColumnName(column);
}

Fixed version (ground truth):
public String getColumnName(int column){
switch (column) {
case 0:
    return JDLocale.L("String_Node_Str","String_Node_Str");
case 1:
  return JDLocale.L("String_Node_Str","String_Node_Str");
case 2:
return JDLocale.L("String_Node_Str","String_Node_Str");
case 3:
return JDLocale.L("String_Node_Str","String_Node_Str");
case 4:
return JDLocale.L("String_Node_Str","String_Node_Str");
}
return super.getColumnName(column);
}
Program: 21333
Project: 21333
Buggy source:
public int getColumnCount(){
  return 6;
}

Fixed version (ground truth):
public int getColumnCount(){
  return 5;
}
Program: 21334
Project: 21334
Buggy source:
public Object getValueAt(int rowIndex,int columnIndex){
switch (columnIndex) {
case 0:
    return rowIndex + "String_Node_Str";
case 1:
  return configuration.getBooleanProperty(getConfigParamKey(plugins.get(rowIndex)),false) ? JDLocale.L("String_Node_Str","String_Node_Str") : JDLocale.L("String_Node_Str","String_Node_Str");
case 2:
return plugins.get(rowIndex).getPluginName();
case 3:
return plugins.get(rowIndex).getVersion();
case 4:
return plugins.get(rowIndex).getCoder();
case 5:
return plugins.get(rowIndex).getRequirements();
}
return null;
}

Fixed version (ground truth):
public Object getValueAt(int rowIndex,int columnIndex){
switch (columnIndex) {
case 0:
    return configuration.getBooleanProperty(getConfigParamKey(plugins.get(rowIndex)),false) ? JDLocale.L("String_Node_Str","String_Node_Str") : JDLocale.L("String_Node_Str","String_Node_Str");
case 1:
  return plugins.get(rowIndex).getPluginName();
case 2:
return plugins.get(rowIndex).getVersion();
case 3:
return plugins.get(rowIndex).getCoder();
case 4:
return plugins.get(rowIndex).getRequirements();
}
return null;
}
Program: 21336
Project: 21336
Buggy source:
public void actionPerformed(ActionEvent e){
  if (e.getSource() == btnOK) {
    captchaText=textField.getText();
    setVisible(false);
    dispose();
  }
  if (e.getSource() == btnBAD) {
    captchaText=null;
    setVisible(false);
    dispose();
  }
  if (countdownThread != null && countdownThread.isAlive())   this.countdownThread.interrupt();
  if (jacThread != null && jacThread.isAlive())   this.jacThread.interrupt();
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if (e.getSource() == btnOK) {
    captchaText=textField.getText();
    this.dispose();
  }
  if (e.getSource() == btnBAD) {
    captchaText=null;
    this.dispose();
  }
  if (countdownThread != null && countdownThread.isAlive())   this.countdownThread.interrupt();
  if (jacThread != null && jacThread.isAlive())   this.jacThread.interrupt();
}
Program: 21338
Project: 21338
Buggy source:
private JButton createMenuButton(JDAction action){
  JButton bt=new JButton(action);
  bt.setFocusPainted(false);
  bt.setBorderPainted(false);
  bt.setText(null);
  return bt;
}

Fixed version (ground truth):
private JButton createMenuButton(JDAction action){
  JButton bt=new JButton(action);
  bt.setFocusPainted(false);
  bt.setBorderPainted(false);
  bt.setOpaque(false);
  bt.setText(null);
  return bt;
}
Program: 21340
Project: 21340
Buggy source:
/** 
 * @author JD-Team Fügt einen neuen ConfigTab hinzu
 * @param configPanel
 */
@SuppressWarnings("String_Node_Str") private void addConfigPanel(Class configPanelClass,String img,String title){
  this.configClasses.add(configPanelClass);
  int n=10;
  JPanel p=new JPanel(new BorderLayout(n,n));
  p.setBorder(new EmptyBorder(n,n,n,n));
  this.containerPanels.add(p);
  configPanels.add(null);
  int m=2;
  JPanel headerPanel=new JPanel(new BorderLayout(m,m));
  ImageIcon icon=new ImageIcon(JDUtilities.getImage(img));
  try {
    headerPanel.add(new JLinkButton(title,icon,new URL(JDLocale.L("String_Node_Str","String_Node_Str") + title.replaceAll("String_Node_Str","String_Node_Str"))),BorderLayout.NORTH);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  headerPanel.add(new JXTitledSeparator("String_Node_Str"),BorderLayout.SOUTH);
  p.add(headerPanel,BorderLayout.NORTH);
  tabbedPane.addTab(title,new ImageIcon(icon.getImage().getScaledInstance(20,-1,Image.SCALE_SMOOTH)),p);
}

Fixed version (ground truth):
/** 
 * @author JD-Team Fügt einen neuen ConfigTab hinzu
 * @param configPanel
 */
@SuppressWarnings("String_Node_Str") private void addConfigPanel(Class configPanelClass,String img,String title){
  this.configClasses.add(configPanelClass);
  int n=10;
  JPanel p=new JPanel(new BorderLayout(n,n));
  p.setBorder(new EmptyBorder(n,n,n,n));
  this.containerPanels.add(p);
  configPanels.add(null);
  int m=2;
  JPanel headerPanel=new JPanel(new BorderLayout(m,m));
  ImageIcon icon=new ImageIcon(JDUtilities.getImage(img));
  try {
    headerPanel.add(new JLinkButton(title,icon,new URL(JDLocale.L("String_Node_Str","String_Node_Str") + title.replaceAll("String_Node_Str","String_Node_Str"))),BorderLayout.WEST);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  headerPanel.add(new JXTitledSeparator("String_Node_Str"),BorderLayout.SOUTH);
  p.add(headerPanel,BorderLayout.NORTH);
  tabbedPane.addTab(title,new ImageIcon(icon.getImage().getScaledInstance(20,-1,Image.SCALE_SMOOTH)),p);
}
Program: 21343
Project: 21343
Buggy source:
private int getWaittime(){
  return this.getProperties().getIntegerProperty("String_Node_Str",5) * 60000;
}

Fixed version (ground truth):
private int getWaittime(){
  return subConfig.getIntegerProperty("String_Node_Str",5) * 60000;
}
Program: 21344
Project: 21344
Buggy source:
@Override public boolean initAddon(){
  if (JDUtilities.getJavaVersion() >= 1.5) {
    logger.info("String_Node_Str");
    ConfigEntry cfg;
    config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str")));
    cfg.setDefaultValue(JDUtilities.getConfiguration().getDefaultDownloadDirectory());
    config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str"),1,60).setDefaultValue(5));
    cfg.setDefaultValue("String_Node_Str");
    config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str")));
    cfg.setDefaultValue(true);
    i=new check();
    i.start();
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean initAddon(){
  if (JDUtilities.getJavaVersion() >= 1.5) {
    logger.info("String_Node_Str");
    i=new check();
    i.start();
    return true;
  }
 else {
    return false;
  }
}
Program: 21345
Project: 21345
Buggy source:
private void checkFolder(){
  boolean dabei=false;
  File folder=new File(this.getProperties().getStringProperty("String_Node_Str",JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY)));
  if (folder.isDirectory()) {
    String[] help=folder.list();
    for (int i=0; i < help.length; i++) {
      if (help[i].endsWith("String_Node_Str") || help[i].endsWith("String_Node_Str") || help[i].endsWith("String_Node_Str")) {
        File container=new File(folder,help[i]);
        for (int j=0; j < added.size(); j++) {
          if (container.getAbsolutePath().equals(added.get(i))) {
            dabei=true;
            break;
          }
        }
        if (!dabei) {
          JDUtilities.getController().loadContainerFile(container);
          added.add(container.getAbsolutePath());
          if (this.getProperties().getBooleanProperty("String_Node_Str",true)) {
            container.delete();
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void checkFolder(){
  boolean dabei=false;
  File folder=new File(subConfig.getStringProperty("String_Node_Str",JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY)));
  if (folder.isDirectory()) {
    String[] help=folder.list();
    for (int i=0; i < help.length; i++) {
      if (help[i].endsWith("String_Node_Str") || help[i].endsWith("String_Node_Str") || help[i].endsWith("String_Node_Str")) {
        File container=new File(folder,help[i]);
        for (int j=0; j < added.size(); j++) {
          if (container.getAbsolutePath().equals(added.get(i))) {
            dabei=true;
            break;
          }
        }
        if (!dabei) {
          JDUtilities.getController().loadContainerFile(container);
          added.add(container.getAbsolutePath());
          if (subConfig.getBooleanProperty("String_Node_Str",true)) {
            container.delete();
          }
        }
      }
    }
  }
}
Program: 21348
Project: 21348
Buggy source:
public void run(){
  int c=countdown * 1000;
  long t=System.currentTimeMillis();
  while (c >= 0) {
    if (!isVisible())     return;
    t=System.currentTimeMillis();
    setTitle("String_Node_Str" + JDUtilities.formatSeconds(c / 1000));
    if (c < 3000)     JDSounds.P("String_Node_Str");
    long dif=System.currentTimeMillis() - t;
    c-=dif;
    try {
      if (dif < 1000)       Thread.sleep(1000 - dif);
      c-=(1000 - dif);
    }
 catch (    InterruptedException e) {
    }
  }
  captchaText=textField.getText();
  dispose();
}

Fixed version (ground truth):
public void run(){
  int c=countdown * 1000;
  long t=System.currentTimeMillis();
  while (c >= 0) {
    if (!isVisible())     return;
    t=System.currentTimeMillis();
    setTitle("String_Node_Str" + JDUtilities.formatSeconds(c / 1000));
    if (c < 3000)     JDSounds.P("String_Node_Str");
    long dif=System.currentTimeMillis() - t;
    c-=dif;
    try {
      if (dif < 1000)       Thread.sleep(1000 - dif);
      c-=(1000 - dif);
    }
 catch (    InterruptedException e) {
    }
    if (!isVisible())     return;
  }
  captchaText=textField.getText();
  dispose();
}
Program: 21352
Project: 21352
Buggy source:
@Override public void actionPerformed(ActionEvent e){
  if (e.getActionCommand().equals("String_Node_Str")) {
    checkFolder();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    added=new ArrayList<String>();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    if (running) {
      threadend=false;
    }
 else {
      i=new check();
      i.start();
    }
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
  if (e.getActionCommand().equals("String_Node_Str")) {
    checkFolder();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    added=new ArrayList<String>();
  }
  if (e.getActionCommand().equals("String_Node_Str")) {
    if (running) {
      threadend=false;
    }
 else {
      i=new check();
      i.start();
      running=true;
    }
  }
}
Program: 21353
Project: 21353
Buggy source:
@Override public void enable(boolean enable) throws Exception {
  if (JDUtilities.getJavaVersion() >= 1.5) {
    if (enable) {
      logger.info("String_Node_Str");
      ConfigEntry cfg;
      config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str")));
      cfg.setDefaultValue(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str")));
      cfg.setDefaultValue(true);
      i=new check();
      i.start();
    }
  }
 else {
    logger.severe("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void enable(boolean enable) throws Exception {
  if (JDUtilities.getJavaVersion() >= 1.5) {
    if (enable) {
      logger.info("String_Node_Str");
      ConfigEntry cfg;
      config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_BROWSEFOLDER,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str")));
      cfg.setDefaultValue(JDUtilities.getConfiguration().getStringProperty(Configuration.PARAM_DOWNLOAD_DIRECTORY));
      config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_SPINNER,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str"),1,60).setDefaultValue(5));
      cfg.setDefaultValue("String_Node_Str");
      config.addEntry(cfg=new ConfigEntry(ConfigContainer.TYPE_COMBOBOX,getProperties(),"String_Node_Str",JDLocale.L("String_Node_Str","String_Node_Str")));
      cfg.setDefaultValue(true);
      i=new check();
      i.start();
    }
  }
 else {
    logger.severe("String_Node_Str");
  }
}
Program: 21354
Project: 21354
Buggy source:
public void run(){
  threadend=true;
  while (threadend) {
    checkFolder();
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
    }
  }
  running=false;
}

Fixed version (ground truth):
public void run(){
  threadend=true;
  while (threadend) {
    checkFolder();
    try {
      Thread.sleep(getWaittime());
    }
 catch (    InterruptedException e) {
    }
  }
  running=false;
}
Program: 21356
Project: 21356
Buggy source:
public ScheduleControl(){
  addWindowListener(new WindowAdapter(){
    public void windowClosing(    WindowEvent e){
      setVisible(false);
      int size=v.size();
      for (int i=0; i < size; ++i) {
        ScheduleFrame s=(ScheduleFrame)v.elementAt(i);
        s.setVisible(false);
      }
    }
  }
);
  this.setTitle("String_Node_Str");
  this.setSize(400,300);
  this.setResizable(false);
  this.setLocation(300,300);
  this.menu.setLayout(new FlowLayout());
  this.menu.add(this.list);
  this.list.add(JDLocale.L("String_Node_Str","String_Node_Str"));
  this.menu.add(this.show);
  this.menu.add(this.add);
  this.menu.add(this.remove);
  this.getContentPane().setLayout(new FlowLayout());
  this.getContentPane().add(menu);
  this.getContentPane().add(status_panel);
  this.add.addActionListener(this);
  this.remove.addActionListener(this);
  this.show.addActionListener(this);
  SwingUtilities.updateComponentTreeUI(this);
}

Fixed version (ground truth):
public ScheduleControl(){
  addWindowListener(new WindowAdapter(){
    public void windowClosing(    WindowEvent e){
      setVisible(false);
    }
  }
);
  this.setTitle("String_Node_Str");
  this.setSize(450,300);
  this.setResizable(false);
  this.setLocation(300,300);
  this.menu.setLayout(new FlowLayout());
  this.menu.add(this.list);
  this.list.add(JDLocale.L("String_Node_Str","String_Node_Str"));
  this.menu.add(this.show);
  this.menu.add(this.add);
  this.menu.add(this.remove);
  this.menu.add(this.swa);
  this.swa.setToolTipText("String_Node_Str");
  this.getContentPane().setLayout(new FlowLayout());
  this.getContentPane().add(menu);
  this.getContentPane().add(status_panel);
  this.add.addActionListener(this);
  this.remove.addActionListener(this);
  this.show.addActionListener(this);
  this.swa.addActionListener(this);
  SwingUtilities.updateComponentTreeUI(this);
}
Program: 21357
Project: 21357
Buggy source:
public void windowClosing(WindowEvent e){
  setVisible(false);
  int size=v.size();
  for (int i=0; i < size; ++i) {
    ScheduleFrame s=(ScheduleFrame)v.elementAt(i);
    s.setVisible(false);
  }
}

Fixed version (ground truth):
public void windowClosing(WindowEvent e){
  setVisible(false);
}
Program: 21364
Project: 21364
Buggy source:
@Override public Pattern getSupportedLinks(){
  boolean rscom=(Boolean)this.getProperties().getProperty("String_Node_Str",true);
  boolean rsde=(Boolean)this.getProperties().getProperty("String_Node_Str",false);
  boolean net=(Boolean)this.getProperties().getProperty("String_Node_Str",false);
  boolean uploaded=(Boolean)this.getProperties().getProperty("String_Node_Str",false);
  boolean cat=(Boolean)this.getProperties().getProperty("String_Node_Str",true);
  next=false;
  String hosterStr="String_Node_Str";
  if (rscom || rsde || net|| uploaded) {
    hosterStr+="String_Node_Str";
    if (rscom)     hosterStr+=isNext() + "String_Node_Str";
    if (rsde)     hosterStr+=isNext() + "String_Node_Str";
    if (net)     hosterStr+=isNext() + "String_Node_Str";
    if (uploaded)     hosterStr+=isNext() + "String_Node_Str";
    if (cat)     hosterStr+=isNext() + "String_Node_Str";
    hosterStr+="String_Node_Str";
  }
 else {
    hosterStr+="String_Node_Str";
  }
  return Pattern.compile("String_Node_Str" + (cat ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ hosterStr+ "String_Node_Str",Pattern.CASE_INSENSITIVE);
}

Fixed version (ground truth):
@Override public Pattern getSupportedLinks(){
  return null;
}
Program: 21367
Project: 21367
Buggy source:
public String toString(){
  try {
    return requestInfo.getHtmlCode();
  }
 catch (  Exception ec) {
  }
  return null;
}

Fixed version (ground truth):
public String toString(){
  return captchaCode.toString();
}
Program: 21373
Project: 21373
Buggy source:
public String toString(){
  String ret="String_Node_Str";
  ret+="String_Node_Str" + action + "String_Node_Str";
  if (method == METHOD_POST)   ret+="String_Node_Str";
 else   if (method == METHOD_GET)   ret+="String_Node_Str";
 else   if (method == METHOD_PUT)   ret+="String_Node_Str";
 else   if (method == METHOD_UNKNOWN)   ret+="String_Node_Str";
  for (  Map.Entry<String,String> entry : vars.entrySet()) {
    ret+="String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue()+ "String_Node_Str";
  }
  for (  Map.Entry<String,String> entry : formProperties.entrySet()) {
    ret+="String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue()+ "String_Node_Str";
  }
  return ret;
}

Fixed version (ground truth):
public String toString(){
  String ret="String_Node_Str";
  ret+="String_Node_Str" + action + "String_Node_Str";
  if (method == METHOD_POST)   ret+="String_Node_Str";
 else   if (method == METHOD_GET)   ret+="String_Node_Str";
 else   if (method == METHOD_PUT)   ret+="String_Node_Str";
 else   if (method == METHOD_UNKNOWN)   ret+="String_Node_Str";
  for (  Map.Entry<String,String> entry : vars.entrySet()) {
    ret+="String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue()+ "String_Node_Str";
  }
  for (  Map.Entry<String,String> entry : formProperties.entrySet()) {
    ret+="String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue()+ "String_Node_Str";
  }
  for (  Map.Entry<String,String> entry : requestPoperties.entrySet()) {
    ret+="String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue()+ "String_Node_Str";
  }
  return ret;
}
Program: 21375
Project: 21375
Buggy source:
public static String toRapidshareCom(File file){
  try {
    Form form=Form.getForms("String_Node_Str")[0];
    form.fileToPost=new File("String_Node_Str");
    System.out.println(form.getRequestInfo().getHtmlCode());
    System.out.println(form.toString());
  }
 catch (  Exception e) {
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public static String toRapidshareCom(File file){
  try {
    Form form=Form.getForms("String_Node_Str")[0];
    form.fileToPost=file;
    System.out.println(form.getRequestInfo().getHtmlCode());
    System.out.println(form.toString());
  }
 catch (  Exception e) {
  }
  return "String_Node_Str";
}
Program: 21377
Project: 21377
Buggy source:
public static boolean isLoggerActive(){
  return true;
}

Fixed version (ground truth):
public static boolean isLoggerActive(){
  return false;
}
Program: 21381
Project: 21381
Buggy source:
/** 
 * @author JD-Team Macht ein urlRawEncode und spart dabei die angegebenenZeichen aus
 * @param str
 * @return str URLCodiert
 */
public static String urlEncode(String str){
  try {
    str=URLDecoder.decode(str,"String_Node_Str");
  }
 catch (  Exception e) {
  }
  String allowed="String_Node_Str";
  String ret="String_Node_Str";
  int i;
  for (i=0; i < str.length(); i++) {
    char letter=str.charAt(i);
    if (allowed.indexOf(letter) >= 0) {
      ret+=letter;
    }
 else {
      ret+="String_Node_Str" + Integer.toString(letter,16);
    }
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * @author JD-Team Macht ein urlRawEncode und spart dabei die angegebenenZeichen aus
 * @param str
 * @return str URLCodiert
 */
public static String urlEncode(String str){
  String allowed="String_Node_Str";
  String ret="String_Node_Str";
  int i;
  for (i=0; i < str.length(); i++) {
    char letter=str.charAt(i);
    if (allowed.indexOf(letter) >= 0) {
      ret+=letter;
    }
 else {
      ret+="String_Node_Str" + Integer.toString(letter,16);
    }
  }
  return ret;
}
Program: 21382
Project: 21382
Buggy source:
/** 
 * MTH File wird geladen und verarbeitet
 */
private void loadMTHFile(){
  File f=JDUtilities.getResourceFile("String_Node_Str" + this.methodDirName + "String_Node_Str"+ "String_Node_Str");
  mth=UTILITIES.parseXmlString(JDUtilities.getLocalFile(f),false);
  logger.info("String_Node_Str" + f);
  if (mth == null) {
    if (JAntiCaptcha.isLoggerActive())     logger.severe("String_Node_Str");
  }
  createLetterDBFormMTH();
}

Fixed version (ground truth):
/** 
 * MTH File wird geladen und verarbeitet
 */
private void loadMTHFile(){
  File f=JDUtilities.getResourceFile("String_Node_Str" + this.methodDirName + "String_Node_Str"+ "String_Node_Str");
  Document mth=UTILITIES.parseXmlString(JDUtilities.getLocalFile(f),false);
  logger.info("String_Node_Str" + f);
  if (mth == null) {
    if (JAntiCaptcha.isLoggerActive())     logger.severe("String_Node_Str");
  }
  createLetterDBFormMTH(mth);
}
Program: 21385
Project: 21385
Buggy source:
/** 
 * public static String getLocalFile(File file) Liest file über einen bufferdReader ein und gibt den Inhalt asl String zurück
 * @param file
 * @return File Content als String
 */
public static String getLocalFile(File file){
  if (!file.exists())   return "String_Node_Str";
  BufferedReader f;
  try {
    f=new BufferedReader(new FileReader(file));
    String line;
    String ret="String_Node_Str";
    while ((line=f.readLine()) != null) {
      ret+=line + "String_Node_Str";
    }
    f.close();
    return ret;
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * public static String getLocalFile(File file) Liest file über einen bufferdReader ein und gibt den Inhalt asl String zurück
 * @param file
 * @return File Content als String
 */
public static String getLocalFile(File file){
  if (!file.exists())   return "String_Node_Str";
  BufferedReader f;
  try {
    f=new BufferedReader(new FileReader(file));
    System.gc();
    String line;
    StringBuffer ret=new StringBuffer();
    String sep=System.getProperty("String_Node_Str");
    while ((line=f.readLine()) != null) {
      ret.append(line + sep);
    }
    f.close();
    return ret.toString();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  return "String_Node_Str";
}
Program: 21386
Project: 21386
Buggy source:
private JUnrar getUnrar(){
  JUnrar unrar;
  if (lastFinishedDownload != null) {
    String password=lastFinishedDownload.getSourcePluginPassword();
    if (password != null && password.matches("String_Node_Str"))     password=null;
    unrar=new JUnrar(new File(lastFinishedDownload.getFileOutput()),password);
    if (password != null)     unrar.addToPasswordlist(password);
    unrar.useToextractlist=true;
  }
 else {
    unrar=new JUnrar();
    unrar.useToextractlist=false;
  }
  if (JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_ENABLE_EXTRACTFOLDER,false)) {
    String efolder=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_EXTRACTFOLDER,null);
    if (efolder != null)     unrar.extractFolder=new File(efolder);
  }
 else   unrar.overwriteFiles=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
  unrar.autoDelete=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
  unrar.unrar=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
  return unrar;
}

Fixed version (ground truth):
private JUnrar getUnrar(){
  JUnrar unrar;
  System.out.println(lastFinishedDownload);
  if (lastFinishedDownload != null) {
    String password=lastFinishedDownload.getSourcePluginPassword();
    if (password != null && password.matches("String_Node_Str"))     password=null;
    unrar=new JUnrar(new File(lastFinishedDownload.getFileOutput()),password);
    if (password != null)     unrar.addToPasswordlist(password);
    unrar.useToextractlist=true;
  }
 else {
    unrar=new JUnrar();
    unrar.useToextractlist=false;
  }
  if (JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_ENABLE_EXTRACTFOLDER,false)) {
    String efolder=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_EXTRACTFOLDER,null);
    if (efolder != null)     unrar.extractFolder=new File(efolder);
  }
  unrar.overwriteFiles=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
  unrar.autoDelete=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
  unrar.unrar=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
  return unrar;
}
Program: 21388
Project: 21388
Buggy source:
private JUnrar getUnrar(){
  JUnrar unrar;
  if (lastFinishedDownload != null) {
    String password=lastFinishedDownload.getSourcePluginPassword();
    if (password != null && password.matches("String_Node_Str"))     password=null;
    unrar=new JUnrar(new File(lastFinishedDownload.getFileOutput()),password);
    if (password != null)     unrar.addToPasswordlist(password);
    unrar.useToextractlist=true;
  }
 else {
    unrar=new JUnrar();
    unrar.useToextractlist=false;
  }
  if (JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_ENABLE_EXTRACTFOLDER,false)) {
    String efolder=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_EXTRACTFOLDER,null);
    if (efolder != null)     unrar.extractFolder=new File(efolder);
  }
  unrar.overwriteFiles=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
  unrar.autoDelete=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
  unrar.unrar=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
  return unrar;
}

Fixed version (ground truth):
private JUnrar getUnrar(){
  JUnrar unrar;
  if (lastFinishedDownload != null) {
    String password=lastFinishedDownload.getSourcePluginPassword();
    if (password != null && password.matches("String_Node_Str"))     password=null;
    unrar=new JUnrar(new File(lastFinishedDownload.getFileOutput()),password);
    if (password != null)     unrar.addToPasswordlist(password);
  }
 else {
    unrar=new JUnrar();
  }
  if (JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_ENABLE_EXTRACTFOLDER,false)) {
    unrar.useToextractlist=true;
    String efolder=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_EXTRACTFOLDER,null);
    if (efolder != null)     unrar.extractFolder=new File(efolder);
  }
 else   unrar.useToextractlist=false;
  unrar.overwriteFiles=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_OVERWRITE_FILES,false);
  unrar.autoDelete=JDUtilities.getConfiguration().getBooleanProperty(Unrar.PROPERTY_AUTODELETE,false);
  unrar.unrar=JDUtilities.getConfiguration().getStringProperty(Unrar.PROPERTY_UNRARCOMMAND);
  return unrar;
}
Program: 21389
Project: 21389
Buggy source:
/** 
 * Liefert alle selektierten Links zurück
 * @return Die selektierten Links
 */
public Vector<DownloadLink> getSelectedObjects(){
  int rows[]=table.getSelectedRows();
  Vector<DownloadLink> linksSelected=new Vector<DownloadLink>();
  for (int i=0; i < rows.length; i++) {
    linksSelected.add(allLinks.get(rows[i]));
  }
  return linksSelected;
}

Fixed version (ground truth):
/** 
 * Liefert alle selektierten Links zurück
 * @return Die selektierten Links
 */
public Vector<DownloadLink> getSelectedObjects(){
  int rows[]=table.getSelectedRows();
  Vector<DownloadLink> linksSelected=new Vector<DownloadLink>();
  int als=allLinks.size();
  for (int i=0; i < rows.length; i++) {
    if (rows[i] < als)     linksSelected.add(allLinks.get(rows[i]));
  }
  return linksSelected;
}
Program: 21390
Project: 21390
Buggy source:
private void saveToExtractList(){
  if (!useToextractlist) {
    Utilities.saveObject(this.toExtractlist,toExtract,false);
  }
}

Fixed version (ground truth):
private void saveToExtractList(){
  if (useToextractlist) {
    Utilities.saveObject(this.toExtractlist,toExtract,false);
  }
}
Program: 21391
Project: 21391
Buggy source:
private void removeFromToExtractList(File file){
  if (!useToextractlist) {
    if (toExtractlist == null)     loadToExtractList();
    if (toExtractlist.containsKey(file)) {
      toExtractlist.remove(file);
      saveToExtractList();
    }
  }
}

Fixed version (ground truth):
private void removeFromToExtractList(File file){
  if (useToextractlist) {
    if (toExtractlist == null)     loadToExtractList();
    if (toExtractlist.containsKey(file)) {
      toExtractlist.remove(file);
      saveToExtractList();
    }
  }
}
Program: 21392
Project: 21392
Buggy source:
@SuppressWarnings("String_Node_Str") private void loadToExtractList(){
  if (!useToextractlist) {
    if (toExtract.isFile()) {
      this.toExtractlist=(HashMap<File,String>)Utilities.loadObject(toExtract,false);
      freeToExtractList();
    }
 else {
      this.toExtractlist=new HashMap<File,String>();
      saveToExtractList();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void loadToExtractList(){
  if (useToextractlist) {
    if (toExtract.isFile()) {
      this.toExtractlist=(HashMap<File,String>)Utilities.loadObject(toExtract,false);
      freeToExtractList();
    }
 else {
      this.toExtractlist=new HashMap<File,String>();
      saveToExtractList();
    }
  }
}
Program: 21393
Project: 21393
Buggy source:
private void freeToExtractList(){
  if (!useToextractlist) {
    HashMap<File,String> toExtractlistTemp=new HashMap<File,String>();
    for (    Map.Entry<File,String> entry : toExtractlist.entrySet()) {
      File key=entry.getKey();
      if (key.isFile())       toExtractlistTemp.put(key,entry.getValue());
    }
    toExtractlist=toExtractlistTemp;
    saveToExtractList();
  }
}

Fixed version (ground truth):
private void freeToExtractList(){
  if (useToextractlist) {
    HashMap<File,String> toExtractlistTemp=new HashMap<File,String>();
    for (    Map.Entry<File,String> entry : toExtractlist.entrySet()) {
      File key=entry.getKey();
      if (key.isFile())       toExtractlistTemp.put(key,entry.getValue());
    }
    toExtractlist=toExtractlistTemp;
    saveToExtractList();
  }
}
Program: 21394
Project: 21394
Buggy source:
private void addToToExtractList(File file,String password){
  if (!useToextractlist) {
    if (toExtractlist == null)     loadToExtractList();
    if (!toExtractlist.containsKey(file)) {
      toExtractlist.put(file,password);
      saveToExtractList();
    }
  }
}

Fixed version (ground truth):
private void addToToExtractList(File file,String password){
  if (useToextractlist) {
    if (toExtractlist == null)     loadToExtractList();
    if (!toExtractlist.containsKey(file)) {
      toExtractlist.put(file,password);
      saveToExtractList();
    }
  }
}
Program: 21396
Project: 21396
Buggy source:
/** 
 * Setzt alle Ordner in denen entpackt werden soll
 * @param folders
 */
@SuppressWarnings("String_Node_Str") public void setFolders(Vector<String> folders){
  this.srcFolders=folders;
  files=new HashMap<File,String>();
  HashMap<File,String> filelist=new HashMap<File,String>();
  if (progress != null)   progress.setStatusText("String_Node_Str");
  if (progress != null)   progress.increase(1);
  for (int i=0; i < srcFolders.size(); i++) {
    if (srcFolders.get(i) != null) {
      Vector<File> list=vFileList(new File(srcFolders.get(i)));
      for (int ii=0; ii < list.size(); ii++) {
        if (autoDelete && list.get(ii).getName().matches("String_Node_Str"))         filelist.put(list.get(ii),null);
 else         if (list.get(ii).getName().matches("String_Node_Str")) {
          try {
            if (!unpackedlist.containsValue(Plugin.md5sum(list.get(ii)))) {
              filelist.put(list.get(ii),null);
            }
          }
 catch (          NoSuchAlgorithmException e) {
            e.printStackTrace();
          }
catch (          FileNotFoundException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
  this.files=filelist;
}

Fixed version (ground truth):
/** 
 * Setzt alle Ordner in denen entpackt werden soll
 * @param folders
 */
@SuppressWarnings("String_Node_Str") public void setFolders(Vector<String> folders){
  this.srcFolders=folders;
  loadUnpackedList();
  files=new HashMap<File,String>();
  HashMap<File,String> filelist=new HashMap<File,String>();
  if (progress != null)   progress.setStatusText("String_Node_Str");
  if (progress != null)   progress.increase(1);
  for (int i=0; i < srcFolders.size(); i++) {
    if (srcFolders.get(i) != null) {
      Vector<File> list=vFileList(new File(srcFolders.get(i)));
      for (int ii=0; ii < list.size(); ii++) {
        if (autoDelete && list.get(ii).getName().matches("String_Node_Str"))         filelist.put(list.get(ii),null);
 else         if (list.get(ii).getName().matches("String_Node_Str")) {
          if (!isFileInUnpackedList(list.get(ii))) {
            filelist.put(list.get(ii),null);
          }
        }
      }
    }
  }
  this.files=filelist;
}
Program: 21397
Project: 21397
Buggy source:
/** 
 * Startet den Entpackungsprozess. Es werden alle Zielordner zurückgegeben
 */
public Vector<String> unrar(){
  unrar=getUnrarCommand();
  logger.info("String_Node_Str");
  logger.info("String_Node_Str" + unrar);
  logger.info("String_Node_Str" + maxFilesize);
  logger.info("String_Node_Str" + standardPassword);
  logger.info("String_Node_Str" + overwriteFiles);
  logger.info("String_Node_Str" + autoDelete);
  if (unrar == null) {
    return null;
  }
  progress.setStatusText("String_Node_Str");
  progress.increase(1);
  for (  Map.Entry<File,String> entry : files.entrySet()) {
    File file=entry.getKey();
    if (file.isFile()) {
      String name=file.getName();
      if (name.matches("String_Node_Str")) {
        logger.finer("String_Node_Str" + entry.getKey());
        if (extractFile(entry.getKey(),entry.getValue())) {
          ret.add(entry.getKey().getParentFile().getAbsolutePath());
        }
      }
 else       if (!name.matches("String_Node_Str") && name.matches("String_Node_Str")) {
        logger.finer("String_Node_Str" + entry.getKey());
        if (extractFile(entry.getKey(),entry.getValue())) {
          ret.add(entry.getKey().getParentFile().getAbsolutePath());
        }
      }
 else {
      }
    }
 else     logger.fine(file.getName() + "String_Node_Str");
  }
  closeEvent();
  logger.info("String_Node_Str");
  progress.finalize();
  return ret;
}

Fixed version (ground truth):
/** 
 * Startet den Entpackungsprozess. Es werden alle Zielordner zurückgegeben
 */
public Vector<String> unrar(){
  unrar=getUnrarCommand();
  logger.info("String_Node_Str");
  logger.info("String_Node_Str" + unrar);
  logger.info("String_Node_Str" + maxFilesize);
  logger.info("String_Node_Str" + standardPassword);
  logger.info("String_Node_Str" + overwriteFiles);
  logger.info("String_Node_Str" + autoDelete);
  if (unrar == null) {
    return null;
  }
  loadUnpackedList();
  progress.setStatusText("String_Node_Str");
  progress.increase(1);
  for (  Map.Entry<File,String> entry : files.entrySet()) {
    File file=entry.getKey();
    if (file.isFile()) {
      String name=file.getName();
      if (name.matches("String_Node_Str")) {
        logger.finer("String_Node_Str" + entry.getKey());
        if ((autoDelete || !isFileInUnpackedList(entry.getKey())) && extractFile(entry.getKey(),entry.getValue())) {
          ret.add(entry.getKey().getParentFile().getAbsolutePath());
        }
      }
 else       if (!name.matches("String_Node_Str") && name.matches("String_Node_Str")) {
        logger.finer("String_Node_Str" + entry.getKey());
        System.out.println(!isFileInUnpackedList(entry.getKey()));
        if ((autoDelete || !isFileInUnpackedList(entry.getKey())) && extractFile(entry.getKey(),entry.getValue())) {
          ret.add(entry.getKey().getParentFile().getAbsolutePath());
        }
      }
 else {
      }
    }
 else     logger.fine(file.getName() + "String_Node_Str");
  }
  closeEvent();
  logger.info("String_Node_Str");
  progress.finalize();
  return ret;
}
Program: 21399
Project: 21399
Buggy source:
@SuppressWarnings("String_Node_Str") private void loadUnpackedList(){
  if (!autoDelete) {
    if (unpacked.isFile()) {
      this.unpackedlist=(HashMap<File,String>)Utilities.loadObject(unpacked,false);
      freeUnpackedList();
    }
 else {
      this.unpackedlist=new HashMap<File,String>();
      saveUnpackedList();
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void loadUnpackedList(){
  if (!autoDelete) {
    if (unpacked.isFile()) {
      this.unpackedlist=(Vector<File>)Utilities.loadObject(unpacked,false);
      freeUnpackedList();
    }
 else {
      this.unpackedlist=new Vector<File>();
      saveUnpackedList();
    }
  }
}
Program: 21400
Project: 21400
Buggy source:
private void freeUnpackedList(){
  if (!autoDelete) {
    HashMap<File,String> ret=new HashMap<File,String>();
    for (    Map.Entry<File,String> entry : unpackedlist.entrySet()) {
      File file=entry.getKey();
      String md5=entry.getValue();
      try {
        if (file.exists() && (md5 == Plugin.md5sum(file)))         ret.put(file,md5);
      }
 catch (      NoSuchAlgorithmException e) {
        e.printStackTrace();
      }
catch (      FileNotFoundException e) {
        e.printStackTrace();
      }
    }
    this.unpackedlist=ret;
    saveUnpackedList();
  }
}

Fixed version (ground truth):
private void freeUnpackedList(){
  if (!autoDelete) {
    for (int i=0; i < unpackedlist.size(); i++) {
      File file=unpackedlist.get(i);
      if (!file.exists())       unpackedlist.remove(i);
    }
    saveUnpackedList();
  }
}
Program: 21402
Project: 21402
Buggy source:
/** 
 * bricht den dpwnloadlink ab.
 * @param link
 */
public void abortDownloadLink(DownloadLink link){
  SingleDownloadController dlThread=getDownloadThread(link);
  if (dlThread != null)   dlThread.abortDownload();
}

Fixed version (ground truth):
/** 
 * bricht den dpwnloadlink ab.
 * @param link
 */
public void abortDownloadLink(DownloadLink link){
  SingleDownloadController dlThread=getDownloadThread(link);
  if (dlThread != null) {
    dlThread.abortDownload();
    removeDownloadLinkFromActiveList(link);
  }
  ;
}
Program: 21403
Project: 21403
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(){
  logger.finer("String_Node_Str");
  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;
  logger.finer("String_Node_Str");
  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) {
    }
  }
  logger.finer("String_Node_Str");
  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(){
  logger.finer("String_Node_Str");
  ProgressController progress=new ProgressController(activeLinks.size());
  progress.setStatusText("String_Node_Str");
  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;
  logger.finer("String_Node_Str");
  while (true) {
    progress.increase(1);
    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(500);
    }
 catch (    InterruptedException e) {
    }
  }
  progress.finalize();
  logger.finer("String_Node_Str");
  this.aborted=true;
  this.clearDownloadListStatus();
}
Program: 21405
Project: 21405
Buggy source:
/** 
 * bricht downloads ab wenn diese entfernt wurden
 * @param oldLinks
 * @param newLinks
 */
private void abortDeletedLink(Vector<DownloadLink> oldLinks,Vector<DownloadLink> newLinks){
  if (watchdog == null)   return;
  for (int i=0; i < oldLinks.size(); i++) {
    if (newLinks.indexOf(oldLinks.elementAt(i)) == -1) {
      oldLinks.elementAt(i).setAborted(true);
      watchdog.abortDownloadLink(oldLinks.elementAt(i));
    }
  }
}

Fixed version (ground truth):
/** 
 * bricht downloads ab wenn diese entfernt wurden
 * @param oldLinks
 * @param newLinks
 */
private void abortDeletedLink(Vector<DownloadLink> oldLinks,Vector<DownloadLink> newLinks){
  logger.info("String_Node_Str" + oldLinks.size() + "String_Node_Str"+ newLinks.size());
  if (watchdog == null)   return;
  for (int i=0; i < oldLinks.size(); i++) {
    if (newLinks.indexOf(oldLinks.elementAt(i)) == -1) {
      logger.finer("String_Node_Str" + oldLinks.elementAt(i));
      watchdog.abortDownloadLink(oldLinks.elementAt(i));
    }
  }
}
Program: 21407
Project: 21407
Buggy source:
/** 
 * Liefert alle DownloadLinks zurück
 * @return Alle DownloadLinks zurück
 */
protected Vector<DownloadLink> getDownloadLinks(){
  return downloadLinks;
}

Fixed version (ground truth):
/** 
 * Liefert alle DownloadLinks zurück
 * @return Alle DownloadLinks zurück
 */
public Vector<DownloadLink> getDownloadLinks(){
  return downloadLinks;
}
Program: 21412
Project: 21412
Buggy source:
/** 
 * Hiermit werden die selektierten Zeilen innerhalb der Tabelle verschoben
 * @param direction Zeigt wie/wohin die Einträge verschoben werden sollen
 */
public void moveSelectedItems(int direction){
  Vector<DownloadLink> selectedLinks=getSelectedObjects();
  int selectedRows[]=table.getSelectedRows();
  ;
  table.getSelectionModel().clearSelection();
  DownloadLink tempLink;
switch (direction) {
case JDAction.ITEMS_MOVE_TOP:
    allLinks.removeAll(selectedLinks);
  allLinks.addAll(0,selectedLinks);
break;
case JDAction.ITEMS_MOVE_BOTTOM:
allLinks.removeAll(selectedLinks);
allLinks.addAll(allLinks.size(),selectedLinks);
break;
case JDAction.ITEMS_MOVE_UP:
if (selectedRows[0] > 0) {
for (int i=0; i < selectedRows.length; i++) {
tempLink=allLinks.get(selectedRows[i] - 1);
allLinks.set(selectedRows[i] - 1,allLinks.get(selectedRows[i]));
allLinks.set(selectedRows[i],tempLink);
}
}
break;
case JDAction.ITEMS_MOVE_DOWN:
if (selectedRows[selectedRows.length - 1] + 1 < allLinks.size()) {
for (int i=selectedRows.length - 1; i >= 0; i--) {
tempLink=allLinks.get(selectedRows[i] + 1);
allLinks.set(selectedRows[i] + 1,allLinks.get(selectedRows[i]));
allLinks.set(selectedRows[i],tempLink);
}
}
break;
}
fireTableChanged();
parent.fireUIEvent(new UIEvent(parent,UIEvent.UI_LINKS_CHANGED,null));
int rows[]=getIndexes(selectedLinks);
for (int i=0; i < rows.length; i++) {
table.getSelectionModel().addSelectionInterval(rows[i],rows[i]);
}
}

Fixed version (ground truth):
/** 
 * Hiermit werden die selektierten Zeilen innerhalb der Tabelle verschoben
 * @param direction Zeigt wie/wohin die Einträge verschoben werden sollen
 */
public void moveSelectedItems(int direction){
  Vector<DownloadLink> selectedLinks=getSelectedObjects();
  int selectedRows[]=table.getSelectedRows();
  ;
  table.getSelectionModel().clearSelection();
  DownloadLink tempLink;
switch (direction) {
case JDAction.ITEMS_MOVE_TOP:
    allLinks.removeAll(selectedLinks);
  allLinks.addAll(0,selectedLinks);
break;
case JDAction.ITEMS_MOVE_BOTTOM:
allLinks.removeAll(selectedLinks);
allLinks.addAll(allLinks.size(),selectedLinks);
break;
case JDAction.ITEMS_MOVE_UP:
if (selectedRows[0] > 0) {
for (int i=0; i < selectedRows.length; i++) {
tempLink=allLinks.get(selectedRows[i] - 1);
allLinks.set(selectedRows[i] - 1,allLinks.get(selectedRows[i]));
allLinks.set(selectedRows[i],tempLink);
}
}
break;
case JDAction.ITEMS_MOVE_DOWN:
if (selectedRows[selectedRows.length - 1] + 1 < allLinks.size()) {
for (int i=selectedRows.length - 1; i >= 0; i--) {
tempLink=allLinks.get(selectedRows[i] + 1);
allLinks.set(selectedRows[i] + 1,allLinks.get(selectedRows[i]));
allLinks.set(selectedRows[i],tempLink);
}
}
break;
}
fireTableChanged();
parent.fireUIEvent(new UIEvent(parent,UIEvent.UI_LINKS_CHANGED,parent.getDownloadLinks()));
int rows[]=getIndexes(selectedLinks);
for (int i=0; i < rows.length; i++) {
table.getSelectionModel().addSelectionInterval(rows[i],rows[i]);
}
}
Program: 21413
Project: 21413
Buggy source:
/** 
 * Diese methode führt den Nächsten schritt aus. Der gerade ausgeführte Schritt wir zurückgegeben
 * @param parameter Ein Übergabeparameter
 * @return der nächste Schritt oder null, falls alle abgearbeitet wurden
 */
public PluginStep doNextStep(Object parameter){
  currentStep=nextStep(currentStep);
  if (currentStep == null) {
    logger.info(this + "String_Node_Str");
    return null;
  }
  PluginStep ret=doStep(currentStep,parameter);
  return ret;
}

Fixed version (ground truth):
/** 
 * Diese methode führt den Nächsten schritt aus. Der gerade ausgeführte Schritt wir zurückgegeben
 * @param parameter Ein Übergabeparameter
 * @return der nächste Schritt oder null, falls alle abgearbeitet wurden
 */
public PluginStep doNextStep(Object parameter){
  currentStep=nextStep(currentStep);
  if (currentStep == null) {
    logger.info(this + "String_Node_Str");
    return null;
  }
  logger.info("String_Node_Str" + currentStep);
  PluginStep ret=doStep(currentStep,parameter);
  return ret;
}