nus-yam/ex-repair huggingface dataset:
Program: 20371
Project: 20371
Buggy source:
private void calculatePriceSellTax(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceSell=readCurrency(m_jPriceSell.getText());
    if (dPriceSell == null) {
      m_jPriceSellTax.setText(null);
    }
 else {
      double dTaxRate=taxeslogic.getTaxRate((TaxCategoryInfo)taxcatmodel.getSelectedItem());
      m_jPriceSellTax.setText(Formats.CURRENCY.formatValue(new Double(dPriceSell.doubleValue() * (1.0 + dTaxRate))));
    }
    reportlock=false;
  }
}

Fixed version (ground truth):
private void calculatePriceSellTax(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceSell=(Double)pricesell;
    if (dPriceSell == null) {
      m_jPriceSellTax.setText(null);
    }
 else {
      double dTaxRate=taxeslogic.getTaxRate((TaxCategoryInfo)taxcatmodel.getSelectedItem());
      m_jPriceSellTax.setText(Formats.CURRENCY.formatValue(new Double(dPriceSell.doubleValue() * (1.0 + dTaxRate))));
    }
    reportlock=false;
  }
}
Program: 20372
Project: 20372
Buggy source:
private void calculatePriceSellfromPST(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceSellTax=readCurrency(m_jPriceSellTax.getText());
    if (dPriceSellTax == null) {
      m_jPriceSell.setText(null);
    }
 else {
      double dTaxRate=taxeslogic.getTaxRate((TaxCategoryInfo)taxcatmodel.getSelectedItem());
      m_jPriceSell.setText(Formats.CURRENCY.formatValue(new Double(dPriceSellTax.doubleValue() / (1.0 + dTaxRate))));
    }
    reportlock=false;
  }
}

Fixed version (ground truth):
private void calculatePriceSellfromPST(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceSellTax=readCurrency(m_jPriceSellTax.getText());
    if (dPriceSellTax == null) {
      setPriceSell(null);
    }
 else {
      double dTaxRate=taxeslogic.getTaxRate((TaxCategoryInfo)taxcatmodel.getSelectedItem());
      setPriceSell(new Double(dPriceSellTax.doubleValue() / (1.0 + dTaxRate)));
    }
    reportlock=false;
  }
}
Program: 20374
Project: 20374
Buggy source:
public void writeValueEOF(){
  reportlock=true;
  m_jTitle.setText(AppLocal.getIntString("String_Node_Str"));
  m_id=null;
  m_jRef.setText(null);
  m_jCode.setText(null);
  m_jName.setText(null);
  m_jComment.setSelected(false);
  m_jScale.setSelected(false);
  m_CategoryModel.setSelectedKey(null);
  taxcatmodel.setSelectedKey(null);
  m_jPriceBuy.setText(null);
  m_jPriceSell.setText(null);
  m_jImage.setImage(null);
  m_jstockcost.setText(null);
  m_jstockvolume.setText(null);
  m_jInCatalog.setSelected(false);
  m_jCatalogOrder.setText(null);
  txtAttributes.setText(null);
  reportlock=false;
  m_jRef.setEnabled(false);
  m_jCode.setEnabled(false);
  m_jName.setEnabled(false);
  m_jComment.setEnabled(false);
  m_jScale.setEnabled(false);
  m_jCategory.setEnabled(false);
  m_jTax.setEnabled(false);
  m_jPriceBuy.setEnabled(false);
  m_jPriceSell.setEnabled(false);
  m_jPriceSellTax.setEnabled(false);
  m_jmargin.setEnabled(false);
  m_jImage.setEnabled(false);
  m_jstockcost.setEnabled(false);
  m_jstockvolume.setEnabled(false);
  m_jInCatalog.setEnabled(false);
  m_jCatalogOrder.setEnabled(false);
  txtAttributes.setEnabled(false);
  calculateMargin();
  calculatePriceSellTax();
}

Fixed version (ground truth):
public void writeValueEOF(){
  reportlock=true;
  m_jTitle.setText(AppLocal.getIntString("String_Node_Str"));
  m_id=null;
  m_jRef.setText(null);
  m_jCode.setText(null);
  m_jName.setText(null);
  m_jComment.setSelected(false);
  m_jScale.setSelected(false);
  m_CategoryModel.setSelectedKey(null);
  taxcatmodel.setSelectedKey(null);
  m_jPriceBuy.setText(null);
  setPriceSell(null);
  m_jImage.setImage(null);
  m_jstockcost.setText(null);
  m_jstockvolume.setText(null);
  m_jInCatalog.setSelected(false);
  m_jCatalogOrder.setText(null);
  txtAttributes.setText(null);
  reportlock=false;
  m_jRef.setEnabled(false);
  m_jCode.setEnabled(false);
  m_jName.setEnabled(false);
  m_jComment.setEnabled(false);
  m_jScale.setEnabled(false);
  m_jCategory.setEnabled(false);
  m_jTax.setEnabled(false);
  m_jPriceBuy.setEnabled(false);
  m_jPriceSell.setEnabled(false);
  m_jPriceSellTax.setEnabled(false);
  m_jmargin.setEnabled(false);
  m_jImage.setEnabled(false);
  m_jstockcost.setEnabled(false);
  m_jstockvolume.setEnabled(false);
  m_jInCatalog.setEnabled(false);
  m_jCatalogOrder.setEnabled(false);
  txtAttributes.setEnabled(false);
  calculateMargin();
  calculatePriceSellTax();
}
Program: 20375
Project: 20375
Buggy source:
private void calculateMargin(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceBuy=readCurrency(m_jPriceBuy.getText());
    Double dPriceSell=readCurrency(m_jPriceSell.getText());
    if (dPriceBuy == null || dPriceSell == null) {
      m_jmargin.setText(null);
    }
 else {
      m_jmargin.setText(Formats.PERCENT.formatValue(new Double(dPriceSell.doubleValue() / dPriceBuy.doubleValue() - 1.0)));
    }
    reportlock=false;
  }
}

