nus-yam/ex-repair huggingface dataset:
Program: 20325
Project: 20325
Buggy source:
public MessageInf execute() throws BasicException {
  try {
    if (externalsales == null) {
      externalsales=new ExternalSalesHelper(dlsystem);
    }
    List<TicketInfo> ticketlist=dlintegration.getTickets();
    for (    TicketInfo ticket : ticketlist) {
      ticket.setLines(dlintegration.getTicketLines(ticket.getId()));
      ticket.setPayments(dlintegration.getTicketPayments(ticket.getId()));
    }
    if (ticketlist.size() == 0) {
      return new MessageInf(MessageInf.SGN_NOTICE,AppLocal.getIntString("String_Node_Str"));
    }
 else {
      Order[] orders=transformTickets(ticketlist);
      externalsales.uploadOrders(orders);
      dlintegration.execTicketUpdate();
      return new MessageInf(MessageInf.SGN_SUCCESS,AppLocal.getIntString("String_Node_Str"),AppLocal.getIntString("String_Node_Str",orders.length));
    }
  }
 catch (  ServiceException e) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"),e);
  }
catch (  RemoteException e) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"),e);
  }
catch (  MalformedURLException e) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"),e);
  }
}

Fixed version (ground truth):
public MessageInf execute() throws BasicException {
  try {
    if (externalsales == null) {
      externalsales=new ExternalSalesHelper(dlsystem);
    }
    List<TicketInfo> ticketlist=dlintegration.getTickets();
    for (    TicketInfo ticket : ticketlist) {
      ticket.setLines(dlintegration.getTicketLines(ticket.getId()));
      ticket.setPayments(dlintegration.getTicketPayments(ticket.getId()));
    }
    if (ticketlist.size() == 0) {
      return new MessageInf(MessageInf.SGN_NOTICE,AppLocal.getIntString("String_Node_Str"));
    }
 else {
      Order[] orders=transformTickets(ticketlist);
      if (!externalsales.uploadOrders(orders))       throw new BasicException(AppLocal.getIntString("String_Node_Str"));
      dlintegration.execTicketUpdate();
      return new MessageInf(MessageInf.SGN_SUCCESS,AppLocal.getIntString("String_Node_Str"),AppLocal.getIntString("String_Node_Str",orders.length));
    }
  }
 catch (  ServiceException e) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"),e);
  }
catch (  RemoteException e) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"),e);
  }
catch (  MalformedURLException e) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"),e);
  }
}
Program: 20326
Project: 20326
Buggy source:
public void uploadOrders(java.lang.String clientID,java.lang.String organizationId,java.lang.String salesChannel,com.openbravo.ws.externalsales.Order[] newOrders,java.lang.String username,java.lang.String password) throws java.rmi.RemoteException ;

Fixed version (ground truth):
public boolean uploadOrders(java.lang.String clientID,java.lang.String organizationId,java.lang.String salesChannel,com.openbravo.ws.externalsales.Order[] newOrders,java.lang.String username,java.lang.String password) throws java.rmi.RemoteException ;
Program: 20327
Project: 20327
Buggy source:
public void uploadOrders(java.lang.String clientID,java.lang.String organizationId,java.lang.String salesChannel,com.openbravo.ws.externalsales.Order[] newOrders,java.lang.String username,java.lang.String password) throws java.rmi.RemoteException {
  if (super.cachedEndpoint == null) {
    throw new org.apache.axis.NoEndPointException();
  }
  org.apache.axis.client.Call _call=createCall();
  _call.setOperation(_operations[2]);
  _call.setUseSOAPAction(true);
  _call.setSOAPActionURI("String_Node_Str");
  _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
  _call.setOperationName(new javax.xml.namespace.QName("String_Node_Str","String_Node_Str"));
  setRequestHeaders(_call);
  setAttachments(_call);
  try {
    java.lang.Object _resp=_call.invoke(new java.lang.Object[]{clientID,organizationId,salesChannel,newOrders,username,password});
    if (_resp instanceof java.rmi.RemoteException) {
      throw (java.rmi.RemoteException)_resp;
    }
    extractAttachments(_call);
  }
 catch (  org.apache.axis.AxisFault axisFaultException) {
    throw axisFaultException;
  }
}

Fixed version (ground truth):
public boolean uploadOrders(java.lang.String clientID,java.lang.String organizationId,java.lang.String salesChannel,com.openbravo.ws.externalsales.Order[] newOrders,java.lang.String username,java.lang.String password) throws java.rmi.RemoteException {
  if (super.cachedEndpoint == null) {
    throw new org.apache.axis.NoEndPointException();
  }
  org.apache.axis.client.Call _call=createCall();
  _call.setOperation(_operations[2]);
  _call.setUseSOAPAction(true);
  _call.setSOAPActionURI("String_Node_Str");
  _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
  _call.setOperationName(new javax.xml.namespace.QName("String_Node_Str","String_Node_Str"));
  setRequestHeaders(_call);
  setAttachments(_call);
  try {
    java.lang.Object _resp=_call.invoke(new java.lang.Object[]{clientID,organizationId,salesChannel,newOrders,username,password});
    if (_resp instanceof java.rmi.RemoteException) {
      throw (java.rmi.RemoteException)_resp;
    }
 else {
      extractAttachments(_call);
      try {
        return ((java.lang.Boolean)_resp).booleanValue();
      }
 catch (      java.lang.Exception _exception) {
        return ((java.lang.Boolean)org.apache.axis.utils.JavaUtils.convert(_resp,boolean.class)).booleanValue();
      }
    }
  }
 catch (  org.apache.axis.AxisFault axisFaultException) {
    throw axisFaultException;
  }
}
Program: 20329
Project: 20329
Buggy source:
public void setActiveTicket(TicketInfo oTicket,Object oTicketExt){
  m_oTicket=oTicket;
  m_oTicketExt=oTicketExt;
  executeEvent(m_oTicket,m_oTicketExt,"String_Node_Str");
  refreshTicket();
}

