nus-yam/ex-repair huggingface dataset:
Program: 89108
Project: 89108
Buggy source:
/** 
 * This method creates a XenServer network and configures it for being used as a L2-in-L3 tunneled network
 */
private synchronized Network configureTunnelNetwork(Connection conn,long networkId,long hostId,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,networkId);
    String nwName="String_Node_Str" + key;
    String bridge=nw.getBridge(conn);
    Map<String,String> nwOtherConfig=nw.getOtherConfig(conn);
    String configuredHosts=nwOtherConfig.get("String_Node_Str");
    boolean configured=false;
    if (configuredHosts != null) {
      String hostIdsStr[]=configuredHosts.split("String_Node_Str");
      for (      String hostIdStr : hostIdsStr) {
        if (hostIdStr.equals(((Long)hostId).toString())) {
          configured=true;
          break;
        }
      }
    }
    if (!configured) {
      enableXenServerNetwork(conn,nw,nwName,"String_Node_Str" + key);
      String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge,"String_Node_Str",String.valueOf(key),"String_Node_Str",nw.getUuid(conn),"String_Node_Str",((Long)hostId).toString());
      String[] res=result.split("String_Node_Str");
      if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ networkId+ "String_Node_Str"+ res);
      }
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * This method creates a XenServer network and configures it for being used as a L2-in-L3 tunneled network
 */
private synchronized Network configureTunnelNetwork(Connection conn,long networkId,long hostId,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,key);
    String nwName="String_Node_Str" + key;
    String bridge=nw.getBridge(conn);
    Map<String,String> nwOtherConfig=nw.getOtherConfig(conn);
    String configuredHosts=nwOtherConfig.get("String_Node_Str");
    boolean configured=false;
    if (configuredHosts != null) {
      String hostIdsStr[]=configuredHosts.split("String_Node_Str");
      for (      String hostIdStr : hostIdsStr) {
        if (hostIdStr.equals(((Long)hostId).toString())) {
          configured=true;
          break;
        }
      }
    }
    if (!configured) {
      enableXenServerNetwork(conn,nw,nwName,"String_Node_Str" + key);
      String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge,"String_Node_Str",String.valueOf(key),"String_Node_Str",nw.getUuid(conn),"String_Node_Str",((Long)hostId).toString());
      String[] res=result.split("String_Node_Str");
      if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ networkId+ "String_Node_Str"+ res);
      }
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}
Program: 89109
Project: 89109
Buggy source:
private String handleFetchInterfaceAnswer(Answer[] answers,Long hostId){
  OvsFetchInterfaceAnswer ans=(OvsFetchInterfaceAnswer)answers[0];
  String s=String.format("String_Node_Str",ans.getIp(),ans.getNetmask(),ans.getMac(),ans.getLabel(),hostId);
  s_logger.debug("String_Node_Str" + s);
  OvsTunnelInterfaceVO ti=createInterfaceRecord(ans.getIp(),ans.getNetmask(),ans.getMac(),hostId,ans.getLabel());
  s_logger.debug("String_Node_Str" + ti.getId());
  return ti.getIp();
}

Fixed version (ground truth):
private String handleFetchInterfaceAnswer(Answer[] answers,Long hostId){
  OvsFetchInterfaceAnswer ans=(OvsFetchInterfaceAnswer)answers[0];
  OvsTunnelInterfaceVO ti=createInterfaceRecord(ans.getIp(),ans.getNetmask(),ans.getMac(),hostId,ans.getLabel());
  s_logger.debug("String_Node_Str" + ti.getId());
  return ti.getIp();
}
Program: 89111
Project: 89111
Buggy source:
public long getNetworkId(){
  return networkId;
}

Fixed version (ground truth):
public Long getNetworkId(){
  return networkId;
}
Program: 89112
Project: 89112
Buggy source:
public OvsDestroyBridgeCommand(long networkId){
  this.networkId=networkId;
}

Fixed version (ground truth):
public OvsDestroyBridgeCommand(Long networkId,Integer key){
  this.networkId=networkId;
  this.key=key;
}
Program: 89113
Project: 89113
Buggy source:
public long getNetworkId(){
  return networkId;
}

Fixed version (ground truth):
public Long getNetworkId(){
  return networkId;
}
Program: 89114
Project: 89114
Buggy source:
public OvsDestroyTunnelCommand(long networkId,String inPortName){
  this.networkId=networkId;
  this.inPortName=inPortName;
}

Fixed version (ground truth):
public OvsDestroyTunnelCommand(Long networkId,Integer key,String inPortName){
  this.networkId=networkId;
  this.inPortName=inPortName;
  this.key=key;
}
Program: 89115
Project: 89115
Buggy source:
private synchronized void destroyTunnelNetwork(Connection conn,long networkId){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,networkId);
    String bridge=nw.getBridge(conn);
    String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge);
    String[] res=result.split("String_Node_Str");
    if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
      throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ res);
    }
    return;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return;
  }
}

Fixed version (ground truth):
private synchronized void destroyTunnelNetwork(Connection conn,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,key);
    String bridge=nw.getBridge(conn);
    String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge);
    String[] res=result.split("String_Node_Str");
    if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
      throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ res);
    }
    return;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return;
  }
}
Program: 89116
Project: 89116
Buggy source:
/** 
 * This method just creates a XenServer network following the tunnel network naming convention
 */