Fixed version (ground truth):
private void calculateMargin(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceBuy=readCurrency(m_jPriceBuy.getText());
    Double dPriceSell=(Double)pricesell;
    if (dPriceBuy == null || dPriceSell == null) {
      m_jmargin.setText(null);
    }
 else {
      m_jmargin.setText(Formats.PERCENT.formatValue(new Double(dPriceSell.doubleValue() / dPriceBuy.doubleValue() - 1.0)));
    }
    reportlock=false;
  }
}
Program: 20376
Project: 20376
Buggy source:
private void calculatePriceSellfromMargin(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceBuy=readCurrency(m_jPriceBuy.getText());
    Double dMargin=readPercent(m_jmargin.getText());
    if (dMargin == null || dPriceBuy == null) {
      m_jPriceSell.setText(null);
    }
 else {
      m_jPriceSell.setText(Formats.CURRENCY.formatValue(new Double(dPriceBuy.doubleValue() * (1.0 + dMargin.doubleValue()))));
    }
    reportlock=false;
  }
}

Fixed version (ground truth):
private void calculatePriceSellfromMargin(){
  if (!reportlock) {
    reportlock=true;
    Double dPriceBuy=readCurrency(m_jPriceBuy.getText());
    Double dMargin=readPercent(m_jmargin.getText());
    if (dMargin == null || dPriceBuy == null) {
      setPriceSell(null);
    }
 else {
      setPriceSell(new Double(dPriceBuy.doubleValue() * (1.0 + dMargin.doubleValue())));
    }
    reportlock=false;
  }
}
Program: 20377
Project: 20377
Buggy source:
public Object createValue() throws BasicException {
  Object[] myprod=new Object[16];
  myprod[0]=m_id == null ? UUID.randomUUID().toString() : m_id;
  myprod[1]=m_jRef.getText();
  myprod[2]=m_jCode.getText();
  myprod[3]=m_jName.getText();
  myprod[4]=Boolean.valueOf(m_jComment.isSelected());
  myprod[5]=Boolean.valueOf(m_jScale.isSelected());
  myprod[6]=Formats.CURRENCY.parseValue(m_jPriceBuy.getText());
  myprod[7]=Formats.CURRENCY.parseValue(m_jPriceSell.getText());
  myprod[8]=m_CategoryModel.getSelectedKey();
  myprod[9]=taxcatmodel.getSelectedKey();
  myprod[10]=m_jImage.getImage();
  myprod[11]=Formats.CURRENCY.parseValue(m_jstockcost.getText());
  myprod[12]=Formats.DOUBLE.parseValue(m_jstockvolume.getText());
  myprod[13]=Boolean.valueOf(m_jInCatalog.isSelected());
  myprod[14]=Formats.INT.parseValue(m_jCatalogOrder.getText());
  myprod[15]=Formats.BYTEA.parseValue(txtAttributes.getText());
  return myprod;
}

Fixed version (ground truth):
public Object createValue() throws BasicException {
  Object[] myprod=new Object[16];
  myprod[0]=m_id == null ? UUID.randomUUID().toString() : m_id;
  myprod[1]=m_jRef.getText();
  myprod[2]=m_jCode.getText();
  myprod[3]=m_jName.getText();
  myprod[4]=Boolean.valueOf(m_jComment.isSelected());
  myprod[5]=Boolean.valueOf(m_jScale.isSelected());
  myprod[6]=Formats.CURRENCY.parseValue(m_jPriceBuy.getText());
  myprod[7]=pricesell;
  myprod[8]=m_CategoryModel.getSelectedKey();
  myprod[9]=taxcatmodel.getSelectedKey();
  myprod[10]=m_jImage.getImage();
  myprod[11]=Formats.CURRENCY.parseValue(m_jstockcost.getText());
  myprod[12]=Formats.DOUBLE.parseValue(m_jstockvolume.getText());
  myprod[13]=Boolean.valueOf(m_jInCatalog.isSelected());
  myprod[14]=Formats.INT.parseValue(m_jCatalogOrder.getText());
  myprod[15]=Formats.BYTEA.parseValue(txtAttributes.getText());
  return myprod;
}
Program: 20379
Project: 20379
Buggy source:
private void m_btnBackActionPerformed(java.awt.event.ActionEvent evt){
  this.showParentCategory();
}

Fixed version (ground truth):
private void m_btnBackActionPerformed(java.awt.event.ActionEvent evt){
  showRootCategoriesPanel();
}
Program: 20380
Project: 20380
Buggy source:
protected void fireSelectedProduct(ProductInfoExt prod){
  EventListener[] l=listeners.getListeners(ActionListener.class);
  ActionEvent e=null;
  for (int i=0; i < l.length; i++) {
    if (e == null) {
      e=new ActionEvent(prod,ActionEvent.ACTION_PERFORMED,prod.getID());
    }
    ((ActionListener)l[i]).actionPerformed(e);
  }
}

Fixed version (ground truth):
protected void fireSelectedProduct(ProductInfoExt prod){
  EventListener[] l=listeners.getListeners(ActionListener.class);
  ActionEvent e=null;
  for (int i=0; i < l.length; i++) {
    if (e == null) {
      e=new ActionEvent(prod,ActionEvent.ACTION_PERFORMED,prod.getID());
    }
    ((ActionListener)l[i]).actionPerformed(e);
  }
  this.checkForAuxilar(prod);
}
Program: 20381
Project: 20381
Buggy source:
/** 
 * A method that shows a category a level higher in a categories tree.
 */
private void showParentCategory(){
  int categoryOneLevelHigher=(listOfCategories.size() - 2);
  if (categoryOneLevelHigher < 0) {
    this.showRootCategoriesPanel();
  }
 else {
    selectIndicatorPanel(new ImageIcon(tnbbutton.getThumbNail(listOfCategories.get(categoryOneLevelHigher).getImage())),listOfCategories.get(categoryOneLevelHigher).getName());
    selectCategoryPanel(listOfCategories.get(categoryOneLevelHigher).getID());
    listOfCategories.remove(listOfCategories.size() - 1);
  }
}

Fixed version (ground truth):
/** 
 * A method that shows a category a level higher in a categories tree.
 */
