nus-yam/ex-repair huggingface dataset:
Program: 134914
Project: 134914
Buggy source:
/** 
 * Remove the oldest entry in the container
 * @return The removed item
 * @throws AlarmContainerException If the container is empty
 */
public synchronized AlarmTableEntry removeOldest() throws AlarmContainerException {
  if (index.size() == 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  String ID=index.remove(index.size() - 1);
  if (ID == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  AlarmTableEntry ret=entries.remove(ID);
  if (ret == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  indexWithReduction.remove(ID);
  return ret;
}

Fixed version (ground truth):
/** 
 * Remove the oldest entry in the container
 * @return The removed item
 * @throws AlarmContainerException If the container is empty
 */
public synchronized AlarmTableEntry removeOldest() throws AlarmContainerException {
  if (index.size() == 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  String ID=index.remove(0);
  if (ID == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  AlarmTableEntry ret=entries.remove(ID);
  if (ret == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  indexWithReduction.remove(ID);
  return ret;
}
Program: 134915
Project: 134915
Buggy source:
/** 
 * Remove the entry for the passed alarm
 * @param alarm The alarm whose entry must be removed
 * @throws AlarmContainerException If the alarm is not in the container
 */
public synchronized void remove(Alarm alarm) throws AlarmContainerException {
  if (alarm == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String ID=alarm.getAlarmId();
  int pos=index.indexOf(ID);
  if (pos < 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  index.remove(pos);
  indexWithReduction.remove(pos);
  AlarmTableEntry oldEntry=entries.remove(ID);
  if (oldEntry == null) {
    throw new IllegalStateException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Remove the entry for the passed alarm
 * @param alarm The alarm whose entry must be removed
 * @throws AlarmContainerException If the alarm is not in the container
 */
public synchronized void remove(Alarm alarm) throws AlarmContainerException {
  if (alarm == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String ID=alarm.getAlarmId();
  int pos=index.indexOf(ID);
  if (pos < 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  index.remove(pos);
  pos=indexWithReduction.indexOf(ID);
  if (pos >= 0) {
    indexWithReduction.remove(pos);
  }
  AlarmTableEntry oldEntry=entries.remove(ID);
  if (oldEntry == null) {
    throw new IllegalStateException("String_Node_Str");
  }
}
Program: 134916
Project: 134916
Buggy source:
/** 
 * Remove the oldest entry in the container
 * @return The removed item
 * @throws AlarmContainerException If the container is empty
 */
public synchronized AlarmTableEntry removeOldest() throws AlarmContainerException {
  if (index.size() == 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  String ID=index.remove(index.size() - 1);
  if (ID == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  AlarmTableEntry ret=entries.remove(ID);
  if (ret == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  indexWithReduction.remove(ID);
  return ret;
}

Fixed version (ground truth):
/** 
 * Remove the oldest entry in the container
 * @return The removed item
 * @throws AlarmContainerException If the container is empty
 */
public synchronized AlarmTableEntry removeOldest() throws AlarmContainerException {
  if (index.size() == 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  String ID=index.remove(0);
  if (ID == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  AlarmTableEntry ret=entries.remove(ID);
  if (ret == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  indexWithReduction.remove(ID);
  return ret;
}
Program: 134917
Project: 134917
Buggy source:
/** 
 * Remove the entry for the passed alarm
 * @param alarm The alarm whose entry must be removed
 * @throws AlarmContainerException If the alarm is not in the container
 */
public synchronized void remove(Alarm alarm) throws AlarmContainerException {
  if (alarm == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String ID=alarm.getAlarmId();
  int pos=index.indexOf(ID);
  if (pos < 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  index.remove(pos);
  indexWithReduction.remove(pos);
  AlarmTableEntry oldEntry=entries.remove(ID);
  if (oldEntry == null) {
    throw new IllegalStateException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Remove the entry for the passed alarm
 * @param alarm The alarm whose entry must be removed
 * @throws AlarmContainerException If the alarm is not in the container
 */
public synchronized void remove(Alarm alarm) throws AlarmContainerException {
  if (alarm == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String ID=alarm.getAlarmId();
  int pos=index.indexOf(ID);
  if (pos < 0) {
    throw new AlarmContainerException("String_Node_Str");
  }
  index.remove(pos);
  pos=indexWithReduction.indexOf(ID);
  if (pos >= 0) {
    indexWithReduction.remove(pos);
  }
  AlarmTableEntry oldEntry=entries.remove(ID);
  if (oldEntry == null) {
    throw new IllegalStateException("String_Node_Str");
  }
}
Program: 134918
Project: 134918
Buggy source:
private void stopSample(){
  isStopped=true;
  jStopButton.setEnabled(false);
  startSampleButton.setEnabled(true);
  String header="String_Node_Str";
  for (  DataPrinter i : samplers) {
    i.stopSampling();
    if (i.isComponentAvailable() == true)     toFile.addSamplingSet(i.getSamples());
    header+="String_Node_Str" + i.getComponent() + "String_Node_Str"+ i.getProperty();
  }
  toFile.setHeaderFile(header);
  toFile.dumpToFile(Integer.parseInt(getFreqTextField().getText()));
}

Fixed version (ground truth):
private void stopSample(){
  isStopped=true;
  jStopButton.setEnabled(false);
  startSampleButton.setEnabled(true);
  String header="String_Node_Str";
  toFile.removeSamplingSets();
  for (  DataPrinter i : samplers) {
    i.stopSampling();
    if (i.isComponentAvailable() == true) {
      toFile.addSamplingSet(i.getSamples());
      header+="String_Node_Str" + i.getComponent() + "String_Node_Str"+ i.getProperty();
    }
  }
  toFile.setHeaderFile(header);
  toFile.dumpToFile(Integer.parseInt(getFreqTextField().getText()));
}
Program: 134919
Project: 134919
Buggy source:
/** 
 * This is the default constructor
 */
public BeanGrouper(SamplingSystemGUI ssg){
  super();
  this.ssg=ssg;
  toFile=new FileHelper();
  initialize();
}

Fixed version (ground truth):
/** 
 * This is the overloaded constructor that allows to save the Sampling Group name
 */
public BeanGrouper(SamplingSystemGUI ssg,String group){
  super();
  this.ssg=ssg;
  toFile=new FileHelper();
  toFile.setFilePrefix(group);
  initialize();
}
Program: 134920
Project: 134920
Buggy source:
private JButton getStopButton(){
  if (jStopButton == null) {
    jStopButton=new JButton("String_Node_Str");
    jStopButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      ActionEvent arg0){
        jCloseButton.setEnabled(true);
        stopSample();
        jStopButton.setEnabled(false);
      }
    }
);
  }
  return jStopButton;
}

Fixed version (ground truth):
private JButton getStopButton(){
  if (jStopButton == null) {
    jStopButton=new JButton("String_Node_Str");
    jStopButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      ActionEvent arg0){
        jCloseButton.setEnabled(true);
        stopSample();
        timeSampTextField.setEnabled(true);
        freqTextField.setEnabled(true);
        jStopButton.setEnabled(false);
      }
    }
);
  }
  return jStopButton;
}
Program: 134921
Project: 134921
Buggy source:
private JButton getCloseSamplingButton(){
  if (jCloseButton == null) {
    jCloseButton=new JButton();
    jCloseButton.setText("String_Node_Str");
    jCloseButton.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (!isStopped)         stopSample();
        ssg.deleteFromStatus(samplers,getCheckName());
        Container dad=BeanGrouper.this.getParent();
        dad.remove(BeanGrouper.this);
        dad.repaint();
        dad.validate();
      }
    }
);
  }
  return jCloseButton;
}

Fixed version (ground truth):
private JButton getCloseSamplingButton(){
  if (jCloseButton == null) {
    jCloseButton=new JButton();
    jCloseButton.setText("String_Node_Str");
    jCloseButton.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (!isStopped)         stopSample();
        ssg.deleteFromStatus(samplers,getCheckName());
        Container dad=BeanGrouper.this.getParent();
        dad.remove(BeanGrouper.this);
        dad.repaint();
        dad.validate();
        dad.getParent().validate();
      }
    }
);
  }
  return jCloseButton;
}
Program: 134922
Project: 134922
Buggy source:
public FileHelper(){
  data=new ArrayList<ArrayList<DataItem>>();
}

Fixed version (ground truth):
public FileHelper(String group){
  data=new ArrayList<ArrayList<DataItem>>();
  this.group=group;
}
Program: 134923
Project: 134923
Buggy source:
public void initialize(int freq){
  filename="String_Node_Str" + 10000000L / freq + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
}

Fixed version (ground truth):
public void initialize(int freq){
  if (group == "String_Node_Str")   filename="String_Node_Str" + 10000000L / freq + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
 else   filename=group + "String_Node_Str" + 10000000L / freq + "String_Node_Str" + Calendar.getInstance().getTimeInMillis();
}
Program: 134924
Project: 134924
Buggy source:
public void dumpToFile(long frequency,double prec){
  long timestamp=data.get(0).get(0).getTime();
  boolean done=false;
  frequency=10000000L / frequency;
  long w=(long)(frequency * prec);
  c=new int[data.size()];
  openFile();
  try {
    writer.write(header + "String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  while (!done) {
    String line="String_Node_Str" + timestamp;
    for (int i=0; i < data.size(); i++) {
      if (c[i] == data.get(i).size()) {
        line+="String_Node_Str";
        continue;
      }
      DataItem item=data.get(i).get(c[i]);
      if ((item.getTime() >= (timestamp - w)) && (item.getTime() <= (timestamp + w))) {
        line+="String_Node_Str" + item.getValue();
        c[i]++;
      }
 else       if ((item.getTime() >= (timestamp + w)) && (item.getTime() <= (timestamp + frequency - w))) {
        line+="String_Node_Str";
        c[i]++;
      }
 else       line+="String_Node_Str";
    }
    try {
      writer.write(line + "String_Node_Str");
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    int flag=0;
    for (int i=0; i < c.length; i++) {
      if (c[i] == data.get(i).size())       flag++;
    }
    if (flag == c.length)     done=true;
    timestamp+=frequency;
  }
  try {
    writer.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void dumpToFile(long frequency,double prec){
  long timestamp=data.get(0).get(0).getTime();
  boolean done=false;
  frequency=10000000L / frequency;
  long w=(long)(frequency * prec);
  c=new int[data.size()];
  openFile();
  try {
    writer.write(header + "String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  while (!done) {
    String line="String_Node_Str" + timestamp;
    boolean dataPresent=true;
    for (int i=0; i < data.size(); i++) {
      dataPresent=false;
      if (c[i] == data.get(i).size()) {
        line+="String_Node_Str";
        continue;
      }
      DataItem item=data.get(i).get(c[i]);
      if ((item.getTime() >= (timestamp - w)) && (item.getTime() <= (timestamp + w))) {
        line+="String_Node_Str" + item.getValue();
        c[i]++;
        dataPresent=true;
      }
 else       if ((item.getTime() >= (timestamp + w)) && (item.getTime() <= (timestamp + frequency - w))) {
        line+="String_Node_Str";
        c[i]++;
      }
 else       line+="String_Node_Str";
    }
    try {
      if (dataPresent) {
        writer.write(line + "String_Node_Str");
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    int flag=0;
    for (int i=0; i < c.length; i++) {
      if (c[i] == data.get(i).size())       flag++;
    }
    if (flag == c.length)     done=true;
    timestamp+=frequency;
  }
  try {
    writer.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 134925
Project: 134925
Buggy source:
/** 
 * In memory printer postProcesing do nothing with sampled data stored,  they will be destroyed in object destruction.
 */
public void postProcessing(){
}

Fixed version (ground truth):
/** 
 * In memory printer postProcesing do nothing with sampled data stored,  they will be destroyed in object destruction.
 */
public void postProcessing(){
  widget.resetSampleCount();
}
Program: 134926
Project: 134926
Buggy source:
private boolean addToSampling(String component,String property,String group){
  boolean added;
  BeanGrouper bg=groupExists(group);
  if (bg == null) {
    bg=new BeanGrouper(this);
    bg.setCheckName(group);
    bg.addSamp(component,property);
    jPanel21.add(bg,"String_Node_Str");
    added=true;
  }
 else {
    if (bg.checkIfExists(component,property)) {
      JOptionPane.showMessageDialog(this,"String_Node_Str" + component + "String_Node_Str"+ property+ "String_Node_Str"+ bg.getCheckName(),"String_Node_Str",JOptionPane.WARNING_MESSAGE);
      added=false;
    }
 else {
      bg.addSamp(component,property);
      added=true;
    }
  }
  jPanel21.validate();
  return added;
}

Fixed version (ground truth):
private boolean addToSampling(String component,String property,String group){
  boolean added;
  BeanGrouper bg=groupExists(group);
  if (bg == null) {
    bg=new BeanGrouper(this,group);
    bg.setCheckName(group);
    bg.addSamp(component,property);
    jPanel21.add(bg,"String_Node_Str");
    added=true;
  }
 else {
    if (bg.checkIfExists(component,property)) {
      JOptionPane.showMessageDialog(this,"String_Node_Str" + component + "String_Node_Str"+ property+ "String_Node_Str"+ bg.getCheckName(),"String_Node_Str",JOptionPane.WARNING_MESSAGE);
      added=false;
    }
 else {
      bg.addSamp(component,property);
      added=true;
    }
  }
  jPanel21.validate();
  jScrollPane.validate();
  return added;
}
Program: 134927
Project: 134927
Buggy source:
/** 
 * This method initializes addSampleButton	
 * @return javax.swing.JButton	
 */
private JButton getAddSampleButton(){
  if (addSampleButton == null) {
    addSampleButton=new JButton();
    addSampleButton.setPreferredSize(new Dimension(120,24));
    addSampleButton.setText("String_Node_Str");
    addSampleButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        if (jTextField.getText().equalsIgnoreCase("String_Node_Str"))         return;
        String component=ComponentBox1.getSelectedItem().toString();
        String property=PropertyBox1.getSelectedItem().toString();
        String group=jTextField.getText();
        SerializableProperty p=new SerializableProperty();
        p.setComponent(component);
        p.setProperty(property);
        p.setSamplingGroup(group);
        if (status == null)         status=new ArrayList<SerializableProperty>();
        if (addToSampling(component,property,group))         status.add(p);
      }
    }
);
  }
  return addSampleButton;
}

Fixed version (ground truth):
/** 
 * This method initializes addSampleButton	
 * @return javax.swing.JButton	
 */
private JButton getAddSampleButton(){
  if (addSampleButton == null) {
    addSampleButton=new JButton();
    addSampleButton.setPreferredSize(new Dimension(120,24));
    addSampleButton.setText("String_Node_Str");
    addSampleButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        if (jTextField.getText().trim().equalsIgnoreCase("String_Node_Str"))         return;
        String component=ComponentBox1.getSelectedItem().toString();
        String property=PropertyBox1.getSelectedItem().toString();
        String group=jTextField.getText();
        SerializableProperty p=new SerializableProperty();
        p.setComponent(component);
        p.setProperty(property);
        p.setSamplingGroup(group);
        if (status == null)         status=new ArrayList<SerializableProperty>();
        if (addToSampling(component,property,group))         status.add(p);
      }
    }
);
  }
  return addSampleButton;
}
Program: 134928
Project: 134928
Buggy source:
/** 
 * This method initializes jTextField	
 * @return javax.swing.JTextField	
 */
private JTextField getJTextField(){
  if (jTextField == null) {
    jTextField=new JTextField();
    jTextField.setPreferredSize(new Dimension(100,19));
    jTextField.setToolTipText("String_Node_Str");
    jTextField.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
    jTextField.setHorizontalAlignment(JTextField.CENTER);
    jTextField.setText("String_Node_Str");
  }
  return jTextField;
}

Fixed version (ground truth):
/** 
 * This method initializes jTextField	
 * @return javax.swing.JTextField	
 */
private JTextField getJTextField(){
  if (jTextField == null) {
    jTextField=new JTextField();
    jTextField.setPreferredSize(new Dimension(100,19));
    jTextField.setToolTipText("String_Node_Str");
    jTextField.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
    jTextField.setHorizontalAlignment(JTextField.LEFT);
    jTextField.setText("String_Node_Str");
    jTextField.addFocusListener(new FocusListener(){
      public void focusGained(      FocusEvent e){
      }
      public void focusLost(      FocusEvent e){
        if (!jTextField.getText().matches("String_Node_Str")) {
          JOptionPane.showConfirmDialog(SamplingSystemGUI.this,"String_Node_Str" + jTextField.getText() + "String_Node_Str","String_Node_Str",JOptionPane.PLAIN_MESSAGE,JOptionPane.WARNING_MESSAGE);
          jTextField.setText("String_Node_Str");
          jTextField.grabFocus();
        }
      }
    }
);
  }
  return jTextField;
}
Program: 134929
Project: 134929
Buggy source:
/** 
 * This method initializes jMenuItem	
 * @return javax.swing.JMenuItem	
 */
private JMenuItem getJMenuItem(){
  if (jMenuItem == null) {
    jMenuItem=new JMenuItem();
    jMenuItem.setText("String_Node_Str");
    jMenuItem.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        JFileChooser chooser=new JFileChooser();
        int returnVal=chooser.showSaveDialog(cl.utfsm.samplingSystemUI.SamplingSystemGUI.this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
          writeStatusFile(chooser.getSelectedFile().getAbsolutePath());
        }
      }
    }
);
  }
  return jMenuItem;
}

Fixed version (ground truth):
/** 
 * This method initializes jMenuItem	
 * @return javax.swing.JMenuItem	
 */
private JMenuItem getJMenuItem(){
  if (jMenuItem == null) {
    jMenuItem=new JMenuItem();
    jMenuItem.setText("String_Node_Str");
    jMenuItem.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      java.awt.event.ActionEvent e){
        JFileChooser chooser=new JFileChooser();
        int returnVal=chooser.showSaveDialog(cl.utfsm.samplingSystemUI.SamplingSystemGUI.this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
          writeStatusFile(chooser.getSelectedFile().getAbsolutePath() + "String_Node_Str");
        }
      }
    }
);
  }
  return jMenuItem;
}
Program: 134930
Project: 134930
Buggy source:
private void stopSample(){
  isStopped=true;
  jStopButton.setEnabled(false);
  startSampleButton.setEnabled(true);
  String header="String_Node_Str";
  for (  DataPrinter i : samplers) {
    i.stopSampling();
    if (i.isComponentAvailable() == true)     toFile.addSamplingSet(i.getSamples());
    header+="String_Node_Str" + i.getComponent() + "String_Node_Str"+ i.getProperty();
  }
  toFile.setHeaderFile(header);
  toFile.dumpToFile(Integer.parseInt(getFreqTextField().getText()));
}

Fixed version (ground truth):
private void stopSample(){
  isStopped=true;
  jStopButton.setEnabled(false);
  startSampleButton.setEnabled(true);
  String header="String_Node_Str";
  toFile.removeSamplingSets();
  for (  DataPrinter i : samplers) {
    i.stopSampling();
    if (i.isComponentAvailable() == true) {
      toFile.addSamplingSet(i.getSamples());
      header+="String_Node_Str" + i.getComponent() + "String_Node_Str"+ i.getProperty();
    }
  }
  toFile.setHeaderFile(header);
  toFile.dumpToFile(Integer.parseInt(getFreqTextField().getText()));
}
Program: 134931
Project: 134931
Buggy source:
/** 
 * This is the default constructor
 */
public BeanGrouper(SamplingSystemGUI ssg){
  super();
  this.ssg=ssg;
  toFile=new FileHelper();
  initialize();
}

Fixed version (ground truth):
/** 
 * This is the overloaded constructor that allows to save the Sampling Group name
 */
public BeanGrouper(SamplingSystemGUI ssg,String group){
  super();
  this.ssg=ssg;
  toFile=new FileHelper();
  toFile.setFilePrefix(group);
  initialize();
}
Program: 134932
Project: 134932
Buggy source:
private JButton getStopButton(){
  if (jStopButton == null) {
    jStopButton=new JButton("String_Node_Str");
    jStopButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      ActionEvent arg0){
        jCloseButton.setEnabled(true);
        stopSample();
        jStopButton.setEnabled(false);
      }
    }
);
  }
  return jStopButton;
}

Fixed version (ground truth):
private JButton getStopButton(){
  if (jStopButton == null) {
    jStopButton=new JButton("String_Node_Str");
    jStopButton.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(      ActionEvent arg0){
        jCloseButton.setEnabled(true);
        stopSample();
        timeSampTextField.setEnabled(true);
        freqTextField.setEnabled(true);
        jStopButton.setEnabled(false);
      }
    }
);
  }
  return jStopButton;
}
Program: 134933
Project: 134933
Buggy source:
private JButton getCloseSamplingButton(){
  if (jCloseButton == null) {
    jCloseButton=new JButton();
    jCloseButton.setText("String_Node_Str");
    jCloseButton.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (!isStopped)         stopSample();
        ssg.deleteFromStatus(samplers,getCheckName());
        Container dad=BeanGrouper.this.getParent();
        dad.remove(BeanGrouper.this);
        dad.repaint();
        dad.validate();
      }
    }
);
  }
  return jCloseButton;
}