private synchronized Network findOrCreateTunnelNetwork(Connection conn,long networkId){
  try {
    String nwName="String_Node_Str" + networkId;
    Network nw=null;
    Network.Record rec=new Network.Record();
    Set<Network> networks=Network.getByNameLabel(conn,nwName);
    if (networks.size() == 0) {
      rec.nameDescription="String_Node_Str" + networkId;
      rec.nameLabel=nwName;
      Map<String,String> otherConfig=new HashMap<String,String>();
      otherConfig.put("String_Node_Str","String_Node_Str");
      rec.otherConfig=otherConfig;
      nw=Network.create(conn,rec);
      enableXenServerNetwork(conn,nw,nwName,"String_Node_Str" + networkId);
      s_logger.debug("String_Node_Str" + nwName);
    }
 else {
      nw=networks.iterator().next();
      s_logger.debug("String_Node_Str" + nwName);
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * This method just creates a XenServer network following the tunnel network naming convention
 */
private synchronized Network findOrCreateTunnelNetwork(Connection conn,long vnetId){
  try {
    String nwName="String_Node_Str" + vnetId;
    Network nw=null;
    Network.Record rec=new Network.Record();
    Set<Network> networks=Network.getByNameLabel(conn,nwName);
    if (networks.size() == 0) {
      rec.nameDescription="String_Node_Str" + vnetId;
      rec.nameLabel=nwName;
      Map<String,String> otherConfig=new HashMap<String,String>();
      otherConfig.put("String_Node_Str","String_Node_Str");
      rec.otherConfig=otherConfig;
      nw=Network.create(conn,rec);
      s_logger.debug("String_Node_Str" + nwName);
    }
 else {
      nw=networks.iterator().next();
      s_logger.debug("String_Node_Str" + nwName);
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}
Program: 89117
Project: 89117
Buggy source:
/** 
 * This method creates a XenServer network and configures it for being used as a L2-in-L3 tunneled network
 */
private synchronized Network configureTunnelNetwork(Connection conn,long networkId,long hostId,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,networkId);
    String bridge=nw.getBridge(conn);
    Map<String,String> nwOtherConfig=nw.getOtherConfig(conn);
    String configuredHosts=nwOtherConfig.get("String_Node_Str");
    boolean configured=false;
    if (configuredHosts != null) {
      String hostIdsStr[]=configuredHosts.split("String_Node_Str");
      for (      String hostIdStr : hostIdsStr) {
        if (hostIdStr.equals(((Long)hostId).toString())) {
          configured=true;
          break;
        }
      }
    }
    if (!configured) {
      String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge,"String_Node_Str",String.valueOf(key),"String_Node_Str",nw.getUuid(conn),"String_Node_Str",((Long)hostId).toString());
      String[] res=result.split("String_Node_Str");
      if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ networkId+ "String_Node_Str"+ res);
      }
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * This method creates a XenServer network and configures it for being used as a L2-in-L3 tunneled network
 */
private synchronized Network configureTunnelNetwork(Connection conn,long networkId,long hostId,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,key);
    String nwName="String_Node_Str" + key;
    String bridge=nw.getBridge(conn);
    Map<String,String> nwOtherConfig=nw.getOtherConfig(conn);
    String configuredHosts=nwOtherConfig.get("String_Node_Str");
    boolean configured=false;
    if (configuredHosts != null) {
      String hostIdsStr[]=configuredHosts.split("String_Node_Str");
      for (      String hostIdStr : hostIdsStr) {
        if (hostIdStr.equals(((Long)hostId).toString())) {
          configured=true;
          break;
        }
      }
    }
    if (!configured) {
      enableXenServerNetwork(conn,nw,nwName,"String_Node_Str" + key);
      String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge,"String_Node_Str",String.valueOf(key),"String_Node_Str",nw.getUuid(conn),"String_Node_Str",((Long)hostId).toString());
      String[] res=result.split("String_Node_Str");
      if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ networkId+ "String_Node_Str"+ res);
      }
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}
Program: 89118
Project: 89118
Buggy source:
public String getKey(){
  return key;
}

Fixed version (ground truth):
public int getKey(){
  return key;
}
Program: 89119
Project: 89119
Buggy source:
/** 
 * This method creates a XenServer network and configures it for being used as a L2-in-L3 tunneled network
 */
private synchronized Network configureTunnelNetwork(Connection conn,long networkId,long hostId,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,networkId);
    String bridge=nw.getBridge(conn);
    Map<String,String> nwOtherConfig=nw.getOtherConfig(conn);
    String configuredHosts=nwOtherConfig.get("String_Node_Str");
    boolean configured=false;
    if (configuredHosts != null) {
      String hostIdsStr[]=configuredHosts.split("String_Node_Str");
      for (      String hostIdStr : hostIdsStr) {
        if (hostIdStr.equals(((Long)hostId).toString())) {
          configured=true;
          break;
        }
      }
    }
    if (!configured) {
      enableXenServerNetwork(conn,nw,nwName,"String_Node_Str" + key);
      String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge,"String_Node_Str",String.valueOf(key),"String_Node_Str",nw.getUuid(conn),"String_Node_Str",((Long)hostId).toString());
      String[] res=result.split("String_Node_Str");
      if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ networkId+ "String_Node_Str"+ res);
      }
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * This method creates a XenServer network and configures it for being used as a L2-in-L3 tunneled network
 */