private void showParentCategory(){
  int categoryOneLevelHigher=0;
  if (listOfCategories != null) {
    categoryOneLevelHigher=(listOfCategories.size() - 2);
    if (categoryOneLevelHigher < 0) {
      this.showRootCategoriesPanel();
    }
 else {
      selectIndicatorPanel(new ImageIcon(tnbbutton.getThumbNail(listOfCategories.get(categoryOneLevelHigher).getImage())),listOfCategories.get(categoryOneLevelHigher).getName());
      selectCategoryPanel(listOfCategories.get(categoryOneLevelHigher).getID());
      listOfCategories.remove(listOfCategories.size() - 1);
    }
  }
 else {
    this.showRootCategoriesPanel();
  }
}
Program: 20382
Project: 20382
Buggy source:
private void showSubcategoryPanel(CategoryInfo category){
  if (listOfCategories == null)   listOfCategories=new ArrayList<CategoryInfo>();
  selectIndicatorPanel(new ImageIcon(tnbbutton.getThumbNail(category.getImage())),category.getName());
  selectCategoryPanel(category.getID());
  listOfCategories.add(category);
  showingcategory=category;
}

Fixed version (ground truth):
private void showSubcategoryPanel(CategoryInfo category){
  if (listOfCategories == null)   listOfCategories=new ArrayList<CategoryInfo>();
  selectIndicatorPanel(new ImageIcon(tnbbutton.getThumbNail(category.getImage())),category.getName());
  selectCategoryPanel(category.getID());
  if ((listOfCategories.size() - 1) > 0) {
    if (listOfCategories.get(listOfCategories.size() - 1) != category)     listOfCategories.add(category);
  }
 else   listOfCategories.add(category);
  showingcategory=category;
}
Program: 20384
Project: 20384
Buggy source:
private void m_jEditLineActionPerformed(java.awt.event.ActionEvent evt){
  int i=m_ticketlines.getSelectedIndex();
  if (i < 0) {
    Toolkit.getDefaultToolkit().beep();
  }
 else {
    TicketLineInfo oLine=m_oTicket.getLine(i);
    if (JProductLineEdit.showMessage(this,m_App,m_oTicket.getLine(i))) {
      paintTicketLine(i,oLine);
    }
  }
}

Fixed version (ground truth):
private void m_jEditLineActionPerformed(java.awt.event.ActionEvent evt){
  int i=m_ticketlines.getSelectedIndex();
  if (i < 0) {
    Toolkit.getDefaultToolkit().beep();
  }
 else {
    TicketLineInfo newline=JProductLineEdit.showMessage(this,m_App,m_oTicket.getLine(i));
    if (newline != null) {
      paintTicketLine(i,newline);
    }
  }
}
Program: 20385
Project: 20385
Buggy source:
private boolean init(AppView app,TicketLineInfo oLine){
  initComponents();
  m_oLineTicket=oLine;
  m_oLine=new TicketLineInfo(oLine);
  m_bunitsok=true;
  m_bpriceok=true;
  m_jName.setEnabled(m_oLine.getProductID() == null && app.getAppUserView().getUser().hasPermission("String_Node_Str"));
  m_jPrice.setEnabled(app.getAppUserView().getUser().hasPermission("String_Node_Str"));
  m_jPriceTax.setEnabled(app.getAppUserView().getUser().hasPermission("String_Node_Str"));
  m_jName.setText(m_oLine.getProperty("String_Node_Str"));
  m_jUnits.setValue(oLine.getMultiply());
  m_jPrice.setValue(oLine.getPrice());
  m_jPriceTax.setValue(oLine.getPriceTax());
  m_jTaxrate.setText(oLine.getTaxInfo().getName());
  m_jName.addPropertyChangeListener("String_Node_Str",new RecalculateName());
  m_jUnits.addPropertyChangeListener("String_Node_Str",new RecalculateUnits());
  m_jPrice.addPropertyChangeListener("String_Node_Str",new RecalculatePrice());
  m_jPriceTax.addPropertyChangeListener("String_Node_Str",new RecalculatePriceTax());
  m_jName.addEditorKeys(m_jKeys);
  m_jUnits.addEditorKeys(m_jKeys);
  m_jPrice.addEditorKeys(m_jKeys);
  m_jPriceTax.addEditorKeys(m_jKeys);
  if (m_jName.isEnabled()) {
    m_jName.activate();
  }
 else {
    m_jUnits.activate();
  }
  printTotals();
  getRootPane().setDefaultButton(m_jButtonOK);
  m_bok=false;
  setVisible(true);
  return m_bok;
}

Fixed version (ground truth):
private TicketLineInfo init(AppView app,TicketLineInfo oLine){
  initComponents();
  m_oLine=new TicketLineInfo(oLine);
  m_bunitsok=true;
  m_bpriceok=true;
  m_jName.setEnabled(m_oLine.getProductID() == null && app.getAppUserView().getUser().hasPermission("String_Node_Str"));
  m_jPrice.setEnabled(app.getAppUserView().getUser().hasPermission("String_Node_Str"));
  m_jPriceTax.setEnabled(app.getAppUserView().getUser().hasPermission("String_Node_Str"));
  m_jName.setText(m_oLine.getProperty("String_Node_Str"));
  m_jUnits.setValue(oLine.getMultiply());
  m_jPrice.setValue(oLine.getPrice());
  m_jPriceTax.setValue(oLine.getPriceTax());
  m_jTaxrate.setText(oLine.getTaxInfo().getName());
  m_jName.addPropertyChangeListener("String_Node_Str",new RecalculateName());
  m_jUnits.addPropertyChangeListener("String_Node_Str",new RecalculateUnits());
  m_jPrice.addPropertyChangeListener("String_Node_Str",new RecalculatePrice());
  m_jPriceTax.addPropertyChangeListener("String_Node_Str",new RecalculatePriceTax());
  m_jName.addEditorKeys(m_jKeys);
  m_jUnits.addEditorKeys(m_jKeys);
  m_jPrice.addEditorKeys(m_jKeys);
  m_jPriceTax.addEditorKeys(m_jKeys);
  if (m_jName.isEnabled()) {
    m_jName.activate();
  }
 else {
    m_jUnits.activate();
  }
  printTotals();
  getRootPane().setDefaultButton(m_jButtonOK);
  returnLine=null;
  setVisible(true);
  return returnLine;
}
Program: 20386
Project: 20386
Buggy source:
public static boolean showMessage(Component parent,AppView app,TicketLineInfo oLine){
  Window window=getWindow(parent);
  JProductLineEdit myMsg;
  if (window instanceof Frame) {
    myMsg=new JProductLineEdit((Frame)window,true);
  }
 else {
    myMsg=new JProductLineEdit((Dialog)window,true);
  }
  return myMsg.init(app,oLine);
}