Fixed version (ground truth):
public void setActiveTicket(TicketInfo oTicket,Object oTicketExt){
  m_oTicket=oTicket;
  m_oTicketExt=oTicketExt;
  m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
  m_oTicket.setActiveCash(m_App.getActiveCashIndex());
  m_oTicket.setDate(new Date());
  executeEvent(m_oTicket,m_oTicketExt,"String_Node_Str");
  refreshTicket();
}
Program: 20330
Project: 20330
Buggy source:
private void refreshTicket(){
  CardLayout cl=(CardLayout)(getLayout());
  if (m_oTicket == null) {
    m_jTicketId.setText(null);
    m_ticketlines.clearTicketLines();
    m_jSubtotalEuros.setText(null);
    m_jTaxesEuros.setText(null);
    m_jTotalEuros.setText(null);
    stateToZero();
    cl.show(this,"String_Node_Str");
  }
 else {
    m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
    for (    TicketLineInfo line : m_oTicket.getLines()) {
      line.setTaxInfo(taxeslogic.getTaxInfo(line.getProductTaxCategoryID(),m_oTicket.getCustomer()));
    }
    m_jTicketId.setText(m_oTicket.getName(m_oTicketExt));
    m_ticketlines.clearTicketLines();
    for (int i=0; i < m_oTicket.getLinesCount(); i++) {
      m_ticketlines.addTicketLine(m_oTicket.getLine(i));
    }
    printPartialTotals();
    stateToZero();
    cl.show(this,"String_Node_Str");
    m_jKeyFactory.setText(null);
    java.awt.EventQueue.invokeLater(new Runnable(){
      public void run(){
        m_jKeyFactory.requestFocus();
      }
    }
);
  }
}

Fixed version (ground truth):
private void refreshTicket(){
  CardLayout cl=(CardLayout)(getLayout());
  if (m_oTicket == null) {
    m_jTicketId.setText(null);
    m_ticketlines.clearTicketLines();
    m_jSubtotalEuros.setText(null);
    m_jTaxesEuros.setText(null);
    m_jTotalEuros.setText(null);
    stateToZero();
    cl.show(this,"String_Node_Str");
  }
 else {
    for (    TicketLineInfo line : m_oTicket.getLines()) {
      line.setTaxInfo(taxeslogic.getTaxInfo(line.getProductTaxCategoryID(),m_oTicket.getCustomer()));
    }
    m_jTicketId.setText(m_oTicket.getName(m_oTicketExt));
    m_ticketlines.clearTicketLines();
    for (int i=0; i < m_oTicket.getLinesCount(); i++) {
      m_ticketlines.addTicketLine(m_oTicket.getLine(i));
    }
    printPartialTotals();
    stateToZero();
    cl.show(this,"String_Node_Str");
    m_jKeyFactory.setText(null);
    java.awt.EventQueue.invokeLater(new Runnable(){
      public void run(){
        m_jKeyFactory.requestFocus();
      }
    }
);
  }
}
Program: 20331
Project: 20331
Buggy source:
public final void deleteTicket(final TicketInfo ticket,final String location) throws BasicException {
  Transaction t=new Transaction(s){
    public Object transact() throws BasicException {
      Date d=new Date();
      for (int i=0; i < ticket.getLinesCount(); i++) {
        if (ticket.getLine(i).getProductID() != null) {
          getStockDiaryInsert().exec(new Object[]{UUID.randomUUID().toString(),d,ticket.getLine(i).getMultiply() >= 0.0 ? MovementReason.IN_REFUND.getKey() : MovementReason.OUT_SALE.getKey(),location,ticket.getLine(i).getProductID(),new Double(ticket.getLine(i).getMultiply()),new Double(ticket.getLine(i).getPrice())});
        }
      }
      for (      PaymentInfo p : ticket.getPayments()) {
        if ("String_Node_Str".equals(p.getName()) || "String_Node_Str".equals(p.getName())) {
          getDebtUpdate().exec(new Object[]{ticket.getCustomer().getId(),new Double(-p.getTotal()),ticket.getDate()});
        }
      }
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      return null;
    }
  }
;
  t.execute();
}

Fixed version (ground truth):
public final void deleteTicket(final TicketInfo ticket,final String location) throws BasicException {
  Transaction t=new Transaction(s){
    public Object transact() throws BasicException {
      Date d=new Date();
      for (int i=0; i < ticket.getLinesCount(); i++) {
        if (ticket.getLine(i).getProductID() != null) {
          getStockDiaryInsert().exec(new Object[]{UUID.randomUUID().toString(),d,ticket.getLine(i).getMultiply() >= 0.0 ? MovementReason.IN_REFUND.getKey() : MovementReason.OUT_SALE.getKey(),location,ticket.getLine(i).getProductID(),new Double(ticket.getLine(i).getMultiply()),new Double(ticket.getLine(i).getPrice())});
        }
      }
      for (      PaymentInfo p : ticket.getPayments()) {
        if ("String_Node_Str".equals(p.getName()) || "String_Node_Str".equals(p.getName())) {
          ticket.getCustomer().updateCurDebt(-p.getTotal(),ticket.getDate());
          getDebtUpdate().exec(new DataParams(){
            public void writeValues() throws BasicException {
              setDouble(1,ticket.getCustomer().getCurdebt());
              setTimestamp(2,ticket.getCustomer().getCurdate());
              setString(3,ticket.getCustomer().getId());
            }
          }
);
        }
      }
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
      return null;
    }
  }
;
  t.execute();
}
Program: 20332
Project: 20332
Buggy source:
public void writeValues() throws BasicException {
  setString(1,UUID.randomUUID().toString());
  setString(2,ticket.getId());
  setString(3,tickettax.getTaxInfo().getId());
  setDouble(4,tickettax.getSubTotal());
  setDouble(5,tickettax.getTax());
}

