nus-yam/ex-repair huggingface dataset:
Program: 98401
Project: 98401
Buggy source:
public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  String i="String_Node_Str";
  i=ENSArray.get(position).getENS_id();
  if (ENSArray.get(position).getTyp() == 99) {
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    Intent newIntent=new Intent(getApplicationContext(),ENS.class);
    newIntent.putExtras(bundle);
    startActivity(newIntent);
  }
 else {
    i=ENSArray.get(position).getENS_id();
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    ENSsql SQL=new ENSsql(con);
    SQL.open();
    ENSObject t=SQL.getSingleENS(i);
    Log.i("String_Node_Str",t.getText() + "String_Node_Str");
    if (t != null && t.getText().equalsIgnoreCase("String_Node_Str") == false)     bundle.putBoolean("String_Node_Str",true);
    Intent newIntent=new Intent(getApplicationContext(),ENSSingle.class);
    newIntent.putExtras(bundle);
    SQL.close();
    startActivity(newIntent);
  }
}

Fixed version (ground truth):
public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  String i="String_Node_Str";
  i=ENSArray.get(position).getENS_id();
  if (ENSArray.get(position).getTyp() == 99) {
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    Intent newIntent=new Intent(getApplicationContext(),ENS.class);
    newIntent.putExtras(bundle);
    startActivity(newIntent);
  }
 else {
    i=ENSArray.get(position).getENS_id();
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    Intent newIntent=new Intent(getApplicationContext(),ENSSingle.class);
    newIntent.putExtras(bundle);
    startActivity(newIntent);
  }
}
Program: 98403
Project: 98403
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Request.config=PreferenceManager.getDefaultSharedPreferences(this);
  typ="String_Node_Str";
  if (this.getIntent().hasExtra("String_Node_Str")) {
    Bundle bundle=this.getIntent().getExtras();
    ordner=bundle.getString("String_Node_Str");
    offset=0;
  }
 else   ordner="String_Node_Str";
  con=this;
  NotificationManager mManager;
  mManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  mManager.cancel(42);
  adapter=new ENSAdapter(this,ENSArray);
  setlist(adapter);
  refresh();
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Request.config=PreferenceManager.getDefaultSharedPreferences(this);
  typ="String_Node_Str";
  if (this.getIntent().hasExtra("String_Node_Str")) {
    Bundle bundle=this.getIntent().getExtras();
    ordner=bundle.getString("String_Node_Str");
    offset=0;
  }
 else   ordner="String_Node_Str";
  adapter=new ENSAdapter(this,ENSArray);
  setlist(adapter);
  refresh();
}
Program: 98404
Project: 98404
Buggy source:
public boolean onItemLongClick(AdapterView<?> av,View v,int position,long id){
  if (position >= offset) {
    ENSPopUp Menu=new ENSPopUp(con,ENSArray.get(position).getVon().getUsername(),ENSArray.get(position).getVon().getId(),ENSArray.get(position).getENS_id(),ENSArray.get(position).getBetreff(),typ,1);
    Menu.PopUp();
  }
  return true;
}

Fixed version (ground truth):
public boolean onItemLongClick(AdapterView<?> av,View v,int position,long id){
  if (position >= offset) {
    ENSPopUp Menu=new ENSPopUp(con,ENSArray.get(position).getVon().getUsername(),ENSArray.get(position).getVon().getId(),ENSArray.get(position).getENS_id(),ENSArray.get(position).getBetreff(),typ,2);
    Menu.PopUp();
  }
  return true;
}
Program: 98405
Project: 98405
Buggy source:
public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  String i="String_Node_Str";
  i=ENSArray.get(position).getENS_id();
  if (ENSArray.get(position).getTyp() == 99) {
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    Intent newIntent=new Intent(getApplicationContext(),ENS.class);
    newIntent.putExtras(bundle);
    startActivity(newIntent);
  }
 else {
    i=ENSArray.get(position).getENS_id();
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    ENSsql SQL=new ENSsql(con);
    SQL.open();
    ENSObject t=SQL.getSingleENS(i);
    Log.i("String_Node_Str",t.getText() + "String_Node_Str");
    if (t != null && t.getText().equalsIgnoreCase("String_Node_Str") == false)     bundle.putBoolean("String_Node_Str",true);
    Intent newIntent=new Intent(getApplicationContext(),ENSSingle.class);
    newIntent.putExtras(bundle);
    SQL.close();
    startActivity(newIntent);
  }
}