Fixed version (ground truth):
public static TicketLineInfo showMessage(Component parent,AppView app,TicketLineInfo oLine){
  Window window=getWindow(parent);
  JProductLineEdit myMsg;
  if (window instanceof Frame) {
    myMsg=new JProductLineEdit((Frame)window,true);
  }
 else {
    myMsg=new JProductLineEdit((Dialog)window,true);
  }
  return myMsg.init(app,oLine);
}
Program: 20387
Project: 20387
Buggy source:
private void m_jButtonOKActionPerformed(java.awt.event.ActionEvent evt){
  m_oLineTicket.setProperty("String_Node_Str",m_oLine.getProperty("String_Node_Str"));
  m_oLineTicket.setMultiply(m_oLine.getMultiply());
  m_oLineTicket.setPrice(m_oLine.getPrice());
  m_bok=true;
  dispose();
}

Fixed version (ground truth):
private void m_jButtonOKActionPerformed(java.awt.event.ActionEvent evt){
  returnLine=m_oLine;
  dispose();
}
Program: 20388
Project: 20388
Buggy source:
@Override public void clearVisor(){
  display.write(new byte[]{0x10,0x00});
  display.write(trans.transString(DeviceTicket.getWhiteString(20)));
  display.write(new byte[]{0x10,014});
  display.write(trans.transString(DeviceTicket.getWhiteString(20)));
  display.flush();
}

Fixed version (ground truth):
@Override public void clearVisor(){
  display.write(new byte[]{0x10,0x00});
  display.write(trans.transString(DeviceTicket.getWhiteString(20)));
  display.write(new byte[]{0x10,0x14});
  display.write(trans.transString(DeviceTicket.getWhiteString(20)));
  display.flush();
}
Program: 20389
Project: 20389
Buggy source:
public void syncCustomersBefore() throws BasicException {
  new StaticSentence(s,"String_Node_Str").exec();
}

Fixed version (ground truth):
public abstract void syncCustomersBefore() throws BasicException ;
Program: 20390
Project: 20390
Buggy source:
public void syncCustomer(final CustomerInfoExt customer) throws BasicException {
  Transaction t=new Transaction(s){
    public Object transact() throws BasicException {
      if (new PreparedSentence(s,"String_Node_Str",new SerializerWrite(){
        public void writeValues(        DataWrite dp,        Object obj) throws BasicException {
          CustomerInfoExt c=(CustomerInfoExt)obj;
          dp.setString(1,c.getName());
          dp.setString(2,c.getAddress());
          dp.setString(3,c.getId());
        }
      }
).exec(customer) == 0) {
        new PreparedSentence(s,"String_Node_Str",new SerializerWrite(){
          public void writeValues(          DataWrite dp,          Object obj) throws BasicException {
            CustomerInfoExt c=(CustomerInfoExt)obj;
            dp.setString(1,c.getId());
            dp.setString(2,c.getName());
            dp.setString(3,c.getAddress());
          }
        }
).exec(customer);
      }
      return null;
    }
  }
;
  t.execute();
}

Fixed version (ground truth):
public abstract void syncCustomer(final CustomerInfoExt customer) throws BasicException ;
Program: 20391
Project: 20391
Buggy source:
public TicketLineInfo copyTicketLine(){
  TicketLineInfo l=new TicketLineInfo();
  m_sTicket=null;
  m_iLine=-1;
  l.m_dMultiply=m_dMultiply;
  l.m_dPrice=m_dPrice;
  l.tax=tax;
  l.attributes=attributes;
  l.product=product.copyTicketProduct();
  return l;
}

Fixed version (ground truth):
public TicketLineInfo copyTicketLine(){
  TicketLineInfo l=new TicketLineInfo();
  l.m_dMultiply=m_dMultiply;
  l.m_dPrice=m_dPrice;
  l.tax=tax;
  l.attributes=attributes;
  l.product=product.copyTicketProduct();
  return l;
}
Program: 20392
Project: 20392
Buggy source:
public void actionPerformed(ActionEvent e){
  double tendered;
  try {
    tendered=m_jTendered.getValue();
  }
 catch (  BasicException eB) {
    tendered=0.0;
  }
  m_jTendered.setValue(tendered + amount);
  printState();
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  double tendered;
  try {
    tendered=m_jTendered.getValue();
  }
 catch (  BasicException eB) {
    tendered=0.0;
  }
  m_jTendered.setValue(RoundUtils.round(tendered + amount));
  printState();
}
Program: 20393
Project: 20393
Buggy source:
public final SentenceList getCustomerList(){
  return new StaticSentence(s,new QBFBuilder("String_Node_Str",new String[]{"String_Node_Str"}),new SerializerWriteBasic(new Datas[]{Datas.OBJECT,Datas.STRING}),new SerializerRead(){
    public Object readValues(    DataRead dr) throws BasicException {
      return new CustomerInfo(dr.getString(1),dr.getString(2),dr.getString(3));
    }
  }
);
}

Fixed version (ground truth):
public SentenceList getCustomerList(){
  return new StaticSentence(s,new QBFBuilder("String_Node_Str",new String[]{"String_Node_Str"}),new SerializerWriteBasic(new Datas[]{Datas.OBJECT,Datas.STRING}),new SerializerRead(){
    public Object readValues(    DataRead dr) throws BasicException {
      return new CustomerInfo(dr.getString(1),dr.getString(2),dr.getString(3));
    }
  }
);
}
Program: 20395
Project: 20395
Buggy source:
public Object createValue() throws BasicException {
  Object[] payment=new Object[6];
  payment[0]=m_sId == null ? UUID.randomUUID().toString() : m_sId;
  payment[1]=m_App.getActiveCashIndex();
  payment[2]=datenew == null ? new Date() : datenew;
  payment[3]=m_sPaymentId == null ? UUID.randomUUID().toString() : m_sPaymentId;
  payment[4]=m_ReasonModel.getSelectedKey();
  PaymentReason reason=(PaymentReason)m_ReasonModel.getSelectedItem();
  Double dtotal=(Double)Formats.DOUBLE.parseValue(m_jtotal.getText());
  payment[5]=reason == null ? dtotal : reason.addSignum(dtotal);
  return payment;
}