Fixed version (ground truth):
public void writeValues() throws BasicException {
  setDouble(1,ticket.getCustomer().getCurdebt());
  setTimestamp(2,ticket.getCustomer().getCurdate());
  setString(3,ticket.getCustomer().getId());
}
Program: 20333
Project: 20333
Buggy source:
public final SentenceExec getDebtUpdate(){
  return new PreparedSentence(s,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",new SerializerWriteBasicExt(new Datas[]{Datas.STRING,Datas.DOUBLE,Datas.TIMESTAMP},new int[]{1,1,1,2,0}));
}

Fixed version (ground truth):
public final SentenceExec getDebtUpdate(){
  return new PreparedSentence(s,"String_Node_Str",SerializerWriteParams.INSTANCE);
}
Program: 20335
Project: 20335
Buggy source:
public Object transact() throws BasicException {
  Date d=new Date();
  for (int i=0; i < ticket.getLinesCount(); i++) {
    if (ticket.getLine(i).getProductID() != null) {
      getStockDiaryInsert().exec(new Object[]{UUID.randomUUID().toString(),d,ticket.getLine(i).getMultiply() >= 0.0 ? MovementReason.IN_REFUND.getKey() : MovementReason.OUT_SALE.getKey(),location,ticket.getLine(i).getProductID(),new Double(ticket.getLine(i).getMultiply()),new Double(ticket.getLine(i).getPrice())});
    }
  }
  for (  PaymentInfo p : ticket.getPayments()) {
    if ("String_Node_Str".equals(p.getName()) || "String_Node_Str".equals(p.getName())) {
      getDebtUpdate().exec(new Object[]{ticket.getCustomer().getId(),new Double(-p.getTotal()),ticket.getDate()});
    }
  }
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  return null;
}

Fixed version (ground truth):
public Object transact() throws BasicException {
  Date d=new Date();
  for (int i=0; i < ticket.getLinesCount(); i++) {
    if (ticket.getLine(i).getProductID() != null) {
      getStockDiaryInsert().exec(new Object[]{UUID.randomUUID().toString(),d,ticket.getLine(i).getMultiply() >= 0.0 ? MovementReason.IN_REFUND.getKey() : MovementReason.OUT_SALE.getKey(),location,ticket.getLine(i).getProductID(),new Double(ticket.getLine(i).getMultiply()),new Double(ticket.getLine(i).getPrice())});
    }
  }
  for (  PaymentInfo p : ticket.getPayments()) {
    if ("String_Node_Str".equals(p.getName()) || "String_Node_Str".equals(p.getName())) {
      ticket.getCustomer().updateCurDebt(-p.getTotal(),ticket.getDate());
      getDebtUpdate().exec(new DataParams(){
        public void writeValues() throws BasicException {
          setDouble(1,ticket.getCustomer().getCurdebt());
          setTimestamp(2,ticket.getCustomer().getCurdate());
          setString(3,ticket.getCustomer().getId());
        }
      }
);
    }
  }
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  new StaticSentence(s,"String_Node_Str",SerializerWriteString.INSTANCE).exec(ticket.getId());
  return null;
}
Program: 20336
Project: 20336
Buggy source:
@Deprecated public TicketTaxInfo[] getTaxLines(){
  return taxes.toArray(new TicketTaxInfo[taxes.size()]);
}

Fixed version (ground truth):
public TicketTaxInfo[] getTaxLines(){
  Map<String,TicketTaxInfo> m=new HashMap<String,TicketTaxInfo>();
  TicketLineInfo oLine;
  for (Iterator<TicketLineInfo> i=m_aLines.iterator(); i.hasNext(); ) {
    oLine=i.next();
    TicketTaxInfo t=m.get(oLine.getTaxInfo().getId());
    if (t == null) {
      t=new TicketTaxInfo(oLine.getTaxInfo());
      m.put(t.getTaxInfo().getId(),t);
    }
    t.add(oLine.getSubValue());
  }
  Collection<TicketTaxInfo> avalues=m.values();
  return avalues.toArray(new TicketTaxInfo[avalues.size()]);
}
Program: 20337
Project: 20337
Buggy source:
public void setActiveTicket(TicketInfo oTicket,Object oTicketExt){
  m_oTicket=oTicket;
  m_oTicketExt=oTicketExt;
  m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
  m_oTicket.setActiveCash(m_App.getActiveCashIndex());
  m_oTicket.setDate(new Date());
  executeEvent(m_oTicket,m_oTicketExt,"String_Node_Str");
  refreshTicket();
}

Fixed version (ground truth):
public void setActiveTicket(TicketInfo oTicket,Object oTicketExt){
  m_oTicket=oTicket;
  m_oTicketExt=oTicketExt;
  if (m_oTicket != null) {
    m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
    m_oTicket.setActiveCash(m_App.getActiveCashIndex());
    m_oTicket.setDate(new Date());
  }
  executeEvent(m_oTicket,m_oTicketExt,"String_Node_Str");
  refreshTicket();
}
Program: 20338
Project: 20338
Buggy source:
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt){
  TicketLineInfo line=receipttwo.getSelectedLine();
  if (line != null) {
    receiptone.addSelectedLine(line);
  }
}

Fixed version (ground truth):
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt){
  int numAux=receipttwo.countNumberAuxiliar();
  int ini=receipttwo.getJticketLine().getSelectedIndex();
  for (int i=ini; i <= ini + numAux; i++) {
    TicketLineInfo line=receipttwo.getSelectedLine();
    if (line != null) {
      receiptone.addSelectedLine(line);
    }
  }
}
Program: 20339
Project: 20339
Buggy source:
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt){
  TicketLineInfo line=receiptone.getSelectedLineUnit();
  if (line != null) {
    receipttwo.addSelectedLine(line);
  }
}

Fixed version (ground truth):
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt){
  TicketLineInfo line;
  int numAux=receiptone.countNumberAuxiliar();
  int ini=receiptone.getJticketLine().getSelectedIndex();
  if (numAux != 0) {
    line=receiptone.getSelectedLineUnit();
    receipttwo.addSelectedLine(line);
    int a=receiptone.countNumberAuxiliar();
    if (a != 0) {
      receiptone.getJticketLine().selectionDown();
    }
    ini=receiptone.getJticketLine().getSelectedIndex();
    for (int i=ini + 1; i <= ini + numAux; i++) {
      line=receiptone.getSelectedLine();
      if (line != null) {
        receipttwo.addSelectedLine(line);
      }
    }
  }
 else {
    line=receiptone.getSelectedLineUnit();
    receipttwo.addSelectedLine(line);
  }
}
Program: 20340
Project: 20340
Buggy source:
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt){
  TicketLineInfo line=receipttwo.getSelectedLineUnit();
  if (line != null) {
    receiptone.addSelectedLine(line);
  }
}

Fixed version (ground truth):
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt){
  TicketLineInfo line;
  int numAux=receipttwo.countNumberAuxiliar();
  int ini=receipttwo.getJticketLine().getSelectedIndex();
  if (numAux != 0) {
    line=receipttwo.getSelectedLineUnit();
    receiptone.addSelectedLine(line);
    int a=receipttwo.countNumberAuxiliar();
    if (a != 0) {
      receipttwo.getJticketLine().selectionDown();
    }
    ini=receipttwo.getJticketLine().getSelectedIndex();
    for (int i=ini + 1; i <= ini + numAux; i++) {
      line=receipttwo.getSelectedLine();
      if (line != null) {
        receiptone.addSelectedLine(line);
      }
    }
  }
 else {
    line=receipttwo.getSelectedLineUnit();
    receiptone.addSelectedLine(line);
  }
}
Program: 20341
Project: 20341
Buggy source:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt){
  TicketLineInfo line=receiptone.getSelectedLine();
  if (line != null) {
    receipttwo.addSelectedLine(line);
  }
}