Fixed version (ground truth):
public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  String i="String_Node_Str";
  i=ENSArray.get(position).getENS_id();
  if (ENSArray.get(position).getTyp() == 99) {
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    Intent newIntent=new Intent(getApplicationContext(),ENSAusgang.class);
    newIntent.putExtras(bundle);
    startActivity(newIntent);
  }
 else {
    i=ENSArray.get(position).getENS_id();
    Bundle bundle=new Bundle();
    bundle.putString("String_Node_Str",i);
    Intent newIntent=new Intent(getApplicationContext(),ENSSingle.class);
    newIntent.putExtras(bundle);
    startActivity(newIntent);
  }
}
Program: 98407
Project: 98407
Buggy source:
public ENSObject parseJSON(JSONObject JSON){
  try {
    this.setBetreff(JSON.getString("String_Node_Str"));
    this.setTime(JSON.getString("String_Node_Str"));
    this.setText(JSON.getString("String_Node_Str"));
    UserObject von=new UserObject();
    von.ParseJSON(JSON.getJSONObject("String_Node_Str"));
    this.setVon(von);
    for (int z=0; z < JSON.getJSONArray("String_Node_Str").length(); z++) {
      UserObject an=new UserObject();
      an.ParseJSON(JSON.getJSONArray("String_Node_Str").getJSONObject(z));
      this.addAnUser(an);
    }
    this.setFlags(JSON.getInt("String_Node_Str"));
    this.setENS_id(JSON.getString("String_Node_Str"));
    this.setTyp(JSON.getInt("String_Node_Str"));
    if (JSON.has("String_Node_Str")) {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
 else {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  return this;
}

Fixed version (ground truth):
public ENSObject parseJSON(JSONObject JSON){
  try {
    this.setBetreff(JSON.getString("String_Node_Str"));
    this.setTime(JSON.getString("String_Node_Str"));
    this.setText(JSON.getString("String_Node_Str"));
    UserObject von=new UserObject();
    von.ParseJSON(JSON.getJSONObject("String_Node_Str"));
    this.setVon(von);
    for (int z=0; z < JSON.getJSONArray("String_Node_Str").length(); z++) {
      UserObject an=new UserObject();
      an.ParseJSON(JSON.getJSONArray("String_Node_Str").getJSONObject(z));
      this.addAnUser(an);
    }
    if (JSON.has("String_Node_Str")) {
      this.setFlags(JSON.getInt("String_Node_Str"));
    }
 else {
      this.setFlags(JSON.getInt("String_Node_Str"));
    }
    this.setENS_id(JSON.getString("String_Node_Str"));
    this.setTyp(JSON.getInt("String_Node_Str"));
    if (JSON.has("String_Node_Str")) {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
 else {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  return this;
}
Program: 98408
Project: 98408
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.enssingle);
  con=this;
  Betreff=(TextView)findViewById(R.id.TxBetreff);
  Absender=(TextView)findViewById(R.id.TxVon);
  Nachricht=(TextView)findViewById(R.id.TxENS);
  ENS=(WebView)findViewById(R.id.WebENS);
  Answer=(Button)findViewById(R.id.BtAnswer);
  Bundle bundle=this.getIntent().getExtras();
  id2=bundle.getString("String_Node_Str");
  if (bundle.containsKey("String_Node_Str")) {
    ENSsql SQL=new ENSsql(this);
    SQL.open();
    msg=SQL.getSingleENS(id2);
    updateUI();
    SQL.close();
  }
 else   if (id2 != "String_Node_Str") {
    final ENSSingle temp=this;
    final ProgressDialog dialog=ProgressDialog.show(temp,"String_Node_Str","String_Node_Str",true);
    new Thread(new Runnable(){
      public void run(){
        try {
          msg=Request.GetENS(id2);
        }
 catch (        Exception e) {
          msg=new ENSObject();
          msg.setText("String_Node_Str");
        }
        temp.runOnUiThread(new Runnable(){
          public void run(){
            dialog.dismiss();
            updateUI();
            saveENS();
          }
        }
);
      }
    }
).start();
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.enssingle);
  con=this;
  Betreff=(TextView)findViewById(R.id.TxBetreff);
  Absender=(TextView)findViewById(R.id.TxVon);
  Nachricht=(TextView)findViewById(R.id.TxENS);
  ENS=(WebView)findViewById(R.id.WebENS);
  Answer=(Button)findViewById(R.id.BtAnswer);
  Bundle bundle=this.getIntent().getExtras();
  id2=bundle.getString("String_Node_Str");
  ENSsql SQL=new ENSsql(this);
  SQL.open();
  msg=SQL.getSingleENS(id2);
  SQL.close();
  updateUI();
  if (msg != null && msg.getText() != "String_Node_Str" && msg.getText() != null) {
    return;
  }
  if (id2 != "String_Node_Str") {
    final ENSSingle temp=this;
    final ProgressDialog dialog=ProgressDialog.show(temp,"String_Node_Str","String_Node_Str",true);
    new Thread(new Runnable(){
      public void run(){
        try {
          msg=Request.GetENS(id2);
          saveENS();
        }
 catch (        Exception e) {
          msg=new ENSObject();
          msg.setText("String_Node_Str");
          UserObject o=new UserObject();
          o.setUsername("String_Node_Str");
          o.setId("String_Node_Str");
          o.setSteckbriefFreigabe(false);
          msg.setVon(o);
          msg.setBetreff("String_Node_Str");
        }
        temp.runOnUiThread(new Runnable(){
          public void run(){
            dialog.dismiss();
            updateUI();
          }
        }
);
      }
    }
).start();
  }
}
Program: 98409
Project: 98409
Buggy source:
public void run(){
  dialog.dismiss();
  updateUI();
  saveENS();
}

Fixed version (ground truth):
public void run(){
  dialog.dismiss();
  updateUI();
}
Program: 98411
Project: 98411
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  View rowView=convertView;
  if (rowView == null) {
    LayoutInflater inflater=context.getLayoutInflater();
    rowView=inflater.inflate(R.layout.gblist,null);
    ViewHolder viewHolder=new ViewHolder();
    viewHolder.text=(TextView)rowView.findViewById(R.id.GBtxt);
    viewHolder.image=(LoadImage)rowView.findViewById(R.id.gbimage);
    viewHolder.info=(TextView)rowView.findViewById(R.id.GBinfo);
    rowView.setTag(viewHolder);
  }
  ViewHolder holder=(ViewHolder)rowView.getTag();
  final GBObject s=names[position];
  holder.image.setImageDrawable(s.getAvatar());
  holder.text.setText(s.getEinleitung());
  holder.info.setText(s.getVon() + "String_Node_Str" + s.getTime());
  if (!s.getVon().getId().equals("String_Node_Str")) {
    holder.info.setOnClickListener(new View.OnClickListener(){
      public void onClick(      View v){
        UserPopUp Menu=new UserPopUp(context,s.getVon().getUsername(),s.getVon().getId());
        Menu.PopUp();
      }
    }
);
  }
  return rowView;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  View rowView=convertView;
  if (rowView == null) {
    LayoutInflater inflater=context.getLayoutInflater();
    rowView=inflater.inflate(R.layout.gblist,null);
    ViewHolder viewHolder=new ViewHolder();
    viewHolder.text=(TextView)rowView.findViewById(R.id.GBtxt);
    viewHolder.image=(LoadImage)rowView.findViewById(R.id.gbimage);
    viewHolder.info=(TextView)rowView.findViewById(R.id.GBinfo);
    rowView.setTag(viewHolder);
  }
  ViewHolder holder=(ViewHolder)rowView.getTag();
  final GBObject s=names[position];
  holder.image.setImageDrawable(s.getAvatar());
  holder.text.setText(s.getEinleitung());
  holder.info.setText(s.getVon().getUsername() + "String_Node_Str" + s.getTime());
  if (!s.getVon().getId().equals("String_Node_Str")) {
    holder.info.setOnClickListener(new View.OnClickListener(){
      public void onClick(      View v){
        UserPopUp Menu=new UserPopUp(context,s.getVon().getUsername(),s.getVon().getId());
        Menu.PopUp();
      }
    }
);
  }
  return rowView;
}
Program: 98412
Project: 98412
Buggy source:
private GBObject[] getGBlist(){
  try {
    JSONObject jsonResponse=new JSONObject(Request.makeSecuredReq("String_Node_Str" + id + "String_Node_Str"));
    GBlist=jsonResponse.getJSONObject("String_Node_Str").getJSONArray("String_Node_Str");
    GBObject[] GBa=new GBObject[(GBlist.length())];
    if (GBlist.length() != 0) {
      for (int i=0; i < GBlist.length(); i++) {
        JSONObject tp=GBlist.getJSONObject(i);
        UserObject von=new UserObject();
        von.ParseJSON(tp.getJSONObject("String_Node_Str"));
        GBa[i].setVon(von);
        GBa[i].setText(tp.getString("String_Node_Str"));
        GBa[i].setEntry_id(tp.getString("String_Node_Str"));
        GBa[i].setTime(tp.getString("String_Node_Str"));
        GBa[i].setAvatar(tp.getString("String_Node_Str"));
      }
    }
 else {
      return new GBObject[]{};
    }
    List=GBa;
    return List;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return new GBObject[]{};
}

Fixed version (ground truth):
private GBObject[] getGBlist(){
  try {
    JSONObject jsonResponse=new JSONObject(Request.makeSecuredReq("String_Node_Str" + id + "String_Node_Str"));
    GBlist=jsonResponse.getJSONObject("String_Node_Str").getJSONArray("String_Node_Str");
    GBObject[] GBa=new GBObject[(GBlist.length())];
    if (GBlist.length() != 0) {
      for (int i=0; i < GBlist.length(); i++) {
        JSONObject tp=GBlist.getJSONObject(i);
        GBa[i]=new GBObject();
        UserObject von=new UserObject();
        von.ParseJSON(tp.getJSONObject("String_Node_Str"));
        GBa[i].setVon(von);
        GBa[i].setText(tp.getString("String_Node_Str"));
        GBa[i].setEntry_id(tp.getString("String_Node_Str"));
        GBa[i].setTime(tp.getString("String_Node_Str"));
        GBa[i].setAvatar(tp.getString("String_Node_Str"));
      }
    }
 else {
      return new GBObject[]{};
    }
    List=GBa;
    return List;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return new GBObject[]{};
}
Program: 98415
Project: 98415
Buggy source:
@Override public JingleIQ proceedSIPInitiate(JingleIQ iq,CallSession session,SipChannel channel){
  try {
    log.debug("String_Node_Str" + iq.toXML());
    final JingleIQ ring=JingleProcessor.createJingleSessionInfo(new JID(iq.getJingle().getSid()),new JID(iq.getJingle().getInitiator()),iq.getFrom() != null ? iq.getFrom().toString() : null,iq.getJingle().getSid(),Info.Type.ringing);
    ring.setFrom(iq.getTo());
    jingleProcessor.processIQ(ring);
  }
 catch (  JingleSipException e) {
    log.warn("String_Node_Str",e);
  }
  return iq;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPInitiate(JingleIQ iq,CallSession session,SipChannel channel){
  try {
    log.debug("String_Node_Str" + iq.toXML());
    final JingleIQ ring=JingleProcessor.createJingleSessionInfo(new JID(iq.getJingle().getResponder()),new JID(iq.getJingle().getInitiator()),iq.getFrom() != null ? iq.getFrom().toString() : null,iq.getJingle().getSid(),Info.Type.ringing);
    ring.setFrom(iq.getTo());
    jingleProcessor.processIQ(ring);
  }
 catch (  JingleSipException e) {
    log.warn("String_Node_Str",e);
  }
  return iq;
}
Program: 98416
Project: 98416
Buggy source:
@Override public void proceedSIPInfo(JingleIQ iq,CallSession session,SipChannel channel){
  if (session != null) {
    callKiller.scheduleKill(session,2);
  }
 else {
    callKiller.scheduleKill(iq,2);
  }
}

Fixed version (ground truth):
@Override public void proceedSIPInfo(JingleIQ iq,CallSession session,SipChannel channel){
  if (session != null) {
    callKiller.scheduleKill(session,sleepTime);
  }
 else {
    callKiller.scheduleKill(iq,sleepTime);
  }
}
Program: 98418
Project: 98418
Buggy source:
public static Message createSipBye(final JingleIQ iq,final SipProviderInfoInterface sipProvider,final Message lastResponse,final CallSession callSession) throws JingleSipException, SipParsingException {
  if (lastResponse == null) {
    throw new JingleSipException("String_Node_Str");
  }
  final Participants p;
  p=Participants.getParticipants(lastResponse);
  final JID from;
  final JID to;
  if (iq.getFrom().toBareJID().equals(p.getResponder().toBareJID())) {
    from=p.getResponder();
    to=p.getInitiator();
  }
 else {
    from=p.getInitiator();
    to=p.getResponder();
  }
  final ContactHeader contactHeader=callSession.getContactHeader(to.toBareJID());
  NameAddress requestURI=null;
  if (contactHeader != null) {
    requestURI=contactHeader.getNameAddress();
  }
  final Message bye=createSipBye(from,to,iq.getJingle().getSid(),sipProvider,lastResponse,requestURI);
  if (bye == null) {
    throw new JingleSipException("String_Node_Str");
  }
  return bye;
}

Fixed version (ground truth):
public static Message createSipBye(final JingleIQ iq,final SipProviderInfoInterface sipProvider,final Message lastResponse,final CallSession callSession) throws JingleSipException, SipParsingException {
  if (lastResponse == null) {
    throw new JingleSipException("String_Node_Str");
  }
  final Participants p;
  p=Participants.getParticipants(lastResponse);
  final JID from;
  final JID to;
  log.debug("String_Node_Str" + iq.toXML() + "String_Node_Str"+ p);
  if (iq.getFrom().toBareJID().equals(p.getResponder().toBareJID()) || !iq.getFrom().toBareJID().equals(p.getInitiator().toBareJID())) {
    from=p.getResponder();
    to=p.getInitiator();
  }
 else {
    from=p.getInitiator();
    to=p.getResponder();
  }
  final ContactHeader contactHeader=callSession.getContactHeader(to.toBareJID());
  NameAddress requestURI=null;
  if (contactHeader != null) {
    requestURI=contactHeader.getNameAddress();
  }
  final Message bye=createSipBye(from,to,iq.getJingle().getSid(),sipProvider,lastResponse,requestURI);
  if (bye == null) {
    throw new JingleSipException("String_Node_Str");
  }
  return bye;
}
Program: 98420
Project: 98420
Buggy source:
@Override public boolean proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return true;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  JID responder=JIDFactory.getInstance().getJID(iq.getJingle().getResponder());
  if (sipToJingleBind != null) {
    log.debug("String_Node_Str" + responder);
    final JID xmppTo=sipToJingleBind.getXmppTo(responder,null);
    if (xmppTo != null) {
      iq.setTo(xmppTo);
      iq.setFrom((JID)null);
    }
 else {
      log.warn("String_Node_Str");
    }
  }
  return iq;
}
Program: 98421
Project: 98421
Buggy source:
@Override public boolean proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  setSessionFinishTime(session,System.currentTimeMillis());
  chargeCall(iq,session);
  return true;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  setSessionFinishTime(session,System.currentTimeMillis());
  chargeCall(iq,session);
  return iq;
}
Program: 98422
Project: 98422
Buggy source:
@Override public boolean proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return true;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return iq;
}
Program: 98423
Project: 98423
Buggy source:
@Override public boolean proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return true;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return iq;
}
Program: 98425
Project: 98425
Buggy source:
@Override public boolean proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  log.info(_createLine(iq));
  return true;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  log.info(_createLine(iq));
  return iq;
}
Program: 98426
Project: 98426
Buggy source:
public abstract boolean proceedSIPTerminate(final JingleIQ iq,final CallSession session,final SipChannel channel);

Fixed version (ground truth):
public abstract JingleIQ proceedSIPTerminate(final JingleIQ iq,final CallSession session,final SipChannel channel);
Program: 98427
Project: 98427
Buggy source:
@Override public boolean proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return true;
}