Fixed version (ground truth):
public Object createValue() throws BasicException {
  Object[] payment=new Object[6];
  payment[0]=m_sId == null ? UUID.randomUUID().toString() : m_sId;
  payment[1]=m_App.getActiveCashIndex();
  payment[2]=datenew == null ? new Date() : datenew;
  payment[3]=m_sPaymentId == null ? UUID.randomUUID().toString() : m_sPaymentId;
  payment[4]=m_ReasonModel.getSelectedKey();
  PaymentReason reason=(PaymentReason)m_ReasonModel.getSelectedItem();
  Double dtotal=(Double)Formats.CURRENCY.parseValue(m_jtotal.getText());
  payment[5]=reason == null ? dtotal : reason.addSignum(dtotal);
  return payment;
}
Program: 20396
Project: 20396
Buggy source:
public String toString(){
  return m_sText;
}

Fixed version (ground truth):
@Override public String toString(){
  return m_sText;
}
Program: 20397
Project: 20397
Buggy source:
public void removeActionListener(ActionListener l){
  listeners.add(ActionListener.class,l);
}

Fixed version (ground truth):
public void removeActionListener(ActionListener l){
  listeners.remove(ActionListener.class,l);
}
Program: 20398
Project: 20398
Buggy source:
/** 
 * Creates a new graph or replaces an existing graph.
 * @return A response indicating if a graph was created or replaced.
 * @throws IOException In case of an I/O error. 
 * @throws StorageException In case of an error.
 */
@PUT public Response createGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final boolean wasKnown=graphURI == IStore.DEFAULT_GRAPH || store.containsGraph(graphURI);
  final IGraphInfo info=store.createOrReplaceGraph(graphURI,in,getBaseURI(graphURI),mt);
  if (wasKnown) {
    return noContent();
  }
  if (!_uriInfo.getBaseUriBuilder().path(GraphsResource.class).build().relativize(info.getURI()).isAbsolute()) {
    return created(graphURI);
  }
  return created(_uriInfo.getBaseUriBuilder().path(GraphsResource.class).queryParam("String_Node_Str","String_Node_Str").build(info.getURI()));
}

Fixed version (ground truth):
/** 
 * Creates a new graph or replaces an existing graph.
 * @return A response indicating if a graph was created or replaced.
 * @throws IOException In case of an I/O error. 
 * @throws UnsupportedMediaTypeException In case the media type could not be read.
 * @throws StoreException In case of an error.
 */
@PUT public Response createGraph(InputStream in,@Context HttpHeaders header) throws IOException, UnsupportedMediaTypeException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final boolean wasKnown=graphURI == IStore.DEFAULT_GRAPH || store.containsGraph(graphURI);
  final IGraphInfo info=store.createOrReplaceGraph(graphURI,in,getBaseURI(graphURI),mt);
  if (wasKnown) {
    return noContent();
  }
  if (!_uriInfo.getBaseUriBuilder().path(GraphsResource.class).build().relativize(info.getURI()).isAbsolute()) {
    return created(graphURI);
  }
  return created(_uriInfo.getBaseUriBuilder().path(GraphsResource.class).queryParam("String_Node_Str","String_Node_Str").build(info.getURI()));
}
Program: 20399
Project: 20399
Buggy source:
/** 
 * Checks if a graph exists.
 * @return A response with graph metadata.
 * @throws StorageException In case of an error.
 */
@HEAD public Response getGraphInfo() throws StoreException {
  return makeResponseBuilder(getStore().getGraphInfo(getGraphURI())).build();
}

Fixed version (ground truth):
/** 
 * Checks if a graph exists.
 * @return A response with graph metadata.
 * @throws GraphNotExistsException In case the graph does not exist. 
 * @throws StorageException In case of an error.
 */
@HEAD public Response getGraphInfo() throws GraphNotExistsException, StoreException {
  final IGraphInfo graph=getStore().getGraphInfo(getGraphURI());
  @SuppressWarnings("String_Node_Str") final MediaType mt=getMediaType(graph.getSupportedMediaTypes());
  return makeResponseBuilder(graph).build();
}
Program: 20400
Project: 20400
Buggy source:
/** 
 * Creates a new graph or updates an existing graph.
 * @return A response indicating if a graph was created or updated.
 * @throws IOException In case of an I/O error.
 * @throws StorageException In case of an error.
 */
@POST public Response createOrUpdateGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final URI base=getBaseURI(graphURI);
  final IGraphInfo info=graphURI == null ? store.createGraph(in,base,mt) : store.updateGraph(graphURI,in,base,mt);
  return graphURI == null ? created(info.getURI()) : noContent();
}

Fixed version (ground truth):
/** 
 * Creates a new graph or updates an existing graph.
 * @return A response indicating if a graph was created or updated.
 * @throws UnsupportedMediaTypeException In case the media type isn't supported. 
 * @throws IOException In case of an I/O error.
 * @throws StorageException In case of an error.
 */
@POST public Response createOrUpdateGraph(InputStream in,@Context HttpHeaders header) throws UnsupportedMediaTypeException, IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final URI base=getBaseURI(graphURI);
  final IGraphInfo info=graphURI == null ? store.createGraph(in,base,mt) : store.updateGraph(graphURI,in,base,mt);
  return graphURI == null ? created(info.getURI()) : noContent();
}
Program: 20401
Project: 20401
Buggy source:
/** 
 * Writes a graph.
 * @return A graph serialization.
 * @throws IOException In case of an I/O error.
 * @throws StorageException In case of an error.
 */
@GET public Response getGraph() throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final IGraphInfo graph=store.getGraphInfo(graphURI);
  final MediaType mt=getMediaType(graph.getSupportedMediaTypes());
  return buildStreamingEntity(makeResponseBuilder(graph),store.getGraph(graphURI,mt));
}

Fixed version (ground truth):
/** 
 * Writes a graph.
 * @return A graph serialization.
 * @throws IOException In case of an I/O error.
 * @throws GraphNotExistsException In case the graph does not exist. 
 * @throws StorageException In case of an error.
 */