Fixed version (ground truth):
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt){
  int numAux=receiptone.countNumberAuxiliar();
  int ini=receiptone.getJticketLine().getSelectedIndex();
  for (int i=ini; i <= ini + numAux; i++) {
    TicketLineInfo line=receiptone.getSelectedLine();
    if (line != null) {
      receipttwo.addSelectedLine(line);
    }
  }
}
Program: 20342
Project: 20342
Buggy source:
/** 
 * Creates a new instance of SentenceContainerGeneric 
 */
public DataLogicSales(){
  productcatDatas=new Datas[]{Datas.STRING,Datas.STRING,Datas.STRING,Datas.STRING,Datas.BOOLEAN,Datas.BOOLEAN,Datas.DOUBLE,Datas.DOUBLE,Datas.STRING,Datas.STRING,Datas.IMAGE,Datas.DOUBLE,Datas.DOUBLE,Datas.BOOLEAN,Datas.INT,Datas.BYTES};
  stockdiaryDatas=new Datas[]{Datas.STRING,Datas.TIMESTAMP,Datas.INT,Datas.STRING,Datas.STRING,Datas.DOUBLE,Datas.DOUBLE};
  paymenttabledatas=new Datas[]{Datas.STRING,Datas.STRING,Datas.TIMESTAMP,Datas.STRING,Datas.STRING,Datas.DOUBLE};
  stockdatas=new Datas[]{Datas.STRING,Datas.STRING,Datas.STRING,Datas.DOUBLE,Datas.DOUBLE,Datas.DOUBLE};
}

Fixed version (ground truth):
/** 
 * Creates a new instance of SentenceContainerGeneric 
 */
public DataLogicSales(){
  productcatDatas=new Datas[]{Datas.STRING,Datas.STRING,Datas.STRING,Datas.STRING,Datas.BOOLEAN,Datas.BOOLEAN,Datas.DOUBLE,Datas.DOUBLE,Datas.STRING,Datas.STRING,Datas.IMAGE,Datas.DOUBLE,Datas.DOUBLE,Datas.BOOLEAN,Datas.INT,Datas.BYTES};
  stockdiaryDatas=new Datas[]{Datas.STRING,Datas.TIMESTAMP,Datas.INT,Datas.STRING,Datas.STRING,Datas.DOUBLE,Datas.DOUBLE};
  paymenttabledatas=new Datas[]{Datas.STRING,Datas.STRING,Datas.TIMESTAMP,Datas.STRING,Datas.STRING,Datas.DOUBLE};
  stockdatas=new Datas[]{Datas.STRING,Datas.STRING,Datas.STRING,Datas.DOUBLE,Datas.DOUBLE,Datas.DOUBLE};
  auxiliarDatas=new Datas[]{Datas.STRING,Datas.STRING};
}
Program: 20343
Project: 20343
Buggy source:
protected void typeCharInternal(char c){
  String sOldText=getText();
  if (c == '\u0008') {
    if (m_cLastChar == '\u0000') {
      if (m_svalue != null && m_svalue.length() > 0) {
        m_svalue=m_svalue.substring(0,m_svalue.length() - 1);
      }
    }
 else {
      m_iTicks=0;
      m_cLastChar='\u0000';
    }
  }
 else   if (c == '\u007f') {
    m_svalue=null;
    m_iTicks=0;
    m_cLastChar='\u0000';
  }
 else   if (c >= ' ') {
    if (m_cLastChar != '\u0000') {
      char ckey=getKeyChar();
      m_svalue=appendChar2Value(ckey);
      acceptKeyChar(ckey);
    }
    m_iTicks=0;
    m_cLastChar='\u0000';
    m_svalue=appendChar2Value(c);
  }
  m_jtimer.restart();
  firePropertyChange("String_Node_Str",sOldText,getText());
}

Fixed version (ground truth):
protected void typeCharInternal(char c){
  String sOldText=getText();
  if (c == '\u0008') {
    if (m_cLastChar == '\u0000') {
      if (m_svalue != null && m_svalue.length() > 0) {
        m_svalue=m_svalue.substring(0,m_svalue.length() - 1);
      }
    }
 else {
      m_iTicks=0;
      m_cLastChar='\u0000';
    }
  }
 else   if (c == '\u007f') {
    m_iMode=getStartMode();
    m_svalue=null;
    m_iTicks=0;
    m_cLastChar='\u0000';
  }
 else   if (c >= ' ') {
    if (m_cLastChar != '\u0000') {
      char ckey=getKeyChar();
      m_svalue=appendChar2Value(ckey);
      acceptKeyChar(ckey);
    }
    m_iTicks=0;
    m_cLastChar='\u0000';
    m_svalue=appendChar2Value(c);
  }
  m_jtimer.restart();
  firePropertyChange("String_Node_Str",sOldText,getText());
}
Program: 20344
Project: 20344
Buggy source:
protected void transCharInternal(char c){
  String sOldText=getText();
  if (c == '-') {
    if (m_cLastChar == '\u0000') {
      if (m_svalue != null && m_svalue.length() > 0) {
        m_svalue=m_svalue.substring(0,m_svalue.length() - 1);
      }
    }
 else {
      m_iTicks=0;
      m_cLastChar='\u0000';
    }
  }
 else   if (c == '\u007f') {
    m_svalue=null;
    m_iTicks=0;
    m_cLastChar='\u0000';
  }
 else   if (c == '.') {
    if (m_cLastChar != '\u0000') {
      m_svalue=appendChar2Value(getKeyChar());
    }
    m_iTicks=0;
    m_cLastChar='\u0000';
    m_iMode=(m_iMode + 1) % 4;
  }
 else   if (c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9' || c == '0') {
    if (m_iMode == MODE_123) {
      m_svalue=appendChar2Value(c);
    }
 else     if (c == m_cLastChar) {
      m_iTicks++;
    }
 else {
      if (m_cLastChar != '\u0000') {
        char ckey=getKeyChar();
        m_svalue=appendChar2Value(ckey);
        acceptKeyChar(ckey);
      }
      m_iTicks=0;
      m_cLastChar=c;
    }
  }
  m_jtimer.restart();
  firePropertyChange("String_Node_Str",sOldText,getText());
}