private synchronized Network configureTunnelNetwork(Connection conn,long networkId,long hostId,int key){
  try {
    Network nw=findOrCreateTunnelNetwork(conn,networkId);
    String nwName="String_Node_Str" + key;
    String bridge=nw.getBridge(conn);
    Map<String,String> nwOtherConfig=nw.getOtherConfig(conn);
    String configuredHosts=nwOtherConfig.get("String_Node_Str");
    boolean configured=false;
    if (configuredHosts != null) {
      String hostIdsStr[]=configuredHosts.split("String_Node_Str");
      for (      String hostIdStr : hostIdsStr) {
        if (hostIdStr.equals(((Long)hostId).toString())) {
          configured=true;
          break;
        }
      }
    }
    if (!configured) {
      enableXenServerNetwork(conn,nw,nwName,"String_Node_Str" + key);
      String result=callHostPlugin(conn,"String_Node_Str","String_Node_Str","String_Node_Str",bridge,"String_Node_Str",String.valueOf(key),"String_Node_Str",nw.getUuid(conn),"String_Node_Str",((Long)hostId).toString());
      String[] res=result.split("String_Node_Str");
      if (res.length != 2 || !res[0].equalsIgnoreCase("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + bridge + "String_Node_Str"+ networkId+ "String_Node_Str"+ res);
      }
    }
    return nw;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    return null;
  }
}
Program: 89124
Project: 89124
Buggy source:
public void OnReceiveClusterServicePdu(ClusterServicePdu pdu){
  try {
    _clusterPduIncomingQueue.put(pdu);
  }
 catch (  InterruptedException e) {
    s_logger.warn("String_Node_Str" + _gson.toJson(pdu) + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void OnReceiveClusterServicePdu(ClusterServicePdu pdu){
  addIncomingClusterPdu(pdu);
}
Program: 89127
Project: 89127
Buggy source:
private void onNotifyingClusterPdu(){
  while (true) {
    try {
      ClusterServicePdu pdu=_clusterPduOutgoingQueue.take();
      if (pdu.isRequest()) {
        String result=dispatchClusterServicePdu(pdu);
        if (result == null)         result="String_Node_Str";
        ClusterServicePdu responsePdu=new ClusterServicePdu();
        responsePdu.setSourcePeer(pdu.getDestPeer());
        responsePdu.setDestPeer(pdu.getSourcePeer());
        responsePdu.setAckSequenceId(pdu.getSequenceId());
        responsePdu.setJsonPackage(result);
        _clusterPduOutgoingQueue.put(responsePdu);
      }
 else {
        ClusterServiceRequestPdu requestPdu=popRequestPdu(pdu.getAckSequenceId());
        if (requestPdu != null) {
          requestPdu.setResponseResult(pdu.getJsonPackage());
synchronized (requestPdu) {
            requestPdu.notifyAll();
          }
        }
 else {
          s_logger.warn("String_Node_Str" + _gson.toJson(pdu));
        }
      }
    }
 catch (    InterruptedException e) {
    }
catch (    Throwable e) {
      s_logger.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void onNotifyingClusterPdu(){
  while (true) {
    try {
      ClusterServicePdu pdu=popIncomingClusterPdu(1000);
      if (pdu == null)       continue;
      if (pdu.isRequest()) {
        String result=dispatchClusterServicePdu(pdu);
        if (result == null)         result="String_Node_Str";
        ClusterServicePdu responsePdu=new ClusterServicePdu();
        responsePdu.setSourcePeer(pdu.getDestPeer());
        responsePdu.setDestPeer(pdu.getSourcePeer());
        responsePdu.setAckSequenceId(pdu.getSequenceId());
        responsePdu.setJsonPackage(result);
        addOutgoingClusterPdu(responsePdu);
      }
 else {
        ClusterServiceRequestPdu requestPdu=popRequestPdu(pdu.getAckSequenceId());
        if (requestPdu != null) {
          requestPdu.setResponseResult(pdu.getJsonPackage());
synchronized (requestPdu) {
            requestPdu.notifyAll();
          }
        }
 else {
          s_logger.warn("String_Node_Str" + _gson.toJson(pdu));
        }
      }
    }
 catch (    Throwable e) {
      s_logger.error("String_Node_Str",e);
    }
  }
}
Program: 89128
Project: 89128
Buggy source:
public void run(){
  HttpContext context=new BasicHttpContext(null);
  try {
    if (s_logger.isTraceEnabled())     s_logger.trace("String_Node_Str" + conn.getRemoteAddress().toString());
    _httpService.handleRequest(conn,context);
    if (s_logger.isTraceEnabled())     s_logger.trace("String_Node_Str" + conn.getRemoteAddress().toString() + "String_Node_Str");
  }
 catch (  ConnectionClosedException ex) {
    s_logger.error("String_Node_Str",ex);
  }
catch (  IOException ex) {
    s_logger.error("String_Node_Str",ex);
  }
catch (  HttpException ex) {
    s_logger.error("String_Node_Str",ex);
  }
 finally {
    try {
      conn.shutdown();
      conn.close();
    }
 catch (    IOException ignore) {
    }
  }
}

Fixed version (ground truth):
public void run(){
  HttpContext context=new BasicHttpContext(null);
  try {
    if (s_logger.isTraceEnabled())     s_logger.trace("String_Node_Str" + conn.getRemoteAddress().toString());
    _httpService.handleRequest(conn,context);
    if (s_logger.isTraceEnabled())     s_logger.trace("String_Node_Str" + conn.getRemoteAddress().toString() + "String_Node_Str");
  }
 catch (  ConnectionClosedException ex) {
    s_logger.error("String_Node_Str",ex);
  }
catch (  IOException ex) {
    s_logger.error("String_Node_Str",ex);
  }
catch (  HttpException ex) {
    s_logger.error("String_Node_Str",ex);
  }
 finally {
    try {
      conn.close();
    }
 catch (    IOException ignore) {
      s_logger.error("String_Node_Str",ignore);
    }
  }
}
Program: 89129
Project: 89129
Buggy source:
@Override public boolean ping(String callingPeer) throws RemoteException {
  if (s_logger.isDebugEnabled()) {
    s_logger.debug("String_Node_Str" + _serviceUrl);
  }
  HttpClient client=getHttpClient();
  PostMethod method=new PostMethod(_serviceUrl);
  method.addParameter("String_Node_Str",Integer.toString(RemoteMethodConstants.METHOD_PING));
  method.addParameter("String_Node_Str",callingPeer);
  String returnVal=executePostMethod(client,method);
  if ("String_Node_Str".equalsIgnoreCase(returnVal)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean ping(String callingPeer) throws RemoteException {
  if (s_logger.isDebugEnabled()) {
    s_logger.debug("String_Node_Str" + _serviceUrl);
  }
  HttpClient client=getHttpClient();
  PostMethod method=new PostMethod(_serviceUrl);
  method.addParameter("String_Node_Str",Integer.toString(RemoteMethodConstants.METHOD_PING));
  method.addParameter("String_Node_Str",callingPeer);
  try {
    String returnVal=executePostMethod(client,method);
    if ("String_Node_Str".equalsIgnoreCase(returnVal)) {
      return true;
    }
    return false;
  }
  finally {
    method.releaseConnection();
  }
}
Program: 89130
Project: 89130
Buggy source:
private HttpClient getHttpClient(){
  HttpClient client=new HttpClient();
  HttpClientParams clientParams=new HttpClientParams();
  clientParams.setSoTimeout(this._requestTimeoutSeconds * 1000);
  client.setParams(clientParams);
  return client;
}

Fixed version (ground truth):
private HttpClient getHttpClient(){
  if (s_client == null) {
    MultiThreadedHttpConnectionManager mgr=new MultiThreadedHttpConnectionManager();
    mgr.getParams().setDefaultMaxConnectionsPerHost(1);
    mgr.getParams().setMaxTotalConnections(1000);
    s_client=new HttpClient(mgr);
    HttpClientParams clientParams=new HttpClientParams();
    clientParams.setSoTimeout(_requestTimeoutSeconds * 1000);
    s_client.setParams(clientParams);
  }
  return s_client;
}
Program: 89131
Project: 89131
Buggy source:
@Override public String execute(ClusterServicePdu pdu) throws RemoteException {
  HttpClient client=getHttpClient();
  PostMethod method=new PostMethod(_serviceUrl);
  method.addParameter("String_Node_Str",Integer.toString(RemoteMethodConstants.METHOD_DELIVER_PDU));
  method.addParameter("String_Node_Str",pdu.getSourcePeer());
  method.addParameter("String_Node_Str",pdu.getDestPeer());
  method.addParameter("String_Node_Str",Long.toString(pdu.getSequenceId()));
  method.addParameter("String_Node_Str",Long.toString(pdu.getAckSequenceId()));
  method.addParameter("String_Node_Str",Long.toString(pdu.getAgentId()));
  method.addParameter("String_Node_Str",pdu.getJsonPackage());
  method.addParameter("String_Node_Str",pdu.isStopOnError() ? "String_Node_Str" : "String_Node_Str");
  method.addParameter("String_Node_Str",pdu.isRequest() ? "String_Node_Str" : "String_Node_Str");
  return executePostMethod(client,method);
}

Fixed version (ground truth):
@Override public String execute(ClusterServicePdu pdu) throws RemoteException {
  HttpClient client=getHttpClient();
  PostMethod method=new PostMethod(_serviceUrl);
  method.addParameter("String_Node_Str",Integer.toString(RemoteMethodConstants.METHOD_DELIVER_PDU));
  method.addParameter("String_Node_Str",pdu.getSourcePeer());
  method.addParameter("String_Node_Str",pdu.getDestPeer());
  method.addParameter("String_Node_Str",Long.toString(pdu.getSequenceId()));
  method.addParameter("String_Node_Str",Long.toString(pdu.getAckSequenceId()));
  method.addParameter("String_Node_Str",Long.toString(pdu.getAgentId()));
  method.addParameter("String_Node_Str",pdu.getJsonPackage());
  method.addParameter("String_Node_Str",pdu.isStopOnError() ? "String_Node_Str" : "String_Node_Str");
  method.addParameter("String_Node_Str",pdu.isRequest() ? "String_Node_Str" : "String_Node_Str");
  try {
    return executePostMethod(client,method);
  }
  finally {
    method.releaseConnection();
  }
}
Program: 89134
Project: 89134
Buggy source:
private StoragePool createCLVMStoragePool(Connect conn,String uuid,String host,String path){
  String volgroupPath="String_Node_Str" + path;
  LibvirtStoragePoolDef spd=new LibvirtStoragePoolDef(poolType.LOGICAL,uuid,uuid,host,volgroupPath,volgroupPath);
  StoragePool sp=null;
  try {
    s_logger.debug(spd.toString());
    sp=conn.storagePoolDefineXML(spd.toString(),0);
    sp.create(0);
    return sp;
  }
 catch (  LibvirtException e) {
    s_logger.debug(e.toString());
    if (sp != null) {
      try {
        sp.undefine();
        sp.free();
      }
 catch (      LibvirtException l) {
        s_logger.debug("String_Node_Str" + l.toString());
      }
    }
    return null;
  }
}

Fixed version (ground truth):
private StoragePool createCLVMStoragePool(Connect conn,String uuid,String host,String path){
  String volgroupPath="String_Node_Str" + path;
  String volgroupName=path;
  volgroupName=volgroupName.replaceFirst("String_Node_Str","String_Node_Str");
  LibvirtStoragePoolDef spd=new LibvirtStoragePoolDef(poolType.LOGICAL,volgroupName,uuid,host,volgroupPath,volgroupPath);
  StoragePool sp=null;
  try {
    s_logger.debug(spd.toString());
    sp=conn.storagePoolDefineXML(spd.toString(),0);
    sp.create(0);
    return sp;
  }
 catch (  LibvirtException e) {
    s_logger.debug(e.toString());
    if (sp != null) {
      try {
        sp.undefine();
        sp.free();
      }
 catch (      LibvirtException l) {
        s_logger.debug("String_Node_Str" + l.toString());
      }
    }
    return null;
  }
}
Program: 89135
Project: 89135
Buggy source:
public long getDataCenterId();

Fixed version (ground truth):
public Long getDataCenterId();
Program: 89136
Project: 89136
Buggy source:
public CapacityVO(long dataCenterId,Long podId,Long clusterId,short capacityType,float usedPercentage){
  this.dataCenterId=dataCenterId;
  this.podId=podId;
  this.clusterId=clusterId;
  this.capacityType=capacityType;
  this.usedPercentage=usedPercentage;
}

Fixed version (ground truth):
public CapacityVO(Long dataCenterId,Long podId,Long clusterId,short capacityType,float usedPercentage){
  this.dataCenterId=dataCenterId;
  this.podId=podId;
  this.clusterId=clusterId;
  this.capacityType=capacityType;
  this.usedPercentage=usedPercentage;
}
Program: 89137
Project: 89137
Buggy source:
public void setDataCenterId(long dataCenterId){
  this.dataCenterId=dataCenterId;
}

Fixed version (ground truth):
public void setDataCenterId(Long dataCenterId){
  this.dataCenterId=dataCenterId;
}
Program: 89138
Project: 89138
Buggy source:
@Override public long getDataCenterId(){
  return dataCenterId;
}

Fixed version (ground truth):
@Override public Long getDataCenterId(){
  return dataCenterId;
}
Program: 89140
Project: 89140
Buggy source:
protected synchronized String attachOrDetachISO(Connect conn,String vmName,String isoPath,boolean isAttach) throws LibvirtException, URISyntaxException, InternalErrorException {
  String isoXml=null;
  if (isoPath != null && isAttach) {
    int index=isoPath.lastIndexOf("String_Node_Str");
    String path=isoPath.substring(0,index);
    String name=isoPath.substring(index + 1);
    KVMStoragePool secondaryPool=_storagePoolMgr.getStoragePoolByURI(path);
    KVMPhysicalDisk isoVol=secondaryPool.getPhysicalDisk(name);
    isoPath=isoVol.getPath();
    DiskDef iso=new DiskDef();
    iso.defISODisk(isoPath);
    isoXml=iso.toString();
  }
 else {
    DiskDef iso=new DiskDef();
    iso.defISODisk(null);
    isoXml=iso.toString();
  }
  List<DiskDef> disks=getDisks(conn,vmName);
  String result=attachOrDetachDevice(conn,true,vmName,isoXml);
  if (result == null && !isAttach) {
    for (    DiskDef disk : disks) {
      if (disk.getDeviceType() == DiskDef.deviceType.CDROM) {
        cleanupDisk(conn,disk);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
protected synchronized String attachOrDetachISO(Connect conn,String vmName,String isoPath,boolean isAttach) throws LibvirtException, URISyntaxException, InternalErrorException {
  String isoXml=null;
  if (isoPath != null && isAttach) {
    int index=isoPath.lastIndexOf("String_Node_Str");
    String path=isoPath.substring(0,index);
    String name=isoPath.substring(index + 1);
    KVMStoragePool secondaryPool=_storagePoolMgr.getStoragePoolByURI(path,UUID.nameUUIDFromBytes(isoPath.getBytes()).toString());
    KVMPhysicalDisk isoVol=secondaryPool.getPhysicalDisk(name);
    isoPath=isoVol.getPath();
    DiskDef iso=new DiskDef();
    iso.defISODisk(isoPath);
    isoXml=iso.toString();
  }
 else {
    DiskDef iso=new DiskDef();
    iso.defISODisk(null);
    isoXml=iso.toString();
  }
  List<DiskDef> disks=getDisks(conn,vmName);
  String result=attachOrDetachDevice(conn,true,vmName,isoXml);
  if (result == null && !isAttach) {
    for (    DiskDef disk : disks) {
      if (disk.getDeviceType() == DiskDef.deviceType.CDROM) {
        cleanupDisk(conn,disk);
      }
    }
  }
  return result;
}
Program: 89141
Project: 89141
Buggy source:
private String getVolumePath(Connect conn,VolumeTO volume) throws LibvirtException, URISyntaxException {
  if (volume.getType() == Volume.Type.ISO && volume.getPath() != null) {
    String isoPath=volume.getPath();
    int index=isoPath.lastIndexOf("String_Node_Str");
    String path=isoPath.substring(0,index);
    String name=isoPath.substring(index + 1);
    KVMStoragePool secondaryPool=_storagePoolMgr.getStoragePoolByURI(path);
    KVMPhysicalDisk isoVol=secondaryPool.getPhysicalDisk(name);
    return isoVol.getPath();
  }
 else {
    return volume.getPath();
  }
}

Fixed version (ground truth):
private String getVolumePath(Connect conn,VolumeTO volume) throws LibvirtException, URISyntaxException {
  if (volume.getType() == Volume.Type.ISO && volume.getPath() != null) {
    String isoPath=volume.getPath();
    int index=isoPath.lastIndexOf("String_Node_Str");
    String path=isoPath.substring(0,index);
    String name=isoPath.substring(index + 1);
    KVMStoragePool secondaryPool=_storagePoolMgr.getStoragePoolByURI(path,UUID.nameUUIDFromBytes(isoPath.getBytes()).toString());
    KVMPhysicalDisk isoVol=secondaryPool.getPhysicalDisk(name);
    return isoVol.getPath();
  }
 else {
    return volume.getPath();
  }
}
Program: 89142
Project: 89142
Buggy source:
public KVMStoragePool getStoragePoolByURI(String uri){
  return this._storageAdaptor.getStoragePoolByUri(uri);
}

Fixed version (ground truth):
public KVMStoragePool getStoragePoolByURI(String uri,String uuid){
  return this._storageAdaptor.getStoragePoolByUri(uri,uuid);
}
Program: 89143
Project: 89143
Buggy source:
@Override public KVMStoragePool getStoragePoolByUri(String uri){
  URI storageUri=null;
  try {
    storageUri=new URI(uri);
  }
 catch (  URISyntaxException e) {
    throw new CloudRuntimeException(e.toString());
  }
  String sourcePath=null;
  String uuid=null;
  String sourceHost="String_Node_Str";
  StoragePoolType protocal=null;
  if (storageUri.getScheme().equalsIgnoreCase("String_Node_Str")) {
    sourcePath=storageUri.getPath();
    sourcePath=sourcePath.replace("String_Node_Str","String_Node_Str");
    sourceHost=storageUri.getHost();
    uuid=UUID.randomUUID().toString();
    protocal=StoragePoolType.NetworkFilesystem;
  }
  return createStoragePool(uuid,sourceHost,sourcePath,protocal);
}

Fixed version (ground truth):
@Override public KVMStoragePool getStoragePoolByUri(String uri,String name){
  URI storageUri=null;
  try {
    storageUri=new URI(uri);
  }
 catch (  URISyntaxException e) {
    throw new CloudRuntimeException(e.toString());
  }
  String sourcePath=null;
  String sourceHost="String_Node_Str";
  StoragePoolType protocal=null;
  if (storageUri.getScheme().equalsIgnoreCase("String_Node_Str")) {
    sourcePath=storageUri.getPath();
    sourcePath=sourcePath.replace("String_Node_Str","String_Node_Str");
    sourceHost=storageUri.getHost();
    protocal=StoragePoolType.NetworkFilesystem;
  }
  return createStoragePool(name,sourceHost,sourcePath,protocal);
}
Program: 89144
Project: 89144
Buggy source:
public KVMStoragePool getStoragePoolByUri(String uri);

Fixed version (ground truth):
public KVMStoragePool getStoragePoolByUri(String uri,String name);
Program: 89145
Project: 89145
Buggy source:
private void dropKeysIfExist(Connection conn){
  HashMap<String,List<String>> uniqueKeys=new HashMap<String,List<String>>();
  List<String> keys=new ArrayList<String>();
  keys.add("String_Node_Str");
  uniqueKeys.put("String_Node_Str",keys);
  uniqueKeys.put("String_Node_Str",keys);
  s_logger.debug("String_Node_Str");
  for (  String tableName : uniqueKeys.keySet()) {
    DbUpgradeUtils.dropKeysIfExist(conn,tableName,uniqueKeys.get(tableName),true);
  }
}

Fixed version (ground truth):
private void dropKeysIfExist(Connection conn){
  HashMap<String,List<String>> uniqueKeys=new HashMap<String,List<String>>();
  List<String> keys=new ArrayList<String>();
  keys.add("String_Node_Str");
  uniqueKeys.put("String_Node_Str",keys);
  uniqueKeys.put("String_Node_Str",keys);
  s_logger.debug("String_Node_Str");
  for (  String tableName : uniqueKeys.keySet()) {
    DbUpgradeUtils.dropKeysIfExist(conn,tableName,uniqueKeys.get(tableName),false);
  }
}
Program: 89146
Project: 89146
Buggy source:
@Override public UserVm startVirtualMachine(long vmId) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
  return null;
}

Fixed version (ground truth):
@Override public UserVm startVirtualMachine(long vmId,Long hostId) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
  return null;
}
Program: 89154
Project: 89154
Buggy source:
@Override @DB @ActionEvent(eventType=EventTypes.EVENT_SNAPSHOT_DELETE,eventDescription="String_Node_Str",async=true) public boolean deleteSnapshot(long snapshotId){
  Account caller=UserContext.current().getCaller();
  Snapshot snapshotCheck=_snapshotDao.findByIdIncludingRemoved(snapshotId);
  if (snapshotCheck == null) {
    throw new InvalidParameterValueException("String_Node_Str" + snapshotId);
  }
  _accountMgr.checkAccess(caller,null,true,snapshotCheck);
  if (!Status.BackedUp.equals(snapshotCheck.getStatus())) {
    throw new InvalidParameterValueException("String_Node_Str" + snapshotId + "String_Node_Str");
  }
  return deleteSnapshotInternal(snapshotId);
}

Fixed version (ground truth):
@Override @DB @ActionEvent(eventType=EventTypes.EVENT_SNAPSHOT_DELETE,eventDescription="String_Node_Str",async=true) public boolean deleteSnapshot(long snapshotId){
  Account caller=UserContext.current().getCaller();
  Snapshot snapshotCheck=_snapshotDao.findById(snapshotId);
  if (snapshotCheck == null) {
    throw new InvalidParameterValueException("String_Node_Str" + snapshotId);
  }
  _accountMgr.checkAccess(caller,null,true,snapshotCheck);
  if (!Status.BackedUp.equals(snapshotCheck.getStatus())) {
    throw new InvalidParameterValueException("String_Node_Str" + snapshotId + "String_Node_Str");
  }
  return deleteSnapshotInternal(snapshotId);
}
Program: 89156
Project: 89156
Buggy source:
boolean areServicesEnabledInZone(long zoneId,long networkOfferingId,String tags,List<Service> services);

Fixed version (ground truth):
boolean areServicesEnabledInZone(long zoneId,NetworkOffering offering,List<Service> services);
Program: 89157
Project: 89157
Buggy source:
@Override public boolean areServicesEnabledInZone(long zoneId,long networkOfferingId,String tags,List<Service> services){
  long physicalNtwkId=findPhysicalNetworkId(zoneId,tags,null);
  boolean result=true;
  List<String> checkedProvider=new ArrayList<String>();
  for (  Service service : services) {
    List<String> providerNames=_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(networkOfferingId,service);
    for (    String providerName : providerNames) {
      if (!checkedProvider.contains(providerName)) {
        result=result && isProviderEnabledInPhysicalNetwork(physicalNtwkId,providerName);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public boolean areServicesEnabledInZone(long zoneId,NetworkOffering offering,List<Service> services){
  long physicalNtwkId=findPhysicalNetworkId(zoneId,offering.getTags(),offering.getTrafficType());
  boolean result=true;
  List<String> checkedProvider=new ArrayList<String>();
  for (  Service service : services) {
    List<String> providerNames=_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(),service);
    for (    String providerName : providerNames) {
      if (!checkedProvider.contains(providerName)) {
        result=result && isProviderEnabledInPhysicalNetwork(physicalNtwkId,providerName);
      }
    }
  }
  return result;
}
Program: 89158
Project: 89158
Buggy source:
@Override public boolean areServicesEnabledInZone(long zoneId,long networkOfferingId,String tags,List<Service> services){
  return false;
}

Fixed version (ground truth):
@Override public boolean areServicesEnabledInZone(long zoneId,NetworkOffering offering,List<Service> services){
  return false;
}
Program: 89159
Project: 89159
Buggy source:
@Override public void startAgentHttpHandlerInVM(StartupProxyCommand startupCmd){
  StartConsoleProxyAgentHttpHandlerCommand cmd=null;
  if (_configDao.isPremium()) {
    String storePassword=String.valueOf(_random.nextLong());
    byte[] ksBits=_ksMgr.getKeystoreBits(ConsoleProxyManager.CERTIFICATE_NAME,ConsoleProxyManager.CERTIFICATE_NAME,storePassword);
    assert(ksBits != null);
    if (ksBits == null) {
      s_logger.error("String_Node_Str");
    }
    cmd=new StartConsoleProxyAgentHttpHandlerCommand(ksBits,storePassword);
  }
 else {
    cmd=new StartConsoleProxyAgentHttpHandlerCommand();
  }
  try {
    long proxyVmId=startupCmd.getProxyVmId();
    ConsoleProxyVO consoleProxy=_consoleProxyDao.findById(proxyVmId);
    assert(consoleProxy != null);
    HostVO consoleProxyHost=findConsoleProxyHostByName(consoleProxy.getHostName());
    Answer answer=_agentMgr.send(consoleProxyHost.getId(),cmd);
    if (answer == null || !answer.getResult()) {
      s_logger.error("String_Node_Str");
    }
 else {
      s_logger.info("String_Node_Str");
    }
  }
 catch (  AgentUnavailableException e) {
    s_logger.error("String_Node_Str" + startupCmd.getProxyVmId(),e);
  }
catch (  OperationTimedoutException e) {
    s_logger.error("String_Node_Str" + startupCmd.getProxyVmId(),e);
  }
catch (  OutOfMemoryError e) {
    s_logger.error("String_Node_Str");
    System.exit(1);
  }
catch (  Exception e) {
    s_logger.error("String_Node_Str" + startupCmd.getProxyVmId(),e);
  }
}

Fixed version (ground truth):
@Override public void startAgentHttpHandlerInVM(StartupProxyCommand startupCmd){
  StartConsoleProxyAgentHttpHandlerCommand cmd=null;
  if (_configDao.isPremium()) {
    String storePassword=String.valueOf(_random.nextLong());
    byte[] ksBits=_ksMgr.getKeystoreBits(ConsoleProxyManager.CERTIFICATE_NAME,ConsoleProxyManager.CERTIFICATE_NAME,storePassword);
    assert(ksBits != null);
    if (ksBits == null) {
      s_logger.error("String_Node_Str");
    }
    cmd=new StartConsoleProxyAgentHttpHandlerCommand(ksBits,storePassword);
  }
 else {
    cmd=new StartConsoleProxyAgentHttpHandlerCommand();
  }
  try {
    long proxyVmId=startupCmd.getProxyVmId();
    ConsoleProxyVO consoleProxy=_consoleProxyDao.findById(proxyVmId);
    if (consoleProxy == null) {
      s_logger.info("String_Node_Str" + proxyVmId + "String_Node_Str");
      return;
    }
    assert(consoleProxy != null);
    HostVO consoleProxyHost=findConsoleProxyHostByName(consoleProxy.getHostName());
    Answer answer=_agentMgr.send(consoleProxyHost.getId(),cmd);
    if (answer == null || !answer.getResult()) {
      s_logger.error("String_Node_Str");
    }
 else {
      s_logger.info("String_Node_Str");
    }
  }
 catch (  AgentUnavailableException e) {
    s_logger.error("String_Node_Str" + startupCmd.getProxyVmId(),e);
  }
catch (  OperationTimedoutException e) {
    s_logger.error("String_Node_Str" + startupCmd.getProxyVmId(),e);
  }
catch (  OutOfMemoryError e) {
    s_logger.error("String_Node_Str");
    System.exit(1);
  }
catch (  Exception e) {
    s_logger.error("String_Node_Str" + startupCmd.getProxyVmId(),e);
  }
}
Program: 89160
Project: 89160
Buggy source:
@Override public NicProfile allocate(Network config,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
  if (_networkMgr.networkIsConfiguredForExternalNetworking(config.getDataCenterId(),config.getId()) && nic != null && nic.getRequestedIp() != null) {
    throw new CloudRuntimeException("String_Node_Str" + nic);
  }
  NicProfile profile=super.allocate(config,nic,vm);
  if (_ovsNetworkMgr.isOvsNetworkEnabled() || _tunnelMgr.isOvsTunnelEnabled()) {
    return null;
  }
  if (_networkMgr.networkIsConfiguredForExternalNetworking(config.getDataCenterId(),config.getId())) {
    profile.setStrategy(ReservationStrategy.Start);
    profile.setIp4Address(null);
    profile.setGateway(null);
    profile.setNetmask(null);
  }
  return profile;
}

Fixed version (ground truth):
@Override public NicProfile allocate(Network config,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
  if (_networkMgr.networkIsConfiguredForExternalNetworking(config.getDataCenterId(),config.getId()) && nic != null && nic.getRequestedIp() != null) {
    throw new CloudRuntimeException("String_Node_Str" + nic);
  }
  NicProfile profile=super.allocate(config,nic,vm);
  if (_ovsNetworkMgr.isOvsNetworkEnabled() || _tunnelMgr.isOvsTunnelEnabled()) {
    return null;
  }
  if (_networkMgr.networkIsConfiguredForExternalNetworking(config.getDataCenterId(),config.getId())) {
    profile.setStrategy(ReservationStrategy.Start);
    profile.setGateway(null);
    profile.setNetmask(null);
  }
  return profile;
}
Program: 89161
Project: 89161
Buggy source:
@Override public KVMStoragePool createStoragePool(String name,String host,String path,StoragePoolType type){
  StoragePool sp=null;
  Connect conn=null;
  try {
    conn=LibvirtConnection.getConnection();
  }
 catch (  LibvirtException e) {
    throw new CloudRuntimeException(e.toString());
  }
  try {
    sp=conn.storagePoolLookupByUUIDString(name);
  }
 catch (  LibvirtException e) {
  }
  if (sp == null) {
    if (type == StoragePoolType.NetworkFilesystem) {
      sp=createNfsStoragePool(conn,name,host,path);
    }
 else     if (type == StoragePoolType.SharedMountPoint || type == StoragePoolType.Filesystem) {
      sp=CreateSharedStoragePool(conn,name,host,path);
    }
 else     if (type == StoragePoolType.CLVM) {
      sp=createCLVMStoragePool(conn,name,host,path);
    }
  }
  try {
    StoragePoolInfo spi=sp.getInfo();
    if (spi.state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
      sp.create(0);
    }
    LibvirtStoragePoolDef spd=getStoragePoolDef(conn,sp);
    LibvirtStoragePool pool=new LibvirtStoragePool(name,sp.getName(),type,this,sp);
    pool.setLocalPath(spd.getTargetPath());
    if (pool.getType() == StoragePoolType.CLVM) {
      pool.setCapacity(sp.getInfo().capacity);
      pool.setUsed(sp.getInfo().allocation);
    }
 else {
      getStats(pool);
    }
    return pool;
  }
 catch (  LibvirtException e) {
    throw new CloudRuntimeException(e.toString());
  }
}

Fixed version (ground truth):
@Override public KVMStoragePool createStoragePool(String name,String host,String path,StoragePoolType type){
  StoragePool sp=null;
  Connect conn=null;
  try {
    conn=LibvirtConnection.getConnection();
  }
 catch (  LibvirtException e) {
    throw new CloudRuntimeException(e.toString());
  }
  try {
    sp=conn.storagePoolLookupByUUIDString(name);
    if (sp.getInfo().state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
      sp.undefine();
      sp=null;
    }
  }
 catch (  LibvirtException e) {
  }
  if (sp == null) {
    if (type == StoragePoolType.NetworkFilesystem) {
      sp=createNfsStoragePool(conn,name,host,path);
    }
 else     if (type == StoragePoolType.SharedMountPoint || type == StoragePoolType.Filesystem) {
      sp=CreateSharedStoragePool(conn,name,host,path);
    }
 else     if (type == StoragePoolType.CLVM) {
      sp=createCLVMStoragePool(conn,name,host,path);
    }
  }
  try {
    StoragePoolInfo spi=sp.getInfo();
    if (spi.state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
      sp.create(0);
    }
    LibvirtStoragePoolDef spd=getStoragePoolDef(conn,sp);
    LibvirtStoragePool pool=new LibvirtStoragePool(name,sp.getName(),type,this,sp);
    pool.setLocalPath(spd.getTargetPath());
    if (pool.getType() == StoragePoolType.CLVM) {
      pool.setCapacity(sp.getInfo().capacity);
      pool.setUsed(sp.getInfo().allocation);
    }
 else {
      getStats(pool);
    }
    return pool;
  }
 catch (  LibvirtException e) {
    throw new CloudRuntimeException(e.toString());
  }
}
Program: 89162
Project: 89162
Buggy source:
public StorageVol getVolumeFromURI(Connect conn,String volPath) throws LibvirtException, URISyntaxException {
  int index=volPath.lastIndexOf("String_Node_Str");
  URI volDir=null;
  StoragePool sp=null;
  StorageVol vol=null;
  try {
    volDir=new URI(volPath.substring(0,index));
    String volName=volPath.substring(index + 1);
    sp=getStoragePoolbyURI(conn,volDir);
    vol=sp.storageVolLookupByName(volName);
    return vol;
  }
 catch (  LibvirtException e) {
    s_logger.debug("String_Node_Str" + e.toString());
    throw e;
  }
 finally {
    try {
      if (sp != null) {
        sp.free();
      }
    }
 catch (    LibvirtException e) {
    }
  }
}

Fixed version (ground truth):
public StorageVol getVolumeFromURI(Connect conn,String volPath) throws LibvirtException, URISyntaxException {
}
Program: 89163
Project: 89163
Buggy source:
public Command[] getCommands(){
  if (_cmds == null) {
    try {
      _cmds=s_gson.fromJson(_content,Command[].class);
    }
 catch (    RuntimeException e) {
      s_logger.error("String_Node_Str" + _content,e);
      throw e;
    }
  }
  return _cmds;
}

Fixed version (ground truth):
public Command[] getCommands(){
  if (_cmds == null) {
    try {
      StringReader reader=new StringReader(_content);
      JsonReader jsonReader=new JsonReader(reader);
      jsonReader.setLenient(true);
      _cmds=s_gson.fromJson(jsonReader,(Type)Command[].class);
    }
 catch (    RuntimeException e) {
      s_logger.error("String_Node_Str" + _content,e);
      throw e;
    }
  }
  return _cmds;
}
Program: 89172
Project: 89172
Buggy source:
@Override public List<? extends SSHKeyPair> listSSHKeyPairs(ListSSHKeyPairsCmd cmd){
  String name=cmd.getName();
  String fingerPrint=cmd.getFingerprint();
  Account caller=UserContext.current().getCaller();
  List<Long> permittedAccounts=new ArrayList<Long>();
  Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject=new Ternary<Long,Boolean,ListProjectResourcesCriteria>(cmd.getDomainId(),cmd.isRecursive(),null);
  _accountMgr.buildACLSearchParameters(caller,null,cmd.getAccountName(),cmd.getProjectId(),permittedAccounts,domainIdRecursiveListProject,cmd.listAll());
  Long domainId=domainIdRecursiveListProject.first();
  Boolean isRecursive=domainIdRecursiveListProject.second();
  ListProjectResourcesCriteria listProjectResourcesCriteria=domainIdRecursiveListProject.third();
  SearchBuilder<SSHKeyPairVO> sb=_sshKeyPairDao.createSearchBuilder();
  _accountMgr.buildACLSearchBuilder(sb,domainId,isRecursive,permittedAccounts,listProjectResourcesCriteria);
  Filter searchFilter=new Filter(SSHKeyPairVO.class,"String_Node_Str",false,cmd.getStartIndex(),cmd.getPageSizeVal());
  SearchCriteria<SSHKeyPairVO> sc=sb.create();
  _accountMgr.buildACLSearchCriteria(sc,domainId,isRecursive,permittedAccounts,listProjectResourcesCriteria);
  if (name != null) {
    sc.addAnd("String_Node_Str",SearchCriteria.Op.EQ,name);
  }
  if (fingerPrint != null) {
    sc.addAnd("String_Node_Str",SearchCriteria.Op.EQ,fingerPrint);
  }
  return _sshKeyPairDao.search(sc,searchFilter);
}

Fixed version (ground truth):
@Override public List<? extends SSHKeyPair> listSSHKeyPairs(ListSSHKeyPairsCmd cmd){
  String name=cmd.getName();
  String fingerPrint=cmd.getFingerprint();
  Account caller=UserContext.current().getCaller();
  List<Long> permittedAccounts=new ArrayList<Long>();
  Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject=new Ternary<Long,Boolean,ListProjectResourcesCriteria>(cmd.getDomainId(),cmd.isRecursive(),null);
  _accountMgr.buildACLSearchParameters(caller,null,cmd.getAccountName(),cmd.getProjectId(),permittedAccounts,domainIdRecursiveListProject,cmd.listAll(),false);
  Long domainId=domainIdRecursiveListProject.first();
  Boolean isRecursive=domainIdRecursiveListProject.second();
  ListProjectResourcesCriteria listProjectResourcesCriteria=domainIdRecursiveListProject.third();
  SearchBuilder<SSHKeyPairVO> sb=_sshKeyPairDao.createSearchBuilder();
  _accountMgr.buildACLSearchBuilder(sb,domainId,isRecursive,permittedAccounts,listProjectResourcesCriteria);
  Filter searchFilter=new Filter(SSHKeyPairVO.class,"String_Node_Str",false,cmd.getStartIndex(),cmd.getPageSizeVal());
  SearchCriteria<SSHKeyPairVO> sc=sb.create();
  _accountMgr.buildACLSearchCriteria(sc,domainId,isRecursive,permittedAccounts,listProjectResourcesCriteria);
  if (name != null) {
    sc.addAnd("String_Node_Str",SearchCriteria.Op.EQ,name);
  }
  if (fingerPrint != null) {
    sc.addAnd("String_Node_Str",SearchCriteria.Op.EQ,fingerPrint);
  }
  return _sshKeyPairDao.search(sc,searchFilter);
}