@GET public Response getGraph() throws IOException, GraphNotExistsException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final IGraphInfo graph=store.getGraphInfo(graphURI);
  final MediaType mt=getMediaType(graph.getSupportedMediaTypes());
  return buildStreamingEntity(makeResponseBuilder(graph),store.getGraph(graphURI,mt));
}
Program: 20402
Project: 20402
Buggy source:
/** 
 * Modifies a graph.
 * @return A response indicating if the graph was modified successfully.
 * @throws StorageException In case of an error.
 */
@PATCH public Response modifyGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  return getStore().modifyGraph(graphURI,in,getBaseURI(graphURI),mt) ? noContent() : badRequest();
}

Fixed version (ground truth):
/** 
 * Modifies a graph.
 * @return A response indicating if the graph was modified successfully.
 * @throws QueryException In case of a query error, i.e. syntax error.
 * @throws UnsupportedMediaTypeException In case the media type isn't supported. 
 * @throws GraphMismatchException In case the query utilizes a different graph as the requested graph.
 * @throws StorageException In case of an error.
 */
@PATCH public Response modifyGraph(InputStream in,@Context HttpHeaders header) throws IOException, GraphMismatchException, UnsupportedMediaTypeException, QueryException, StoreException {
  final URI graphURI=getGraphURI();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  return getStore().modifyGraph(graphURI,in,getBaseURI(graphURI),mt) ? noContent() : badRequest();
}
Program: 20403
Project: 20403
Buggy source:
/** 
 * Deletes a graph.
 * @return A response indicating if the graph was removed immediately or deletion is scheduled.
 * @throws IOException In case of an I/O error.
 * @throws StorageException In case of an error.
 */
@DELETE public Response deleteGraph() throws IOException, StoreException {
  return getStore().deleteGraph(getGraphURI()) == RemovalStatus.DELAYED ? accepted() : noContent();
}

Fixed version (ground truth):
/** 
 * Deletes a graph.
 * @return A response indicating if the graph was removed immediately or deletion is scheduled.
 * @throws IOException In case of an I/O error.
 * @throws GraphNotExistsException In case the graph does not exist. 
 * @throws StorageException In case of an error.
 */
@DELETE public Response deleteGraph() throws IOException, GraphNotExistsException, StoreException {
  return getStore().deleteGraph(getGraphURI()) == RemovalStatus.DELAYED ? accepted() : noContent();
}
Program: 20404
Project: 20404
Buggy source:
@Override public Response toResponse(UnsupportedMediaTypeException ex){
  return Response.status(Response.Status.NOT_ACCEPTABLE).header("String_Node_Str","String_Node_Str").build();
}

Fixed version (ground truth):
@Override public Response toResponse(UnsupportedMediaTypeException ex){
  return Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).build();
}
Program: 20405
Project: 20405
Buggy source:
/** 
 * Creates a new graph or replaces an existing graph.
 * @return A response indicating if a graph was created or replaced.
 * @throws IOException In case of an I/O error. 
 * @throws StorageException In case of an error.
 */
@PUT public Response createGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final boolean wasKnown=graphURI == IStore.DEFAULT_GRAPH || store.containsGraph(graphURI);
  final IGraphInfo info=store.createOrReplaceGraph(graphURI,in,getBaseURI(graphURI),mt);
  if (wasKnown) {
    return noContent();
  }
  if (!_uriInfo.getBaseUri().relativize(info.getURI()).isAbsolute()) {
    return created(graphURI);
  }
  return created(_uriInfo.getBaseUriBuilder().path(ServiceResource.class).queryParam("String_Node_Str","String_Node_Str").build(info.getURI()));
}

Fixed version (ground truth):
/** 
 * Creates a new graph or replaces an existing graph.
 * @return A response indicating if a graph was created or replaced.
 * @throws IOException In case of an I/O error. 
 * @throws StorageException In case of an error.
 */
@PUT public Response createGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final boolean wasKnown=graphURI == IStore.DEFAULT_GRAPH || store.containsGraph(graphURI);
  final IGraphInfo info=store.createOrReplaceGraph(graphURI,in,getBaseURI(graphURI),mt);
  if (wasKnown) {
    return noContent();
  }
  if (!_uriInfo.getBaseUriBuilder().path(GraphsResource.class).build().relativize(info.getURI()).isAbsolute()) {
    return created(graphURI);
  }
  return created(_uriInfo.getBaseUriBuilder().path(ServiceResource.class).queryParam("String_Node_Str","String_Node_Str").build(info.getURI()));
}
Program: 20406
Project: 20406
Buggy source:
/** 
 * Creates a new graph or replaces an existing graph.
 * @return A response indicating if a graph was created or replaced.
 * @throws IOException In case of an I/O error. 
 * @throws StorageException In case of an error.
 */
@PUT public Response createGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final boolean wasKnown=store.containsGraph(graphURI);
  final IGraphInfo info=store.createOrReplaceGraph(graphURI,in,getBaseURI(graphURI),mt);
  return wasKnown ? noContent() : created(info.getURI());
}

Fixed version (ground truth):
/** 
 * Creates a new graph or replaces an existing graph.
 * @return A response indicating if a graph was created or replaced.
 * @throws IOException In case of an I/O error. 
 * @throws StorageException In case of an error.
 */
@PUT public Response createGraph(InputStream in,@Context HttpHeaders header) throws IOException, StoreException {
  final URI graphURI=getGraphURI();
  final IStore store=getStore();
  final MediaType mt=MediaTypeUtils.toMediaType(header.getMediaType());
  final boolean wasKnown=graphURI == IStore.DEFAULT_GRAPH || store.containsGraph(graphURI);
  final IGraphInfo info=store.createOrReplaceGraph(graphURI,in,getBaseURI(graphURI),mt);
  if (wasKnown) {
    return noContent();
  }
  if (!_uriInfo.getBaseUri().relativize(info.getURI()).isAbsolute()) {
    return created(graphURI);
  }
  return created(_uriInfo.getBaseUriBuilder().path(ServiceResource.class).queryParam("String_Node_Str","String_Node_Str").build(info.getURI()));
}
Program: 20408
Project: 20408
Buggy source:
@Test public void deviceQueryTest(){
}

Fixed version (ground truth):
@Test public void deviceQueryTest(){
  JOCLDeviceQuery.runJOCLDeviceQuery();
}
Program: 20409
Project: 20409
Buggy source:
@Test public void OpenCL_1_0_Test(){
}