Fixed version (ground truth):
@Override public JingleIQ proceedSIPTerminate(JingleIQ iq,CallSession session,SipChannel channel){
  return iq;
}
Program: 98428
Project: 98428
Buggy source:
@Override protected void handleResult(IqRequest iq){
  if (iq.getOriginalPacket() instanceof JingleIQ) {
    final JingleIQ jingleIQ=(JingleIQ)iq.getOriginalPacket();
    final CallSession callSession=callSessionMapper.getSession(jingleIQ);
    if (callSession != null) {
      final RelayIQ relayIQ=RelayIQ.parseRelayIq(iq.getResult());
      callSession.setRelayIQ(relayIQ);
    }
  }
}

Fixed version (ground truth):
@Override protected void handleResult(IqRequest iq){
  if (iq.getOriginalPacket() instanceof JingleIQ) {
    final JingleIQ jingleIQ=(JingleIQ)iq.getOriginalPacket();
    final CallSession callSession=callSessionMapper.getSession(jingleIQ);
    if (callSession != null) {
      final RelayIQ relayIQ=RelayIQ.parseRelayIq(iq.getResult());
      callSession.setRelayIQ(relayIQ);
    }
  }
 else   if (iq.getOriginalPacket() instanceof Message) {
    final Message m=(Message)iq.getOriginalPacket();
    final CallSession callSession;
    try {
      callSession=callSessionMapper.getSession(m);
      if (callSession != null) {
        final RelayIQ relayIQ=RelayIQ.parseRelayIq(iq.getResult());
        callSession.setRelayIQ(relayIQ);
      }
    }
 catch (    JingleException e) {
      log.error("String_Node_Str",e);
    }
  }
}
Program: 98429
Project: 98429
Buggy source:
@Override protected String getRequestId(Object obj){
  if (obj instanceof JingleIQ) {
    final JingleIQ iq=(JingleIQ)obj;
    return iq.getJingle().getSid();
  }
  return null;
}