Fixed version (ground truth):
protected void transCharInternal(char c){
  String sOldText=getText();
  if (c == '-') {
    if (m_cLastChar == '\u0000') {
      if (m_svalue != null && m_svalue.length() > 0) {
        m_svalue=m_svalue.substring(0,m_svalue.length() - 1);
      }
    }
 else {
      m_iTicks=0;
      m_cLastChar='\u0000';
    }
  }
 else   if (c == '\u007f') {
    m_iMode=getStartMode();
    m_svalue=null;
    m_iTicks=0;
    m_cLastChar='\u0000';
  }
 else   if (c == '.') {
    if (m_cLastChar != '\u0000') {
      m_svalue=appendChar2Value(getKeyChar());
    }
    m_iTicks=0;
    m_cLastChar='\u0000';
    m_iMode=(m_iMode + 1) % 4;
  }
 else   if (c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9' || c == '0') {
    if (m_iMode == MODE_123) {
      m_svalue=appendChar2Value(c);
    }
 else     if (c == m_cLastChar) {
      m_iTicks++;
    }
 else {
      if (m_cLastChar != '\u0000') {
        char ckey=getKeyChar();
        m_svalue=appendChar2Value(ckey);
        acceptKeyChar(ckey);
      }
      m_iTicks=0;
      m_cLastChar=c;
    }
  }
  m_jtimer.restart();
  firePropertyChange("String_Node_Str",sOldText,getText());
}
Program: 20345
Project: 20345
Buggy source:
private void refreshTicket(){
  CardLayout cl=(CardLayout)(getLayout());
  if (m_oTicket == null) {
    m_jTicketId.setText(null);
    m_ticketlines.clearTicketLines();
    m_jSubtotalEuros.setText(null);
    m_jTaxesEuros.setText(null);
    m_jTotalEuros.setText(null);
    stateToZero();
    cl.show(this,"String_Node_Str");
  }
 else {
    for (    TicketLineInfo line : m_oTicket.getLines()) {
      line.setTaxInfo(taxeslogic.getTaxInfo(line.getProductTaxCategoryID(),m_oTicket.getCustomer()));
    }
    m_jTicketId.setText(m_oTicket.getName(m_oTicketExt));
    m_ticketlines.clearTicketLines();
    for (int i=0; i < m_oTicket.getLinesCount(); i++) {
      m_ticketlines.addTicketLine(m_oTicket.getLine(i));
    }
    printPartialTotals();
    stateToZero();
    cl.show(this,"String_Node_Str");
    m_jKeyFactory.setText(null);
    java.awt.EventQueue.invokeLater(new Runnable(){
      public void run(){
        m_jKeyFactory.requestFocus();
      }
    }
);
  }
}

Fixed version (ground truth):
private void refreshTicket(){
  CardLayout cl=(CardLayout)(getLayout());
  if (m_oTicket == null) {
    m_jTicketId.setText(null);
    m_ticketlines.clearTicketLines();
    m_jSubtotalEuros.setText(null);
    m_jTaxesEuros.setText(null);
    m_jTotalEuros.setText(null);
    stateToZero();
    cl.show(this,"String_Node_Str");
  }
 else {
    m_oTicket.setUser(m_App.getAppUserView().getUser().getUserInfo());
    for (    TicketLineInfo line : m_oTicket.getLines()) {
      line.setTaxInfo(taxeslogic.getTaxInfo(line.getProductTaxCategoryID(),m_oTicket.getCustomer()));
    }
    m_jTicketId.setText(m_oTicket.getName(m_oTicketExt));
    m_ticketlines.clearTicketLines();
    for (int i=0; i < m_oTicket.getLinesCount(); i++) {
      m_ticketlines.addTicketLine(m_oTicket.getLine(i));
    }
    printPartialTotals();
    stateToZero();
    cl.show(this,"String_Node_Str");
    m_jKeyFactory.setText(null);
    java.awt.EventQueue.invokeLater(new Runnable(){
      public void run(){
        m_jKeyFactory.requestFocus();
      }
    }
);
  }
}
Program: 20346
Project: 20346
Buggy source:
public void printLine(String sproduct,double dprice,double dunits){
  try {
    m_fiscal.printRecItem(sproduct,(int)(dprice * dunits * 10000.0),0,0,(int)(dprice * 10000.0),"String_Node_Str");
  }
 catch (  JposException e) {
  }
}

Fixed version (ground truth):
public void printLine(String sproduct,double dprice,double dunits){
  try {
    m_fiscal.printRecItem(sproduct,roundFiscal(dprice * dunits),0,0,roundFiscal(dprice),"String_Node_Str");
  }
 catch (  JposException e) {
  }
}
Program: 20347
Project: 20347
Buggy source:
public void printTotal(String sPayment,double dpaid){
  try {
    m_fiscal.printRecTotal(0,(int)(dpaid * 10000),sPayment);
  }
 catch (  JposException e) {
  }
}

Fixed version (ground truth):
public void printTotal(String sPayment,double dpaid){
  try {
    m_fiscal.printRecTotal(0,roundFiscal(dpaid),sPayment);
  }
 catch (  JposException e) {
  }
}
Program: 20348
Project: 20348
Buggy source:
/** 
 * Creates a new instance of WebServiceHelper 
 */