Fixed version (ground truth):
@Test public void OpenCL_1_0_Test(){
  JOCLSample.runJOCL_1_0_Sample();
}
Program: 20410
Project: 20410
Buggy source:
@Test public void OpenCL_1_1_CPU_Test(){
}

Fixed version (ground truth):
@Test @Ignore("String_Node_Str") public void OpenCL_1_1_CPU_Test(){
}
Program: 20411
Project: 20411
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  Rule other=(Rule)obj;
  if (conditionalPart == null) {
    if (other.conditionalPart != null)     return false;
  }
 else   if (!smartEquals(conditionalPart,other.conditionalPart))   return false;
  if (confidance != other.confidance)   return false;
  if (exectuivePart == null) {
    if (other.exectuivePart != null)     return false;
  }
 else   if (!smartEquals(exectuivePart,other.exectuivePart))   return false;
  if (id != other.id)   return false;
  if (support != other.support)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  Rule other=(Rule)obj;
  if (conditionalPart == null) {
    if (other.conditionalPart != null)     return false;
  }
 else   if (!smartEquals(conditionalPart,other.conditionalPart))   return false;
  if (confidance != other.confidance)   return false;
  if (exectuivePart == null) {
    if (other.exectuivePart != null)     return false;
  }
 else   if (!smartEquals(exectuivePart,other.exectuivePart))   return false;
  if (support != other.support)   return false;
  return true;
}
Program: 20412
Project: 20412
Buggy source:
@Override public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  for (int i=0; i < this.numberOfAttributes; i++) {
    String chunk=Integer.toBinaryString(this.attributeVector[i]);
    builder.append("String_Node_Str" + i);
    builder.append(chunk);
    builder.append('\n');
  }
  return builder.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  for (int i=0; i < this.attributeVector.length; i++) {
    char[] chunk=BinaryItemSet.getBinaryString(this.attributeVector[i]);
    builder.append("String_Node_Str" + i + "String_Node_Str");
    builder.append(chunk);
    builder.append('\n');
  }
  return builder.toString();
}
Program: 20413
Project: 20413
Buggy source:
public List<Rule> getRules(BinaryItemSet itemSet,double minCredibility,SortedMap<BinaryItemSet,Integer> frequentSet){
  List<Rule> itemSetRules=new LinkedList<Rule>();
  int suportXY=frequentSet.get(itemSet);
  for (  char elements : itemSet.getAttributeVector()) {
    int count=bitcount(elements);
    if (count == 0 || count == 1)     return itemSetRules;
  }
  Collection<BinaryItemSet> vetoSets=new LinkedList<BinaryItemSet>();
  Collection<BinaryItemSet> nextSets=BinaryItemSet.divideSet(itemSet);
  for (int i=0; i < itemSet.getAttributeVector().length * 16; i++) {
    List<BinaryItemSet> smallerSets=new LinkedList<BinaryItemSet>(nextSets);
    nextSets.clear();
    for (    BinaryItemSet currentSet : smallerSets) {
      int supportX=frequentSet.get(currentSet);
      double confidanceXY=suportXY / (double)supportX;
      if (confidanceXY >= minCredibility) {
        Rule rule=createRuleFromItemSet(itemSet,currentSet,confidanceXY,suportXY);
        itemSetRules.add(rule);
        Collection<BinaryItemSet> sets=BinaryItemSet.divideSet(currentSet);
        if (sets.size() != 0)         nextSets.addAll(sets);
      }
 else {
        Collection<BinaryItemSet> sets=BinaryItemSet.divideSet(currentSet);
        if (sets.size() != 0)         vetoSets.addAll(sets);
      }
    }
  }
  return itemSetRules;
}

Fixed version (ground truth):
public List<Rule> getRules(BinaryItemSet itemSet,double minCredibility,SortedMap<BinaryItemSet,Integer> frequentSet){
  List<Rule> itemSetRules=new LinkedList<Rule>();
  int suportXY=frequentSet.get(itemSet);
  int count=0;
  for (  char elements : itemSet.getAttributeVector()) {
    count+=BinaryItemSet.bitcount(elements);
  }
  if (count == 0 || count == 1)   return itemSetRules;
  Collection<BinaryItemSet> vetoSets=new LinkedList<BinaryItemSet>();
  Collection<BinaryItemSet> nextSets=BinaryItemSet.divideSet(itemSet);
  for (int i=0; i < itemSet.getAttributeVector().length * 16; i++) {
    List<BinaryItemSet> smallerSets=new LinkedList<BinaryItemSet>(nextSets);
    nextSets.clear();
    for (    BinaryItemSet currentSet : smallerSets) {
      int supportX=frequentSet.get(currentSet);
      double confidanceXY=suportXY / (double)supportX;
      if (confidanceXY >= minCredibility) {
        Rule rule=createRuleFromItemSet(itemSet,currentSet,confidanceXY,suportXY);
        itemSetRules.add(rule);
        Collection<BinaryItemSet> sets=BinaryItemSet.divideSet(currentSet);
        if (sets.size() != 0)         nextSets.addAll(sets);
      }
 else {
        Collection<BinaryItemSet> sets=BinaryItemSet.divideSet(currentSet);
        if (sets.size() != 0)         vetoSets.addAll(sets);
      }
    }
  }
  return itemSetRules;
}
Program: 20414
Project: 20414
Buggy source:
public Rule createRuleFromItemSet(BinaryItemSet itemSet,BinaryItemSet currentSet,double confidance,int suportXY){
  if (itemSet.getNumberOfAttributes() == 0 || currentSet.getNumberOfAttributes() == 0)   throw new RuntimeException("String_Node_Str");
  List<Integer> condPart=new LinkedList<Integer>();
  List<Integer> exePart=new LinkedList<Integer>();
  char[] vectorAll=itemSet.getAttributeVector();
  char[] vectorPremise=currentSet.getAttributeVector();
  for (int i=0; i < vectorPremise.length; i++) {
    char[] binaryAll=getBinaryString(vectorAll[i]);
    char[] binaryPremise=getBinaryString(vectorPremise[i]);
    for (int j=0; j < binaryAll.length; j++) {
      if (binaryAll[j] == '1') {
        Integer value=16 * i + j + 1;
        if (binaryPremise[j] == '1') {
          condPart.add(value);
        }
 else {
          exePart.add(value);
        }
      }
 else {
        if (binaryPremise[j] == '1')         throw new RuntimeException("String_Node_Str");
      }
    }
  }
  Rule rule=new Rule(this.ruleCounter++,condPart,exePart,(int)(confidance * 100),suportXY);
  return rule;
}