Fixed version (ground truth):
@Override protected String getRequestId(Object obj){
  if (obj instanceof JingleIQ) {
    final JingleIQ iq=(JingleIQ)obj;
    return iq.getJingle().getSid();
  }
 else   if (obj instanceof Message) {
    final Message m=(Message)obj;
    if (m.getCallIdHeader() != null) {
      return m.getCallIdHeader().getCallId();
    }
  }
  return null;
}
Program: 98431
Project: 98431
Buggy source:
@Override public void timeoutRequest(IqRequest iqRequest){
  if (iqRequest.getOriginalPacket() instanceof JingleIQ) {
    callKiller.immediateKill(((JingleIQ)iqRequest.getOriginalPacket()).getJingle().getSid(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
 else   if (iqRequest.getOriginalPacket() instanceof Message) {
    callKiller.immediateKill(((JingleIQ)iqRequest.getOriginalPacket()).getJingle().getSid(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
}

Fixed version (ground truth):
@Override public void timeoutRequest(IqRequest iqRequest){
  if (iqRequest.getOriginalPacket() instanceof JingleIQ) {
    callKiller.immediateKill((JingleIQ)iqRequest.getOriginalPacket(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
 else   if (iqRequest.getOriginalPacket() instanceof Message) {
    callKiller.immediateKill((JingleIQ)iqRequest.getOriginalPacket(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
}
Program: 98432
Project: 98432
Buggy source:
@Override public void receivedError(IqRequest iqRequest){
  if (iqRequest.getOriginalPacket() instanceof JingleIQ) {
    callKiller.immediateKill(((JingleIQ)iqRequest.getOriginalPacket()).getJingle().getSid(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
    prepareStatesManager.cancelCall((JingleIQ)iqRequest.getOriginalPacket(),null,new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
 else   if (iqRequest.getOriginalPacket() instanceof Message) {
    callKiller.immediateKill(((JingleIQ)iqRequest.getOriginalPacket()).getJingle().getSid(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
    prepareStatesManager.cancelCall((Message)iqRequest.getOriginalPacket(),null,null,new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
}

Fixed version (ground truth):
@Override public void receivedError(IqRequest iqRequest){
  if (iqRequest.getOriginalPacket() instanceof JingleIQ) {
    callKiller.immediateKill((JingleIQ)iqRequest.getOriginalPacket(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
    prepareStatesManager.cancelCall((JingleIQ)iqRequest.getOriginalPacket(),null,new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
 else   if (iqRequest.getOriginalPacket() instanceof Message) {
    callKiller.immediateKill((JingleIQ)iqRequest.getOriginalPacket(),new Reason("String_Node_Str",Reason.Type.connectivity_error));
    prepareStatesManager.cancelCall((Message)iqRequest.getOriginalPacket(),null,null,new Reason("String_Node_Str",Reason.Type.connectivity_error));
  }
}
Program: 98433
Project: 98433
Buggy source:
public String getJingleDestination(final IQ res){
  boolean isJingle=false;
  String destination=null;
  log.debug("String_Node_Str" + res.toString());
  for (  Object o : res.getChildElement().elements()) {
    Element e=(Element)o;
    if (e.attributeValue("String_Node_Str").equals(jinglePhoneType)) {
      isJingle=true;
    }
    destination=e.attributeValue("String_Node_Str");
  }
  return isJingle ? destination : null;
}

Fixed version (ground truth):
public String getJingleDestination(final IQ res){
  boolean isJingle=false;
  String destination=null;
  log.debug("String_Node_Str" + res.toString());
  for (  Object o : res.getChildElement().elements()) {
    Element e=(Element)o;
    destination=e.attributeValue("String_Node_Str");
    if (e.attributeValue("String_Node_Str").equals(jinglePhoneType)) {
      isJingle=true;
      break;
    }
  }
  return isJingle ? destination : null;
}
Program: 98434
Project: 98434
Buggy source:
@Override public void receivedError(IqRequest iqRequest){
  if (iqRequest.getOriginalPacket() instanceof JingleIQ) {
    prepareStatesManager.prepareCall((JingleIQ)iqRequest.getOriginalPacket(),null);
  }
}

Fixed version (ground truth):
@Override public void receivedError(IqRequest iqRequest){
  if (iqRequest.getOriginalPacket() instanceof JingleIQ) {
    if (iqRequest.getRequest().getChildElement().getNamespace().getURI().equals(creditServiceProcessor.getNamespace())) {
      prepareStatesManager.prepareCall((JingleIQ)iqRequest.getOriginalPacket(),null);
    }
  }
}
Program: 98435
Project: 98435
Buggy source:
@Override protected void handleIQResult(final IQ iq){
  log.debug("String_Node_Str" + iq.toXML());
  final JID toJid=iq.getTo();
  if (null == toJid)   return;
  final JID fromJid=iq.getFrom();
  if (null == fromJid)   return;
  final Element e=iq.getChildElement();
  if (null == e)   return;
  final Namespace namespace=e.getNamespace();
  if (null == namespace)   return;
  final String ns=namespace.getURI();
  for (  final List<NamespaceProcessor> npl : processors.values()) {
    for (    final NamespaceProcessor np : npl)     np.processIQError(iq);
  }
}

Fixed version (ground truth):
@Override protected void handleIQResult(final IQ iq){
  log.debug("String_Node_Str" + iq.toXML());
  final JID toJid=iq.getTo();
  if (null == toJid)   return;
  final JID fromJid=iq.getFrom();
  if (null == fromJid)   return;
  final Element e=iq.getChildElement();
  if (null == e)   return;
  final Namespace namespace=e.getNamespace();
  if (null == namespace)   return;
  final String ns=namespace.getURI();
  for (  final List<NamespaceProcessor> npl : processors.values()) {
    for (    final NamespaceProcessor np : npl)     np.processIQResult(iq);
  }
}
Program: 98436
Project: 98436
Buggy source:
/** 
 * Creates a new database table based on the public fields available in a class.
 * @param c
 */
private void createTable(Class<?> c){
  String tableName=c.getName().replace('.','_');
  try {
    Field[] fields=c.getFields();
    fields=sortFields(fields);
    Statement statement=conn.createStatement();
    statement.executeUpdate("String_Node_Str" + tableName + "String_Node_Str");
    for (    Field field : fields) {
      Class<?> type=field.getType();
      String dbColType=getDbColType(type.getSimpleName());
      String columnName=field.getName();
      if (!columnName.equals("String_Node_Str")) {
        statement.executeUpdate("String_Node_Str" + tableName + "String_Node_Str"+ columnName+ "String_Node_Str"+ dbColType+ "String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + tableName);
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void createTable(Class<?> c){
  String tableName=c.getName().replace('.','_');
  try {
    Field[] fields=c.getFields();
    fields=sortFields(fields);
    Statement statement=conn.createStatement();
    statement.executeUpdate("String_Node_Str" + tableName + "String_Node_Str");
    for (    Field field : fields) {
      Class<?> type=field.getType();
      String dbColType=getDbColType(type.getSimpleName());
      String columnName=field.getName();
      if (!columnName.equals("String_Node_Str")) {
        statement.executeUpdate("String_Node_Str" + tableName + "String_Node_Str"+ columnName+ "String_Node_Str"+ dbColType+ "String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + tableName);
    e.printStackTrace();
  }
}
Program: 98437
Project: 98437
Buggy source:
/** 
 * @param date
 * @return A string representation of a date in yyyy/MM/dd HH:mm:ss format.
 */
private String getDateString(Date date){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  return df.format(date);
}

Fixed version (ground truth):
private String getDateString(Date date){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  return df.format(date);
}
Program: 98438
Project: 98438
Buggy source:
/** 
 * Loads a list of all products from all tables in the database.
 */
@Override protected List<Product> loadProductList(){
  List<Product> products=new ArrayList<Product>();
  List<String> tableNames=getTableNames();
  for (  String table : tableNames) {
    products.addAll(getProductsFromTable(table));
  }
  return products;
}

Fixed version (ground truth):
@Override protected List<Product> loadProductList(){
  List<Product> products=new ArrayList<Product>();
  List<String> tableNames=getTableNames();
  for (  String table : tableNames) {
    products.addAll(getProductsFromTable(table));
  }
  return products;
}
Program: 98439
Project: 98439
Buggy source:
/** 
 * Sets the database that future transactions will be made to.
 */
@Override protected void setDatabase(String name){
  this.databaseName=name;
  try {
    Class.forName("String_Node_Str");
    conn=DriverManager.getConnection("String_Node_Str" + name);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override protected void setDatabase(String name){
  this.databaseName=name;
  try {
    Class.forName("String_Node_Str");
    conn=DriverManager.getConnection("String_Node_Str" + name);
  }
 catch (  Exception e) {
  }
}
Program: 98440
Project: 98440
Buggy source:
/** 
 * Returns the database column type that corresponds to a particular java datatype.
 * @param javaTypeName
 * @return
 */
private String getDbColType(String javaTypeName){
  if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  return null;
}

Fixed version (ground truth):
private String getDbColType(String javaTypeName){
  if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (javaTypeName.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  return null;
}
Program: 98441
Project: 98441
Buggy source:
/** 
 * Saves a product to DB.
 * @return Whether or not the save was successful.
 */
@Override protected boolean save(Product product){
  Class<?> c=product.getClass();
  String className=c.getName();
  className=className.replace('.','_');
  if (!tableExists(className)) {
    createTable(c);
  }
  return insertIntoTable(className,product);
}

Fixed version (ground truth):
@Override protected boolean save(Product product){
  Class<?> c=product.getClass();
  String className=c.getName();
  className=className.replace('.','_');
  if (!tableExists(className)) {
    createTable(c);
  }
  return insertIntoTable(className,product);
}
Program: 98443
Project: 98443
Buggy source:
/** 
 * Checks whether a table has previously been created.
 * @param className
 * @return
 */
private boolean tableExists(String className){
  className=className.replace('.','_');
  boolean success=false;
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + className + "String_Node_Str");
    if (rs.next()) {
      success=true;
      rs.close();
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
  return success;
}

Fixed version (ground truth):
private boolean tableExists(String className){
  className=className.replace('.','_');
  boolean success=false;
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + className + "String_Node_Str");
    if (rs.next()) {
      success=true;
      rs.close();
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
  return success;
}
Program: 98444
Project: 98444
Buggy source:
/** 
 * @return The names of all the tables that exist in the database.
 */
private List<String> getTableNames(){
  List<String> tableNames=new ArrayList<String>();
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    while (rs.next()) {
      tableNames.add(rs.getString("String_Node_Str").replace('_','.'));
    }
    rs.close();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
  return tableNames;
}

Fixed version (ground truth):
private List<String> getTableNames(){
  List<String> tableNames=new ArrayList<String>();
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    while (rs.next()) {
      tableNames.add(rs.getString("String_Node_Str").replace('_','.'));
    }
    rs.close();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
  return tableNames;
}
Program: 98445
Project: 98445
Buggy source:
/** 
 * Deletes product p from the database
 */
@Override protected void delete(Product p){
  long id=p.id;
  try {
    Statement stmt=conn.createStatement();
    String tableName=extractTableName(p.getClass().getName());
    stmt.executeUpdate("String_Node_Str" + tableName + "String_Node_Str"+ id);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override protected void delete(Product p){
  long id=p.id;
  try {
    Statement stmt=conn.createStatement();
    String tableName=extractTableName(p.getClass().getName());
    stmt.executeUpdate("String_Node_Str" + tableName + "String_Node_Str"+ id);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 98446
Project: 98446
Buggy source:
/** 
 * @param preparedStatement The PreparedStatement we want to set the values for
 * @param field The field that contains the value we want to set
 * @param index The position of the '?' in the preparedStatement that we want to replace
 * @param product Used for retrieving the instance value of field.
 */
private void setPreparedStatementValues(PreparedStatement preparedStatement,Field field,int index,Product product){
  try {
    Class<?> type=field.getType();
    String typeName=type.getSimpleName();
    if (typeName.equals("String_Node_Str")) {
      preparedStatement.setString(index,field.get(product).toString());
    }
 else     if (typeName.equals("String_Node_Str")) {
      preparedStatement.setInt(index,((Color)field.get(product)).getRGB());
    }
 else     if (typeName.equals("String_Node_Str")) {
      preparedStatement.setInt(index,(Integer)field.get(product));
    }
 else     if (typeName.equals("String_Node_Str")) {
      preparedStatement.setDouble(index,(Double)field.get(product));
    }
 else     if (typeName.equals("String_Node_Str")) {
      Date date=(Date)field.get(product);
      preparedStatement.setString(index,getDateString(date));
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void setPreparedStatementValues(PreparedStatement preparedStatement,Field field,int index,Product product){
  try {
    Class<?> type=field.getType();
    String typeName=type.getSimpleName();
    if (typeName.equals("String_Node_Str")) {
      preparedStatement.setString(index,field.get(product).toString());
    }
 else     if (typeName.equals("String_Node_Str")) {
      preparedStatement.setInt(index,((Color)field.get(product)).getRGB());
    }
 else     if (typeName.equals("String_Node_Str")) {
      preparedStatement.setInt(index,(Integer)field.get(product));
    }
 else     if (typeName.equals("String_Node_Str")) {
      preparedStatement.setDouble(index,(Double)field.get(product));
    }
 else     if (typeName.equals("String_Node_Str")) {
      Date date=(Date)field.get(product);
      preparedStatement.setString(index,getDateString(date));
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
}
Program: 98447
Project: 98447
Buggy source:
/** 
 * Custom date parser since DateFormat isn't working for our date format.
 * @param dateString
 * @return A date representation of dateString.
 */
private Date parseDate(String dateString){
  Date date=new Date();
  String[] parts=dateString.split("String_Node_Str");
  String[] yyyymmdd=parts[0].split("String_Node_Str");
  String[] hhmmss=parts[1].split("String_Node_Str");
  date.setYear(new Integer(yyyymmdd[0]) - 1900);
  date.setMonth(new Integer(yyyymmdd[1]) - 1);
  date.setDate(new Integer(yyyymmdd[2]));
  date.setHours(new Integer(hhmmss[0]));
  date.setMinutes(new Integer(hhmmss[1]));
  date.setSeconds(new Integer(hhmmss[2]));
  return date;
}

Fixed version (ground truth):
/** 
 * Custom date parser since DateFormat isn't working for our date format.
 * @param dateString
 * @return A date representation of dateString.
 */
private Date parseDate(String dateString){
  if (dateString.length() > 1) {
    Date date=new Date();
    String[] parts=dateString.split("String_Node_Str");
    String[] yyyymmdd=parts[0].split("String_Node_Str");
    String[] hhmmss=parts[1].split("String_Node_Str");
    date.setYear(new Integer(yyyymmdd[0]) - 1900);
    date.setMonth(new Integer(yyyymmdd[1]) - 1);
    date.setDate(new Integer(yyyymmdd[2]));
    date.setHours(new Integer(hhmmss[0]));
    date.setMinutes(new Integer(hhmmss[1]));
    date.setSeconds(new Integer(hhmmss[2]));
    return date;
  }
 else   return null;
}
Program: 98448
Project: 98448
Buggy source:
/** 
 * Extracts the database table name corresponding to a class.
 * @param className
 * @return
 */
private String extractTableName(String className){
  String tableName=className.replace('.','_');
  if (tableName.contains("String_Node_Str")) {
    tableName=tableName.replace("String_Node_Str","String_Node_Str");
  }
  return tableName;
}

Fixed version (ground truth):
private String extractTableName(String className){
  String tableName=className.replace('.','_');
  if (tableName.contains("String_Node_Str")) {
    tableName=tableName.replace("String_Node_Str","String_Node_Str");
  }
  return tableName;
}
Program: 98449
Project: 98449
Buggy source:
/** 
 * Gets the number of records in the database table corresponding to a class name.
 */
private int getRecordCount(String className){
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + className);
    if (rs.next()) {
      int count=rs.getInt("String_Node_Str");
      rs.close();
      return count;
    }
 else {
      return 0;
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + className);
    e.printStackTrace();
    return -1;
  }
}

Fixed version (ground truth):
private int getRecordCount(String className){
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + className);
    if (rs.next()) {
      int count=rs.getInt("String_Node_Str");
      rs.close();
      return count;
    }
 else {
      return 0;
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + className);
    e.printStackTrace();
    return -1;
  }
}
Program: 98450
Project: 98450
Buggy source:
/** 
 * Provides a mapping from id to product for all instances of a class that are stored in the db.
 */
@Override protected Map<Integer,Product> getIdToProductMap(String className){
  Map<Integer,Product> map=new HashMap<Integer,Product>();
  String tableName=extractTableName(className);
  try {
    Statement stmt=conn.createStatement();
    ResultSet rs;
    if (tableExists(tableName)) {
      rs=stmt.executeQuery("String_Node_Str" + tableName + "String_Node_Str");
      while (rs.next()) {
        Product p=createProductFromResultSet(rs,tableName);
        int id=rs.getInt("String_Node_Str");
        map.put(id,p);
      }
    }
  }
 catch (  Exception e) {
  }
  return map;
}

Fixed version (ground truth):
@Override protected Map<Integer,Product> getIdToProductMap(String className){
  Map<Integer,Product> map=new HashMap<Integer,Product>();
  String tableName=extractTableName(className);
  try {
    Statement stmt=conn.createStatement();
    ResultSet rs;
    if (tableExists(tableName)) {
      rs=stmt.executeQuery("String_Node_Str" + tableName + "String_Node_Str");
      while (rs.next()) {
        Product p=createProductFromResultSet(rs,tableName);
        int id=rs.getInt("String_Node_Str");
        map.put(id,p);
      }
    }
  }
 catch (  Exception e) {
  }
  return map;
}
Program: 98451
Project: 98451
Buggy source:
/** 
 * Sorts a Field array, since Class.getFields returns them in no particular order, and removes duplicate fields that occur when a subclass re-declares a public method.
 */
private Field[] sortFields(Field[] fields){
  Comparator<Field> comp=new FieldComparator();
  List<Field> fieldList=new ArrayList<Field>();
  for (  Field field : fields) {
    boolean add=true;
    for (    Field listField : fieldList) {
      if (field.getName().equals(listField.getName())) {
        add=false;
      }
    }
    if (add) {
      fieldList.add(field);
    }
  }
  Field[] newFields=new Field[fieldList.size()];
  int i=0;
  for (  Field field : fieldList) {
    newFields[i]=field;
    i++;
  }
  Arrays.sort(newFields,comp);
  return newFields;
}

Fixed version (ground truth):
private Field[] sortFields(Field[] fields){
  Comparator<Field> comp=new FieldComparator();
  List<Field> fieldList=new ArrayList<Field>();
  for (  Field field : fields) {
    boolean add=true;
    for (    Field listField : fieldList) {
      if (field.getName().equals(listField.getName())) {
        add=false;
      }
    }
    if (add) {
      fieldList.add(field);
    }
  }
  Field[] newFields=new Field[fieldList.size()];
  int i=0;
  for (  Field field : fieldList) {
    newFields[i]=field;
    i++;
  }
  Arrays.sort(newFields,comp);
  return newFields;
}
Program: 98452
Project: 98452
Buggy source:
/** 
 * Gets all the products from the given table.
 * @param tableName
 * @return
 */
private List<Product> getProductsFromTable(String tableName){
  List<Product> products=new ArrayList<Product>();
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + "String_Node_Str" + tableName + "String_Node_Str");
    while (rs.next()) {
      Product newProduct=createProductFromResultSet(rs,tableName);
      products.add(newProduct);
    }
    rs.close();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + tableName);
    e.printStackTrace();
  }
  return products;
}

Fixed version (ground truth):
private List<Product> getProductsFromTable(String tableName){
  List<Product> products=new ArrayList<Product>();
  try {
    Statement statement=conn.createStatement();
    ResultSet rs=statement.executeQuery("String_Node_Str" + "String_Node_Str" + tableName + "String_Node_Str");
    while (rs.next()) {
      Product newProduct=createProductFromResultSet(rs,tableName);
      products.add(newProduct);
    }
    rs.close();
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + tableName);
    e.printStackTrace();
  }
  return products;
}
Program: 98453
Project: 98453
Buggy source:
/** 
 * Provides a mapping from id to name of all products of a class that are stored in the db.
 */
@Override protected Map<Integer,String> getProductIdsAndNames(String className){
  String tableName=extractTableName(className);
  Map<Integer,String> map=new HashMap<Integer,String>();
  try {
    Statement stmt=conn.createStatement();
    ResultSet rs;
    if (tableExists(tableName)) {
      rs=stmt.executeQuery("String_Node_Str" + "String_Node_Str" + tableName + "String_Node_Str");
      while (rs.next()) {
        map.put(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"));
      }
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
  return map;
}

Fixed version (ground truth):
@Override protected Map<Integer,String> getProductIdsAndNames(String className){
  String tableName=extractTableName(className);
  Map<Integer,String> map=new HashMap<Integer,String>();
  try {
    Statement stmt=conn.createStatement();
    ResultSet rs;
    if (tableExists(tableName)) {
      rs=stmt.executeQuery("String_Node_Str" + "String_Node_Str" + tableName + "String_Node_Str");
      while (rs.next()) {
        map.put(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"));
      }
    }
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
  return map;
}