public ExternalSalesHelper(DataLogicSystem dlsystem) throws BasicException, ServiceException, MalformedURLException {
  Properties prop=dlsystem.getResourceAsProperties("String_Node_Str");
  if (prop == null) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"));
  }
 else {
    String url=prop.getProperty("String_Node_Str");
    if (url == null || url.equals("String_Node_Str")) {
      throw new BasicException(AppLocal.getIntString("String_Node_Str"));
    }
 else {
      url=url.trim();
      if (url.endsWith("String_Node_Str")) {
        url=url.substring(0,url.length() - 14);
      }
      externalSales=new ExternalSalesImplServiceLocator().getExternalSales(new URL(url + "String_Node_Str"));
      externalCustomers=new WebServiceImplServiceLocator().getWebService(new URL(url + "String_Node_Str"));
      m_sERPUser=prop.getProperty("String_Node_Str");
      m_sERPPassword=prop.getProperty("String_Node_Str");
      if (m_sERPUser != null && m_sERPPassword != null && m_sERPPassword.startsWith("String_Node_Str")) {
        AltEncrypter cypher=new AltEncrypter("String_Node_Str" + m_sERPUser);
        m_sERPPassword=cypher.decrypt(m_sERPPassword.substring(6));
      }
      m_sERPPassword=getPasswordHash(m_sERPPassword);
      m_iERPId=Integer.parseInt(prop.getProperty("String_Node_Str"));
      m_iERPOrg=Integer.parseInt(prop.getProperty("String_Node_Str"));
      m_iERPPos=Integer.parseInt(prop.getProperty("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates a new instance of WebServiceHelper 
 */
public ExternalSalesHelper(DataLogicSystem dlsystem) throws BasicException, ServiceException, MalformedURLException {
  Properties prop=dlsystem.getResourceAsProperties("String_Node_Str");
  if (prop == null) {
    throw new BasicException(AppLocal.getIntString("String_Node_Str"));
  }
 else {
    String url=prop.getProperty("String_Node_Str");
    if (url == null || url.equals("String_Node_Str")) {
      throw new BasicException(AppLocal.getIntString("String_Node_Str"));
    }
 else {
      url=url.trim();
      if (url.endsWith("String_Node_Str")) {
        url=url.substring(0,url.length() - 14);
      }
      externalSales=new ExternalSalesImplServiceLocator().getExternalSales(new URL(url + "String_Node_Str"));
      externalCustomers=new WebServiceImplServiceLocator().getWebService(new URL(url + "String_Node_Str"));
      m_sERPUser=prop.getProperty("String_Node_Str");
      m_sERPPassword=prop.getProperty("String_Node_Str");
      if (m_sERPUser != null && m_sERPPassword != null && m_sERPPassword.startsWith("String_Node_Str")) {
        AltEncrypter cypher=new AltEncrypter("String_Node_Str" + m_sERPUser);
        m_sERPPassword=cypher.decrypt(m_sERPPassword.substring(6));
      }
      m_sERPPassword=getPasswordHash(m_sERPPassword);
      m_iERPId=prop.getProperty("String_Node_Str");
      m_iERPOrg=prop.getProperty("String_Node_Str");
      m_iERPPos=prop.getProperty("String_Node_Str");
    }
  }
}
Program: 20351
Project: 20351
Buggy source:
/** 
 * Gets the clientId value for this BusinessPartner.
 * @return clientId
 */
public int getClientId(){
  return clientId;
}

Fixed version (ground truth):
/** 
 * Gets the clientId value for this BusinessPartner.
 * @return clientId
 */
public java.lang.String getClientId(){
  return clientId;
}
Program: 20352
Project: 20352
Buggy source:
public BusinessPartner(int clientId,java.lang.Boolean complete,com.openbravo.ws.customers.Contact[] contacts,java.lang.Boolean customer,java.lang.String description,int id,com.openbravo.ws.customers.Location[] locations,java.lang.String name,java.lang.String searchKey,java.lang.Boolean vendor){
  this.clientId=clientId;
  this.complete=complete;
  this.contacts=contacts;
  this.customer=customer;
  this.description=description;
  this.id=id;
  this.locations=locations;
  this.name=name;
  this.searchKey=searchKey;
  this.vendor=vendor;
}

Fixed version (ground truth):
public BusinessPartner(java.lang.String clientId,java.lang.Boolean complete,com.openbravo.ws.customers.Contact[] contacts,java.lang.Boolean customer,java.lang.String description,java.lang.String id,com.openbravo.ws.customers.Location[] locations,java.lang.String name,java.lang.String searchKey,java.lang.Boolean vendor){
  this.clientId=clientId;
  this.complete=complete;
  this.contacts=contacts;
  this.customer=customer;
  this.description=description;
  this.id=id;
  this.locations=locations;
  this.name=name;
  this.searchKey=searchKey;
  this.vendor=vendor;
}
Program: 20353
Project: 20353
Buggy source:
/** 
 * Gets the id value for this BusinessPartner.
 * @return id
 */
public int getId(){
  return id;
}

Fixed version (ground truth):
/** 
 * Gets the id value for this BusinessPartner.
 * @return id
 */
public java.lang.String getId(){
  return id;
}
Program: 20354
Project: 20354
Buggy source:
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=getClientId();
  if (getComplete() != null) {
    _hashCode+=getComplete().hashCode();
  }
  if (getContacts() != null) {
    for (int i=0; i < java.lang.reflect.Array.getLength(getContacts()); i++) {
      java.lang.Object obj=java.lang.reflect.Array.get(getContacts(),i);
      if (obj != null && !obj.getClass().isArray()) {
        _hashCode+=obj.hashCode();
      }
    }
  }
  if (getCustomer() != null) {
    _hashCode+=getCustomer().hashCode();
  }
  if (getDescription() != null) {
    _hashCode+=getDescription().hashCode();
  }
  _hashCode+=getId();
  if (getLocations() != null) {
    for (int i=0; i < java.lang.reflect.Array.getLength(getLocations()); i++) {
      java.lang.Object obj=java.lang.reflect.Array.get(getLocations(),i);
      if (obj != null && !obj.getClass().isArray()) {
        _hashCode+=obj.hashCode();
      }
    }
  }
  if (getName() != null) {
    _hashCode+=getName().hashCode();
  }
  if (getSearchKey() != null) {
    _hashCode+=getSearchKey().hashCode();
  }
  if (getVendor() != null) {
    _hashCode+=getVendor().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}

Fixed version (ground truth):
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  if (getClientId() != null) {
    _hashCode+=getClientId().hashCode();
  }
  if (getComplete() != null) {
    _hashCode+=getComplete().hashCode();
  }
  if (getContacts() != null) {
    for (int i=0; i < java.lang.reflect.Array.getLength(getContacts()); i++) {
      java.lang.Object obj=java.lang.reflect.Array.get(getContacts(),i);
      if (obj != null && !obj.getClass().isArray()) {
        _hashCode+=obj.hashCode();
      }
    }
  }
  if (getCustomer() != null) {
    _hashCode+=getCustomer().hashCode();
  }
  if (getDescription() != null) {
    _hashCode+=getDescription().hashCode();
  }
  if (getId() != null) {
    _hashCode+=getId().hashCode();
  }
  if (getLocations() != null) {
    for (int i=0; i < java.lang.reflect.Array.getLength(getLocations()); i++) {
      java.lang.Object obj=java.lang.reflect.Array.get(getLocations(),i);
      if (obj != null && !obj.getClass().isArray()) {
        _hashCode+=obj.hashCode();
      }
    }
  }
  if (getName() != null) {
    _hashCode+=getName().hashCode();
  }
  if (getSearchKey() != null) {
    _hashCode+=getSearchKey().hashCode();
  }
  if (getVendor() != null) {
    _hashCode+=getVendor().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}
Program: 20355
Project: 20355
Buggy source:
/** 
 * Sets the id value for this BusinessPartner.
 * @param id
 */
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
/** 
 * Sets the id value for this BusinessPartner.
 * @param id
 */
public void setId(java.lang.String id){
  this.id=id;
}
Program: 20357
Project: 20357
Buggy source:
/** 
 * Sets the clientId value for this BusinessPartner.
 * @param clientId
 */
public void setClientId(int clientId){
  this.clientId=clientId;
}

Fixed version (ground truth):
/** 
 * Sets the clientId value for this BusinessPartner.
 * @param clientId
 */
public void setClientId(java.lang.String clientId){
  this.clientId=clientId;
}
Program: 20358
Project: 20358
Buggy source:
/** 
 * Gets the clientId value for this Contact.
 * @return clientId
 */
public int getClientId(){
  return clientId;
}

Fixed version (ground truth):
/** 
 * Gets the clientId value for this Contact.
 * @return clientId
 */
public java.lang.String getClientId(){
  return clientId;
}
Program: 20359
Project: 20359
Buggy source:
/** 
 * Gets the id value for this Contact.
 * @return id
 */
public int getId(){
  return id;
}

Fixed version (ground truth):
/** 
 * Gets the id value for this Contact.
 * @return id
 */
public java.lang.String getId(){
  return id;
}
Program: 20360
Project: 20360
Buggy source:
/** 
 * Sets the businessPartnerId value for this Contact.
 * @param businessPartnerId
 */
public void setBusinessPartnerId(int businessPartnerId){
  this.businessPartnerId=businessPartnerId;
}

Fixed version (ground truth):
/** 
 * Sets the businessPartnerId value for this Contact.
 * @param businessPartnerId
 */
public void setBusinessPartnerId(java.lang.String businessPartnerId){
  this.businessPartnerId=businessPartnerId;
}
Program: 20361
Project: 20361
Buggy source:
public Contact(int businessPartnerId,int clientId,java.lang.String email,java.lang.String fax,java.lang.String firstName,int id,java.lang.String lastName,java.lang.String phone,java.lang.String phone2){
  this.businessPartnerId=businessPartnerId;
  this.clientId=clientId;
  this.email=email;
  this.fax=fax;
  this.firstName=firstName;
  this.id=id;
  this.lastName=lastName;
  this.phone=phone;
  this.phone2=phone2;
}

Fixed version (ground truth):
public Contact(java.lang.String businessPartnerId,java.lang.String clientId,java.lang.String email,java.lang.String fax,java.lang.String firstName,java.lang.String id,java.lang.String lastName,java.lang.String phone,java.lang.String phone2){
  this.businessPartnerId=businessPartnerId;
  this.clientId=clientId;
  this.email=email;
  this.fax=fax;
  this.firstName=firstName;
  this.id=id;
  this.lastName=lastName;
  this.phone=phone;
  this.phone2=phone2;
}
Program: 20362
Project: 20362
Buggy source:
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  _hashCode+=getBusinessPartnerId();
  _hashCode+=getClientId();
  if (getEmail() != null) {
    _hashCode+=getEmail().hashCode();
  }
  if (getFax() != null) {
    _hashCode+=getFax().hashCode();
  }
  if (getFirstName() != null) {
    _hashCode+=getFirstName().hashCode();
  }
  _hashCode+=getId();
  if (getLastName() != null) {
    _hashCode+=getLastName().hashCode();
  }
  if (getPhone() != null) {
    _hashCode+=getPhone().hashCode();
  }
  if (getPhone2() != null) {
    _hashCode+=getPhone2().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}

Fixed version (ground truth):
public synchronized int hashCode(){
  if (__hashCodeCalc) {
    return 0;
  }
  __hashCodeCalc=true;
  int _hashCode=1;
  if (getBusinessPartnerId() != null) {
    _hashCode+=getBusinessPartnerId().hashCode();
  }
  if (getClientId() != null) {
    _hashCode+=getClientId().hashCode();
  }
  if (getEmail() != null) {
    _hashCode+=getEmail().hashCode();
  }
  if (getFax() != null) {
    _hashCode+=getFax().hashCode();
  }
  if (getFirstName() != null) {
    _hashCode+=getFirstName().hashCode();
  }
  if (getId() != null) {
    _hashCode+=getId().hashCode();
  }
  if (getLastName() != null) {
    _hashCode+=getLastName().hashCode();
  }
  if (getPhone() != null) {
    _hashCode+=getPhone().hashCode();
  }
  if (getPhone2() != null) {
    _hashCode+=getPhone2().hashCode();
  }
  __hashCodeCalc=false;
  return _hashCode;
}
Program: 20363
Project: 20363
Buggy source:
public synchronized boolean equals(java.lang.Object obj){
  if (!(obj instanceof Contact))   return false;
  Contact other=(Contact)obj;
  if (obj == null)   return false;
  if (this == obj)   return true;
  if (__equalsCalc != null) {
    return (__equalsCalc == obj);
  }
  __equalsCalc=obj;
  boolean _equals;
  _equals=true && this.businessPartnerId == other.getBusinessPartnerId() && this.clientId == other.getClientId() && ((this.email == null && other.getEmail() == null) || (this.email != null && this.email.equals(other.getEmail()))) && ((this.fax == null && other.getFax() == null) || (this.fax != null && this.fax.equals(other.getFax()))) && ((this.firstName == null && other.getFirstName() == null) || (this.firstName != null && this.firstName.equals(other.getFirstName()))) && this.id == other.getId() && ((this.lastName == null && other.getLastName() == null) || (this.lastName != null && this.lastName.equals(other.getLastName()))) && ((this.phone == null && other.getPhone() == null) || (this.phone != null && this.phone.equals(other.getPhone()))) && ((this.phone2 == null && other.getPhone2() == null) || (this.phone2 != null && this.phone2.equals(other.getPhone2())));
  __equalsCalc=null;
  return _equals;
}

Fixed version (ground truth):
public synchronized boolean equals(java.lang.Object obj){
  if (!(obj instanceof Contact))   return false;
  Contact other=(Contact)obj;
  if (obj == null)   return false;
  if (this == obj)   return true;
  if (__equalsCalc != null) {
    return (__equalsCalc == obj);
  }
  __equalsCalc=obj;
  boolean _equals;
  _equals=true && ((this.businessPartnerId == null && other.getBusinessPartnerId() == null) || (this.businessPartnerId != null && this.businessPartnerId.equals(other.getBusinessPartnerId()))) && ((this.clientId == null && other.getClientId() == null) || (this.clientId != null && this.clientId.equals(other.getClientId())))&& ((this.email == null && other.getEmail() == null) || (this.email != null && this.email.equals(other.getEmail())))&& ((this.fax == null && other.getFax() == null) || (this.fax != null && this.fax.equals(other.getFax())))&& ((this.firstName == null && other.getFirstName() == null) || (this.firstName != null && this.firstName.equals(other.getFirstName())))&& ((this.id == null && other.getId() == null) || (this.id != null && this.id.equals(other.getId())))&& ((this.lastName == null && other.getLastName() == null) || (this.lastName != null && this.lastName.equals(other.getLastName())))&& ((this.phone == null && other.getPhone() == null) || (this.phone != null && this.phone.equals(other.getPhone())))&& ((this.phone2 == null && other.getPhone2() == null) || (this.phone2 != null && this.phone2.equals(other.getPhone2())));
  __equalsCalc=null;
  return _equals;
}
Program: 20364
Project: 20364
Buggy source:
/** 
 * Sets the id value for this Contact.
 * @param id
 */
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
/** 
 * Sets the id value for this Contact.
 * @param id
 */
public void setId(java.lang.String id){
  this.id=id;
}
Program: 20365
Project: 20365
Buggy source:
/** 
 * Gets the businessPartnerId value for this Contact.
 * @return businessPartnerId
 */
public int getBusinessPartnerId(){
  return businessPartnerId;
}

Fixed version (ground truth):
/** 
 * Gets the businessPartnerId value for this Contact.
 * @return businessPartnerId
 */
public java.lang.String getBusinessPartnerId(){
  return businessPartnerId;
}
Program: 20366
Project: 20366
Buggy source:
/** 
 * Sets the clientId value for this Contact.
 * @param clientId
 */
public void setClientId(int clientId){
  this.clientId=clientId;
}

Fixed version (ground truth):
/** 
 * Sets the clientId value for this Contact.
 * @param clientId
 */
public void setClientId(java.lang.String clientId){
  this.clientId=clientId;
}
Program: 20367
Project: 20367
Buggy source:
public void valueChanged(ListSelectionEvent e){
  if (!e.getValueIsAdjusting()) {
    int i=m_ticketlines.getSelectedIndex();
    while (i >= 0 && m_oTicket.getLine(i).isProductCom()) {
      i--;
    }
    if (i >= 0) {
      m_cat.showCatalogPanel(m_oTicket.getLine(i).getProductID());
    }
 else {
      m_cat.showCatalogPanel(null);
    }
  }
}

Fixed version (ground truth):
public void valueChanged(ListSelectionEvent e){
  if (!e.getValueIsAdjusting()) {
    int i=m_ticketlines.getSelectedIndex();
    if (i >= 0) {
      while (i >= 0 && m_oTicket.getLine(i).isProductCom()) {
        i--;
      }
      if (i >= 0) {
        m_cat.showCatalogPanel(m_oTicket.getLine(i).getProductID());
      }
 else {
        m_cat.showCatalogPanel(null);
      }
    }
  }
}
Program: 20368
Project: 20368
Buggy source:
private void paintTicketLine(int index,TicketLineInfo oLine){
  if (executeEventAndRefresh("String_Node_Str",new ScriptArg("String_Node_Str",index),new ScriptArg("String_Node_Str",oLine)) == null) {
    m_ticketlines.setTicketLine(index,oLine);
    m_ticketlines.setSelectedIndex(index);
    visorTicketLine(oLine);
    printPartialTotals();
    stateToZero();
    executeEventAndRefresh("String_Node_Str");
  }
}

Fixed version (ground truth):
private void paintTicketLine(int index,TicketLineInfo oLine){
  if (executeEventAndRefresh("String_Node_Str",new ScriptArg("String_Node_Str",index),new ScriptArg("String_Node_Str",oLine)) == null) {
    m_oTicket.setLine(index,oLine);
    m_ticketlines.setTicketLine(index,oLine);
    m_ticketlines.setSelectedIndex(index);
    visorTicketLine(oLine);
    printPartialTotals();
    stateToZero();
    executeEventAndRefresh("String_Node_Str");
  }
}
Program: 20369
Project: 20369
Buggy source:
public void writeValueInsert(){
  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(true);
  m_jCatalogOrder.setText(null);
  txtAttributes.setText(null);
  reportlock=false;
  m_jRef.setEnabled(true);
  m_jCode.setEnabled(true);
  m_jName.setEnabled(true);
  m_jComment.setEnabled(true);
  m_jScale.setEnabled(true);
  m_jCategory.setEnabled(true);
  m_jTax.setEnabled(true);
  m_jPriceBuy.setEnabled(true);
  m_jPriceSell.setEnabled(true);
  m_jPriceSellTax.setEnabled(true);
  m_jmargin.setEnabled(true);
  m_jImage.setEnabled(true);
  m_jstockcost.setEnabled(true);
  m_jstockvolume.setEnabled(true);
  m_jInCatalog.setEnabled(true);
  m_jCatalogOrder.setEnabled(false);
  txtAttributes.setEnabled(true);
  calculateMargin();
  calculatePriceSellTax();
}

Fixed version (ground truth):
public void writeValueInsert(){
  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(true);
  m_jCatalogOrder.setText(null);
  txtAttributes.setText(null);
  reportlock=false;
  m_jRef.setEnabled(true);
  m_jCode.setEnabled(true);
  m_jName.setEnabled(true);
  m_jComment.setEnabled(true);
  m_jScale.setEnabled(true);
  m_jCategory.setEnabled(true);
  m_jTax.setEnabled(true);
  m_jPriceBuy.setEnabled(true);
  m_jPriceSell.setEnabled(true);
  m_jPriceSellTax.setEnabled(true);
  m_jmargin.setEnabled(true);
  m_jImage.setEnabled(true);
  m_jstockcost.setEnabled(true);
  m_jstockvolume.setEnabled(true);
  m_jInCatalog.setEnabled(true);
  m_jCatalogOrder.setEnabled(false);
  txtAttributes.setEnabled(true);
  calculateMargin();
  calculatePriceSellTax();
}