Fixed version (ground truth):
public Rule createRuleFromItemSet(BinaryItemSet itemSet,BinaryItemSet currentSet,double confidance,int suportXY){
  if (itemSet.getNumberOfAttributes() == 0 || currentSet.getNumberOfAttributes() == 0)   throw new RuntimeException("String_Node_Str");
  List<Integer> condPart=new LinkedList<Integer>();
  List<Integer> exePart=new LinkedList<Integer>();
  char[] vectorAll=itemSet.getAttributeVector();
  char[] vectorPremise=currentSet.getAttributeVector();
  for (int i=0; i < vectorPremise.length; i++) {
    char[] binaryAll=BinaryItemSet.getBinaryString(vectorAll[i]);
    char[] binaryPremise=BinaryItemSet.getBinaryString(vectorPremise[i]);
    for (int j=0; j < binaryAll.length; j++) {
      if (binaryAll[j] == '1') {
        Integer value=16 * i + j + 1;
        if (binaryPremise[j] == '1') {
          condPart.add(value);
        }
 else {
          exePart.add(value);
        }
      }
 else {
        if (binaryPremise[j] == '1')         throw new RuntimeException("String_Node_Str");
      }
    }
  }
  Rule rule=new Rule(this.ruleCounter++,condPart,exePart,(int)(confidance * 100),suportXY);
  return rule;
}
Program: 20416
Project: 20416
Buggy source:
public ProductionAlgorithmFactory(){
  algorithms=new LinkedList<IAlgorithm>();
  algorithms.add(new WekaAlgorithm());
  algorithms.add(new AprioriNST());
  algorithms.add(new BinaryApriori(new BinaryRuleEngine(),new BinarySetsEngine(),1));
  InjectableSetsEngine setsEngine=new InjectableSetsEngine(new BinarySetsEngine(),new JOCLSetsEngine());
  algorithms.add(new BinaryApriori(new BinaryRuleEngine(),setsEngine,4));
}

Fixed version (ground truth):
public ProductionAlgorithmFactory(){
  algorithms=new LinkedList<IAlgorithm>();
  algorithms.add(new WekaAlgorithm());
  algorithms.add(new AprioriNST());
  algorithms.add(new BinaryApriori(new BinaryRuleEngine(),new BinarySetsEngine(),1));
  InjectableSetsEngine setsEngine=new InjectableSetsEngine(new BinarySetsEngine(),new JOCLSetsEngine());
}
Program: 20417
Project: 20417
Buggy source:
private void showRulesDifferences(List<Rule> result,List<Rule> expectedRules){
  System.err.println("String_Node_Str");
  for (  Rule r : result) {
    System.out.println(r);
  }
  System.err.flush();
  System.err.println("String_Node_Str");
  for (  Rule r : expectedRules) {
    System.out.println(r);
  }
  System.err.flush();
}

Fixed version (ground truth):
private void showRulesDifferences(List<Rule> result,List<Rule> expectedRules){
  System.err.println("String_Node_Str");
  for (  Rule r : result) {
    System.err.println(r);
  }
  System.err.flush();
  System.err.println("String_Node_Str");
  for (  Rule r : expectedRules) {
    System.err.println(r);
  }
  System.err.flush();
}
Program: 20418
Project: 20418
Buggy source:
@Override protected void startSetGeneration(DataRepresentationBase data,double minSupport,double minCredibility){
  this.minSupport=minSupport;
  this.minCredibility=minCredibility;
  this.supportThreshold=(int)Math.ceil(data.getTransactionsList().size() * minSupport);
  SortedMap<BinaryItemSet,Integer> frequentSuppMap=this.binaryEngine.getSingleCandidateSets(data,supportThreshold);
  Set<BinaryItemSet> approvedCandidates=frequentSuppMap.keySet();
  int generation=0;
  while (true) {
    Set<BinaryItemSet> candidates=this.binaryEngine.getCandidateSets(approvedCandidates,generation++);
    SortedMap<BinaryItemSet,Integer> candidatesAccepted=this.binaryEngine.verifyCandidatesInData(data,candidates,supportThreshold);
    approvedCandidates=candidatesAccepted.keySet();
    frequentSuppMap.putAll(candidatesAccepted);
    if (approvedCandidates.size() == 0)     break;
  }
  frequentSet=frequentSuppMap;
}

Fixed version (ground truth):
@Override protected void startSetGeneration(DataRepresentationBase data,double minSupport,double minCredibility){
  this.minSupport=minSupport;
  this.minCredibility=minCredibility;
  this.supportThreshold=(int)Math.ceil(data.getTransactionsList().size() * minSupport);
  SortedMap<BinaryItemSet,Integer> frequentSuppMap=this.binaryEngine.getSingleCandidateSets(data,supportThreshold);
  Set<BinaryItemSet> approvedCandidates=frequentSuppMap.keySet();
  int generation=1;
  while (true) {
    Set<BinaryItemSet> candidates=this.binaryEngine.getCandidateSets(approvedCandidates,++generation);
    SortedMap<BinaryItemSet,Integer> candidatesAccepted=this.binaryEngine.verifyCandidatesInData(data,candidates,supportThreshold);
    approvedCandidates=candidatesAccepted.keySet();
    frequentSuppMap.putAll(candidatesAccepted);
    if (approvedCandidates.size() == 0)     break;
  }
  frequentSet=frequentSuppMap;
}
Program: 20419
Project: 20419
Buggy source:
/** 
 * Get the number of '1' in the binary representation number.
 * @param n : number to be looked into.
 * @return the number of '1' in the binary representation.
 */
private int bitcount(char n){
  int count=0;
  while (n == 0) {
    count+=n & 0x1;
    n<<=1;
  }
  return count;
}

Fixed version (ground truth):
/** 
 * Get the number of '1' in the binary representation number.
 * @param n : number to be looked into.
 * @return the number of '1' in the binary representation.
 */
private int bitcount(char x){
  int result=0;
  for (int i=0; i < 16; i++) {
    result+=x & 1;
    x>>>=1;
  }
  return result;
}