Fixed version (ground truth):
private JButton getCloseSamplingButton(){
  if (jCloseButton == null) {
    jCloseButton=new JButton();
    jCloseButton.setText("String_Node_Str");
    jCloseButton.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (!isStopped)         stopSample();
        ssg.deleteFromStatus(samplers,getCheckName());
        Container dad=BeanGrouper.this.getParent();
        dad.remove(BeanGrouper.this);
        dad.repaint();
        dad.validate();
        dad.getParent().validate();
      }
    }
);
  }
  return jCloseButton;
}
Program: 134936
Project: 134936
Buggy source:
/** 
 * Logs to the Logger given in   {@link #setInternalLogger(Logger)}, or to System.out if no Logger has been provided.
 */
protected void log(Level level,String msg,Throwable thr){
  if (logger != null) {
    logger.log(level,msg,thr);
  }
 else {
    if (level.intValue() >= getDefaultMinLogLevelLocal().value) {
      Calendar cal=Calendar.getInstance();
      SimpleDateFormat sdf1=new SimpleDateFormat("String_Node_Str");
      SimpleDateFormat sdf2=new SimpleDateFormat("String_Node_Str");
      sdf1.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
      sdf2.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
      System.out.println(sdf1.format(cal.getTime()) + "String_Node_Str" + sdf2.format(cal.getTime())+ "String_Node_Str"+ level.toString()+ "String_Node_Str"+ msg+ (thr != null ? thr.toString() : "String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
/** 
 * Logs to the Logger given in   {@link #setInternalLogger(Logger)}, or to System.out if no Logger has been provided.
 */
protected void log(Level level,String msg,Throwable thr){
  if (logger != null) {
    logger.log(level,msg,thr);
  }
 else {
    if (AcsLogLevel.getNativeLevel(level).getAcsLevel().value >= getDefaultMinLogLevelLocal().value) {
      Calendar cal=Calendar.getInstance();
      SimpleDateFormat sdf1=new SimpleDateFormat("String_Node_Str");
      SimpleDateFormat sdf2=new SimpleDateFormat("String_Node_Str");
      sdf1.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
      sdf2.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
      System.out.println(sdf1.format(cal.getTime()) + "String_Node_Str" + sdf2.format(cal.getTime())+ "String_Node_Str"+ AcsLogLevel.getNativeLevel(level).getAcsLevel().toString()+ "String_Node_Str"+ msg+ (thr != null ? thr.toString() : "String_Node_Str"));
    }
  }
}
Program: 134937
Project: 134937
Buggy source:
/** 
 * Convert the vector of filters to a <code>LogTableRowFilter</code>. <P> The engine and the dialog define filters by means of a vector of filters that has  to be converted before being applied by this sorter. If the vector of filters is null or empty this object is set to <code>null</code>  to improve performances. All the filters defined in the vector are added in AND because this is the way they are defined in the <code>FiltersVector</code>.
 * @param userFilters The user defined vector of filters
 * @return The <code>RowSorter</code> with all the filters in the passed parameter
 */
private void buildTableFilters(FiltersVector userFilters){
  if (userFilters == null || userFilters.isEmpty()) {
    filters=null;
    return;
  }
  int[] activesIndexes=userFilters.getAppliedFiltersIndexes();
  if (activesIndexes != null && activesIndexes.length > 0) {
    filters=new Filter[activesIndexes.length];
    for (int t=0; t < filters.length; t++) {
      filters[t]=userFilters.get(t);
    }
  }
}

Fixed version (ground truth):
/** 
 * Convert the vector of filters to a <code>LogTableRowFilter</code>. <P> The engine and the dialog define filters by means of a vector of filters that has  to be converted before being applied by this sorter. If the vector of filters is null or empty this object is set to <code>null</code>  to improve performances. All the filters defined in the vector are added in AND because this is the way they are defined in the <code>FiltersVector</code>.
 * @param userFilters The user defined vector of filters
 * @return The <code>RowSorter</code> with all the filters in the passed parameter
 */
private void buildTableFilters(FiltersVector userFilters){
  if (userFilters == null || userFilters.isEmpty()) {
    filters=null;
    return;
  }
  int[] activesIndexes=userFilters.getAppliedFiltersIndexes();
  if (activesIndexes != null && activesIndexes.length > 0) {
    filters=new Filter[activesIndexes.length];
    for (int t=0; t < activesIndexes.length; t++) {
      filters[t]=userFilters.get(activesIndexes[t]);
    }
  }
}
Program: 134938
Project: 134938
Buggy source:
/** 
 * Convert the vector of filters to a <code>LogTableRowFilter</code>. <P> The engine and the dialog define filters by means of a vector of filters that has  to be converted before being applied by this sorter. If the vector of filters is null or empty this object is set to <code>null</code>  to improve performances. All the filters defined in the vector are added in AND because this is the way they are defined in the <code>FiltersVector</code>.
 * @param userFilters The user defined vector of filters
 * @return The <code>RowSorter</code> with all the filters in the passed parameter
 */
private void buildTableFilters(FiltersVector userFilters){
  if (userFilters == null || userFilters.isEmpty()) {
    filters=null;
    return;
  }
  int[] activesIndexes=userFilters.getAppliedFiltersIndexes();
  if (activesIndexes != null && activesIndexes.length > 0) {
    filters=new Filter[activesIndexes.length];
    for (int t=0; t < filters.length; t++) {
      filters[t]=userFilters.get(t);
    }
  }
}

Fixed version (ground truth):
/** 
 * Convert the vector of filters to a <code>LogTableRowFilter</code>. <P> The engine and the dialog define filters by means of a vector of filters that has  to be converted before being applied by this sorter. If the vector of filters is null or empty this object is set to <code>null</code>  to improve performances. All the filters defined in the vector are added in AND because this is the way they are defined in the <code>FiltersVector</code>.
 * @param userFilters The user defined vector of filters
 * @return The <code>RowSorter</code> with all the filters in the passed parameter
 */
private void buildTableFilters(FiltersVector userFilters){
  if (userFilters == null || userFilters.isEmpty()) {
    filters=null;
    return;
  }
  int[] activesIndexes=userFilters.getAppliedFiltersIndexes();
  if (activesIndexes != null && activesIndexes.length > 0) {
    filters=new Filter[activesIndexes.length];
    for (int t=0; t < activesIndexes.length; t++) {
      filters[t]=userFilters.get(activesIndexes[t]);
    }
  }
}
Program: 134940
Project: 134940
Buggy source:
/** 
 * Return a set with all the keys of the logs in cache
 * @return The keys of the logs in cache
 */
public Set<Integer> keySet(){
  Set<Integer> keys=super.keySet();
  keys.addAll(buffer.keySet());
  return keys;
}

Fixed version (ground truth):
/** 
 * Return a set with all the keys of the logs in cache
 * @return The keys of the logs in cache
 */
public Set<Integer> keySet(){
  HashSet<Integer> ret=new HashSet<Integer>();
  ret.addAll(super.keySet());
  ret.addAll(buffer.keySet());
  return ret;
}
Program: 134941
Project: 134941
Buggy source:
/** 
 * Return a set with all the keys of the logs in cache
 * @return The keys of the logs in cache
 */
public Set<Integer> keySet(){
  Set<Integer> keys=super.keySet();
  keys.addAll(buffer.keySet());
  return keys;
}

Fixed version (ground truth):
/** 
 * Return a set with all the keys of the logs in cache
 * @return The keys of the logs in cache
 */
public Set<Integer> keySet(){
  HashSet<Integer> ret=new HashSet<Integer>();
  ret.addAll(super.keySet());
  ret.addAll(buffer.keySet());
  return ret;
}
Program: 134942
Project: 134942
Buggy source:
/** 
 * Return a set with all the keys of the logs in cache
 * @return The keys of the logs in cache
 */
public Set<Integer> keySet(){
  Set<Integer> keys=super.keySet();
  keys.addAll(buffer.keySet());
  return keys;
}

Fixed version (ground truth):
/** 
 * Return a set with all the keys of the logs in cache
 * @return The keys of the logs in cache
 */
public Set<Integer> keySet(){
  HashSet<Integer> ret=new HashSet<Integer>();
  ret.addAll(super.keySet());
  ret.addAll(buffer.keySet());
  return ret;
}
Program: 134943
Project: 134943
Buggy source:
protected int getThreadsCount(String[] classes,State state){
  ThreadInfo[] info=tmxb.dumpAllThreads(true,true);
  int threadCount=0;
  for (int i=0; i != info.length; i++) {
    StackTraceElement[] stackElements=info[i].getStackTrace();
    int idx=stackElements.length - 1;
    if (stackElements.length > 0) {
      String cName=stackElements[idx].getClassName();
      if (cName.equals("String_Node_Str")) {
        cName=stackElements[idx - 1].getClassName();
      }
      for (int j=0; j != classes.length; j++)       if (cName.startsWith(classes[j]) && (state == null || info[i].getThreadState() == state)) {
        threadCount++;
        break;
      }
    }
  }
  return threadCount;
}

Fixed version (ground truth):
protected int getThreadsCount(String[] classes,State state){
  ThreadInfo[] info=tmxb.dumpAllThreads(true,true);
  int threadCount=0;
  for (int i=0; i != info.length; i++) {
    StackTraceElement[] stackElements=info[i].getStackTrace();
    int idx=stackElements.length - 1;
    if (stackElements.length > 0) {
      String cName=stackElements[idx].getClassName();
      if (cName.equals("String_Node_Str") && stackElements.length >= 2) {
        cName=stackElements[idx - 1].getClassName();
      }
      for (int j=0; j != classes.length; j++)       if (cName.startsWith(classes[j]) && (state == null || info[i].getThreadState() == state)) {
        threadCount++;
        break;
      }
    }
  }
  return threadCount;
}
Program: 134944
Project: 134944
Buggy source:
/** 
 * @see alma.acs.logging.config.LogConfigSubscriber#configureLogging(alma.acs.logging.LogConfig)
 */
public void configureLogging(LogConfig logConfig){
  if (!logConfig.getCentralizedLogger().equals(logServiceName)) {
    if (logServiceName == null) {
      logServiceName=logConfig.getCentralizedLogger();
    }
 else {
      m_internalLogger.warning("String_Node_Str");
    }
  }
  logQueueLock.lock();
  try {
    if (logQueue != null) {
      flushPeriodSeconds=logConfig.getFlushPeriodSeconds();
      if (logQueue.hasRemoteDispatcher()) {
        logQueue.setPeriodicFlushing(flushPeriodSeconds * 1000);
      }
      logQueue.setMaxQueueSize(logConfig.getMaxLogQueueSize());
    }
  }
  finally {
    logQueueLock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * @see alma.acs.logging.config.LogConfigSubscriber#configureLogging(alma.acs.logging.LogConfig)
 */
public void configureLogging(LogConfig logConfig){
  if (!logConfig.getCentralizedLogger().equals(logServiceName)) {
    if (logServiceName == null) {
      logServiceName=logConfig.getCentralizedLogger();
    }
 else {
      m_internalLogger.warning("String_Node_Str");
    }
  }
  flushPeriodSeconds=logConfig.getFlushPeriodSeconds();
  logQueueLock.lock();
  try {
    if (logQueue != null) {
      if (logQueue.hasRemoteDispatcher()) {
        logQueue.setPeriodicFlushing(flushPeriodSeconds * 1000);
      }
      logQueue.setMaxQueueSize(logConfig.getMaxLogQueueSize());
    }
  }
  finally {
    logQueueLock.unlock();
  }
}
Program: 134946
Project: 134946
Buggy source:
public void faultStateReceived(FaultState faultState){
synchronized (faultStatesReceived) {
    faultStatesReceived.add(faultState);
  }
}

Fixed version (ground truth):
public void faultStateReceived(FaultState faultState){
  assertNotNull(faultState);
synchronized (faultStatesReceived) {
    faultStatesReceived.add(faultState);
    System.out.println("String_Node_Str" + faultState + "String_Node_Str");
  }
}
Program: 134947
Project: 134947
Buggy source:
/** 
 * Test the alarms received in the categories
 * @throws Exception
 */
public void testCategories() throws Exception {
  CategoryClient categoryClient=new CategoryClient(contSvcs);
  assertNotNull(categoryClient);
  categoryClient.connect(this);
  send_alarm(FF,FM,FC,true);
  send_alarm(FF,FM,FC,false);
  long now=System.currentTimeMillis();
  while (numOfAlarmsReceived < 2 && now + TIMEOUT * 1000 > System.currentTimeMillis()) {
    try {
      Thread.sleep(500);
    }
 catch (    Exception e) {
    }
  }
  assertEquals("String_Node_Str",2,alarmsReceived.size());
  Alarm al1=alarmsReceived.get(0);
  assertNotNull(al1);
  assertEquals(al1.getAlarmId(),FF + "String_Node_Str" + FM+ "String_Node_Str"+ FC);
  assertEquals(al1.getProblemDescription(),"String_Node_Str");
  assertFalse(al1.getStatus().isActive());
  assertEquals(al1.getPriority(),Integer.valueOf(2));
  Alarm al2=alarmsReceived.get(1);
  assertNotNull(al2);
  assertEquals(al2.getAlarmId(),FF + "String_Node_Str" + FM+ "String_Node_Str"+ FC);
  assertEquals(al2.getProblemDescription(),"String_Node_Str");
  assertTrue(al2.getStatus().isActive());
  assertEquals(al2.getPriority(),Integer.valueOf(2));
}

Fixed version (ground truth):
/** 
 * Test the alarms received in the categories
 * @throws Exception
 */
public void testCategories() throws Exception {
  send_alarm(FF,FM,FC,true);
  try {
    Thread.sleep(5000);
  }
 catch (  Exception e) {
  }
  send_alarm(FF,FM,FC,false);
  long now=System.currentTimeMillis();
  while (numOfAlarmsReceived < 2 && now + TIMEOUT * 1000 > System.currentTimeMillis()) {
    try {
      Thread.sleep(500);
    }
 catch (    Exception e) {
    }
  }
  assertEquals("String_Node_Str",2,numOfAlarmsReceived);
  Alarm al1=alarmsReceived.get(0);
  System.out.println("String_Node_Str" + al1 + "String_Node_Str");
  assertNotNull(al1);
  assertEquals(al1.getAlarmId(),FF + "String_Node_Str" + FM+ "String_Node_Str"+ FC);
  assertEquals(al1.getProblemDescription(),"String_Node_Str");
  assertTrue(al1.getStatus().isActive());
  assertEquals(al1.getPriority(),Integer.valueOf(2));
  Alarm al2=alarmsReceived.get(1);
  System.out.println("String_Node_Str" + al2 + "String_Node_Str");
  assertNotNull(al2);
  assertEquals(al2.getAlarmId(),FF + "String_Node_Str" + FM+ "String_Node_Str"+ FC);
  assertEquals(al2.getProblemDescription(),"String_Node_Str");
  assertFalse(al2.getStatus().isActive());
  assertEquals(al2.getPriority(),Integer.valueOf(2));
}
Program: 134948
Project: 134948
Buggy source:
/** 
 * @see TestCase
 */
public void setUp() throws Exception {
  super.setUp();
  contSvcs=getContainerServices();
  assertNotNull(contSvcs);
  ACSAlarmSystemInterfaceFactory.init(contSvcs);
  alarmService=AlarmServiceHelper.narrow(contSvcs.getComponent("String_Node_Str"));
  assertNotNull(alarmService);
  faultStatesReceived=new Vector<FaultState>();
  alarmsReceived=new Vector<Alarm>();
  numOfAlarmsReceived=0;
}

Fixed version (ground truth):
/** 
 * @see TestCase
 */
public void setUp() throws Exception {
  super.setUp();
  contSvcs=getContainerServices();
  assertNotNull(contSvcs);
  ACSAlarmSystemInterfaceFactory.init(contSvcs);
  alarmService=AlarmServiceHelper.narrow(contSvcs.getComponent("String_Node_Str"));
  assertNotNull(alarmService);
  faultStatesReceived=new Vector<FaultState>();
  alarmsReceived=new Vector<Alarm>();
  numOfAlarmsReceived=0;
  initClients(contSvcs,this);
  assertNotNull(categoryClient);
  sourceClient=new SourceClient(contSvcs);
  assertNotNull(sourceClient);
  sourceClient.addAlarmListener(this);
  sourceClient.connect();
  alarmsReceived.clear();
  faultStatesReceived.clear();
}
Program: 134949
Project: 134949
Buggy source:
/** 
 * @see AlarmSelectionListener
 */
public void onAlarm(Alarm alarm){
synchronized (alarmsReceived) {
    alarmsReceived.add(alarm);
  }
}

Fixed version (ground truth):
/** 
 * @see AlarmSelectionListener
 */
public void onAlarm(Alarm alarm){
  assertNotNull(alarm);
synchronized (alarmsReceived) {
    alarmsReceived.add(alarm);
    numOfAlarmsReceived++;
    System.out.println("String_Node_Str" + alarm + "String_Node_Str");
  }
}
Program: 134950
Project: 134950
Buggy source:
/** 
 * @see TestCase
 */
public void tearDown() throws Exception {
  contSvcs.releaseComponent(alarmService.name());
  alarmService=null;
  contSvcs=null;
  faultStatesReceived.clear();
  alarmsReceived.clear();
  super.tearDown();
}

Fixed version (ground truth):
/** 
 * @see TestCase
 */
public void tearDown() throws Exception {
  contSvcs.releaseComponent(alarmService.name());
  alarmService=null;
  contSvcs=null;
  faultStatesReceived.clear();
  alarmsReceived.clear();
  sourceClient.close();
  super.tearDown();
}
Program: 134951
Project: 134951
Buggy source:
/** 
 * Helper method that converts an integer log level to the matching enum literal. It suppresses the AcsJIllegalArgumentEx because the level must have been validated during the config init  (and we wouldn't be bothered about exceptions here if we had stored the converted enum literal instead of the castor class)   Therefore just a lame log and runtime ex are thrown, but no AcsJIllegalArgumentEx gets thrown on.
 * @param legalLogLevel
 * @return
 */
private AcsLogLevelDefinition convertLegalLogLevel(int legalLogLevel){
  try {
    return AcsLogLevelDefinition.fromInteger(legalLogLevel);
  }
 catch (  AcsJIllegalArgumentEx ex) {
    logger.warning("String_Node_Str" + loggingConfig.getImmediateDispatchLevel());
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Helper method that converts an integer log level to the matching enum literal. It suppresses the AcsJIllegalArgumentEx because the level must have been validated during the config init  (and we wouldn't be bothered about exceptions here if we had stored the converted enum literal instead of the castor class)   Therefore just a lame log and runtime ex are thrown, but no AcsJIllegalArgumentEx gets thrown on.
 * @param legalLogLevel
 * @return
 */
private AcsLogLevelDefinition convertLegalLogLevel(int legalLogLevel){
  try {
    return AcsLogLevelDefinition.fromInteger(legalLogLevel);
  }
 catch (  AcsJIllegalArgumentEx ex) {
    logger.warning("String_Node_Str" + legalLogLevel);
    throw new RuntimeException(ex);
  }
}
Program: 134952
Project: 134952
Buggy source:
/** 
 * Get the nodes (completion/error) hashtable
 * @return the nodes hashtable
 */
public Hashtable<String,ComplexObject> getNodes(){
  return (nodes);
}

Fixed version (ground truth):
/** 
 * Get the nodes (completion/error) TreeMap
 * @return the nodes TreeMap
 */
public TreeMap<String,ComplexObject> getNodes(){
  return (nodes);
}
Program: 134953
Project: 134953
Buggy source:
/** 
 * Save the data to the selected path 
 */
public void save(){
  Document docFile=new DocumentImpl();
  Element typeElement=docFile.createElement(EbeDocument.getClassType().name);
  fillAttributes(this,typeElement);
  for (  ComplexObject node : nodes.values()) {
    Element nodeElement;
    if (node instanceof Error)     nodeElement=docFile.createElement("String_Node_Str");
 else     nodeElement=docFile.createElement("String_Node_Str");
    fillAttributes(node,nodeElement);
    if (node instanceof Error) {
      Error err=(Error)node;
      for (      ComplexObject memb : err.getMembers().values()) {
        Element membElement=docFile.createElement("String_Node_Str");
        fillAttributes(memb,membElement);
        nodeElement.appendChild(membElement);
      }
    }
    typeElement.appendChild(nodeElement);
  }
  docFile.appendChild(typeElement);
  try {
    saveXmlDocument(docFile,getPath());
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Save the data to the selected path 
 * @throws IOException 
 * @throws FileNotFoundException 
 */
public void save() throws FileNotFoundException, IOException {
  Document docFile=new DocumentImpl();
  Element typeElement=docFile.createElement(EbeDocument.getClassType().name);
  fillAttributes(this,typeElement);
  for (  ComplexObject node : nodes.values()) {
    Element nodeElement;
    if (node instanceof Error)     nodeElement=docFile.createElement("String_Node_Str");
 else     nodeElement=docFile.createElement("String_Node_Str");
    fillAttributes(node,nodeElement);
    if (node instanceof Error) {
      Error err=(Error)node;
      for (      ComplexObject memb : err.getMembers().values()) {
        Element membElement=docFile.createElement("String_Node_Str");
        fillAttributes(memb,membElement);
        nodeElement.appendChild(membElement);
      }
    }
    typeElement.appendChild(nodeElement);
  }
  docFile.appendChild(typeElement);
  saveXmlDocument(docFile,getPath());
}
Program: 134954
Project: 134954
Buggy source:
/** 
 * Initialize a new EbeDocument 
 */
public EbeDocument(){
  super(typeType);
  nodes=new Hashtable<String,ComplexObject>();
}

Fixed version (ground truth):
/** 
 * Initialize a new EbeDocument 
 */
public EbeDocument(){
  super(typeType);
  nodes=new TreeMap<String,ComplexObject>();
}
Program: 134955
Project: 134955
Buggy source:
/** 
 * Reads the schema files, setup classes and init the pool 
 */
public EbeDocumentManager(){
  ErrorBrowserEditor.log("String_Node_Str");
  ErrorBrowserEditor.log("String_Node_Str");
  ErrorBrowserEditor.log("String_Node_Str");
  ErrorBrowserEditor.log("String_Node_Str");
  schema=new ErrorSchema();
  ErrorBrowserEditor.log("String_Node_Str");
  Member.setClassType((AcsComplexType)schema.getType("String_Node_Str"));
  Error.setClassType(schema.getErrorSchema());
  Completion.setClassType(schema.getCompletionSchema());
  EbeDocument.setClassType(schema.getTypeSchema());
  ErrorBrowserEditor.log("String_Node_Str");
  documents=new Hashtable<String,EbeDocument>();
  ErrorBrowserEditor.log("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Reads the schema files, setup classes and init the pool 
 */
public EbeDocumentManager(){
  ErrorBrowserEditor.log("String_Node_Str");
  ErrorBrowserEditor.log("String_Node_Str");
  ErrorBrowserEditor.log("String_Node_Str");
  ErrorBrowserEditor.log("String_Node_Str");
  schema=new ErrorSchema();
  ErrorBrowserEditor.log("String_Node_Str");
  Member.setClassType((AcsComplexType)schema.getType("String_Node_Str"));
  Error.setClassType(schema.getErrorSchema());
  Completion.setClassType(schema.getCompletionSchema());
  EbeDocument.setClassType(schema.getTypeSchema());
  ErrorBrowserEditor.log("String_Node_Str");
  documents=new TreeMap<String,EbeDocument>();
  ErrorBrowserEditor.log("String_Node_Str");
}
Program: 134956
Project: 134956
Buggy source:
/** 
 * Permanently delete from the HD the file
 * @param name the filename to remove 
 */
public void deleteDocument(String name){
  EbeDocument d=documents.get(name);
  File f=new File(d.getPath());
  f.delete();
  documents.remove(name);
  ErrorBrowserEditor.log("String_Node_Str" + name + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Permanently delete from the HD the file
 * @param name the filename to remove 
 */
public void deleteDocument(String name){
  EbeDocument d=documents.get(name);
  File f=new File(d.getPath());
  if (f.delete() == true) {
    documents.remove(name);
    ErrorBrowserEditor.log("String_Node_Str" + name + "String_Node_Str");
  }
 else {
    ErrorBrowserEditor.log("String_Node_Str" + name + "String_Node_Str");
  }
}
Program: 134957
Project: 134957
Buggy source:
/** 
 * Get the document hashtable
 * @return the documents hashtable.
 */
public Hashtable<String,EbeDocument> getDocuments(){
  return documents;
}

Fixed version (ground truth):
/** 
 * Get the document TreeMap
 * @return the documents TreeMap.
 */
public TreeMap<String,EbeDocument> getDocuments(){
  return documents;
}
Program: 134958
Project: 134958
Buggy source:
/** 
 * Load a filelist to the manager.
 * @param lst The Arraylist to load
 */
private void addFileList(ArrayList<File> lst){
  System.out.println("String_Node_Str");
  for (  File file : lst) {
    loadDocument(file.getAbsolutePath());
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Load a filelist to the manager.
 * @param lst The Arraylist to load
 */
private void addFileList(ArrayList<File> lst){
  ErrorBrowserEditor.log("String_Node_Str");
  for (  File file : lst) {
    loadDocument(file.getAbsolutePath());
  }
  ErrorBrowserEditor.log("String_Node_Str");
}
Program: 134959
Project: 134959
Buggy source:
/** 
 * Error Constructor. And initilize members
 */
public Error(){
  super(errorType);
  members=new Hashtable<String,Member>();
}

Fixed version (ground truth):
/** 
 * Error Constructor. And initilize members
 */
public Error(){
  super(errorType);
  members=new TreeMap<String,Member>();
}
Program: 134960
Project: 134960
Buggy source:
/** 
 * Add a member to the hashtable. This includes the member with the name of member value.
 * @param name the member name
 */
public void putMember(Member member){
  members.put(member.getValue(),member);
}

Fixed version (ground truth):
/** 
 * Add a member to the TreeMap. This includes the member with the name of member value.
 * @param name the member name
 */
public void putMember(Member member){
  members.put(member.getValue(),member);
}
Program: 134961
Project: 134961
Buggy source:
/** 
 * Return the members hashtable. 
 * @return the hashtable with the members.
 */
public Hashtable<String,Member> getMembers(){
  return (members);
}

Fixed version (ground truth):
/** 
 * Return the members TreeMap. 
 * @return the TreeMap with the members.
 */
public TreeMap<String,Member> getMembers(){
  return (members);
}