nus-yam/ex-repair huggingface dataset:
Program: 106481
Project: 106481
Buggy source:
public void deletePortProfile(String name) throws CloudRuntimeException {
  String command=VsmCommand.getDeletePortProfile(name);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void deletePortProfile(String name) throws CloudRuntimeException {
  String command=VsmCommand.getDeletePortProfile(name);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    parseOkReply(sendAndReceive(command));
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106482
Project: 106482
Buggy source:
public void updatePortProfile(String name,SwitchPortMode mode,List<Pair<VsmCommand.OperationType,String>> params) throws CloudRuntimeException {
  String command=VsmCommand.getUpdatePortProfile(name,mode,params);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void updatePortProfile(String name,SwitchPortMode mode,List<Pair<VsmCommand.OperationType,String>> params) throws CloudRuntimeException {
  String command=VsmCommand.getUpdatePortProfile(name,mode,params);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    parseOkReply(sendAndReceive(command));
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106484
Project: 106484
Buggy source:
private String receive(){
  byte[] buffer=new byte[8192];
  InputStream inputStream=_session.getStdout();
  try {
    while (true) {
      if (inputStream.available() == 0) {
        int conditions=_session.waitForCondition(ChannelCondition.STDOUT_DATA | ChannelCondition.STDERR_DATA | ChannelCondition.EOF,3000);
        if ((conditions & ChannelCondition.TIMEOUT) != 0) {
          break;
        }
        if ((conditions & ChannelCondition.EOF) != 0) {
          if ((conditions & (ChannelCondition.STDOUT_DATA | ChannelCondition.STDERR_DATA)) == 0) {
            break;
          }
        }
      }
      while (inputStream.available() > 0) {
        inputStream.read(buffer);
      }
    }
  }
 catch (  Exception e) {
    s_logger.error("String_Node_Str" + e.getMessage());
    throw new CloudRuntimeException("String_Node_Str" + e.getMessage());
  }
  return new String(buffer);
}

Fixed version (ground truth):
private String receive(){
  String response=new String("String_Node_Str");
  InputStream inputStream=_session.getStdout();
  try {
    Delimiter delimiter=new Delimiter();
    byte[] buffer=new byte[1024];
    int count=0;
    while (true) {
      int data=inputStream.read();
      if (data != -1) {
        byte[] dataStream=delimiter.parse(data);
        if (delimiter.endReached()) {
          response+=new String(buffer,0,count);
          break;
        }
        if (dataStream != null) {
          for (int i=0; i < dataStream.length; i++) {
            buffer[count]=dataStream[i];
            count++;
            if (count == 1024) {
              response+=new String(buffer,0,count);
              count=0;
            }
          }
        }
      }
 else {
        break;
      }
    }
  }
 catch (  final Exception e) {
    throw new CloudRuntimeException("String_Node_Str" + e.getMessage());
  }
  return response;
}
Program: 106485
Project: 106485
Buggy source:
public void detachServicePolicy(String policyMap,String portProfile) throws CloudRuntimeException {
  String command=VsmCommand.getServicePolicy(policyMap,portProfile,false);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void detachServicePolicy(String policyMap,String portProfile) throws CloudRuntimeException {
  String command=VsmCommand.getServicePolicy(policyMap,portProfile,false);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106486
Project: 106486
Buggy source:
public void attachServicePolicy(String policyMap,String portProfile) throws CloudRuntimeException {
  String command=VsmCommand.getServicePolicy(policyMap,portProfile,true);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void attachServicePolicy(String policyMap,String portProfile) throws CloudRuntimeException {
  String command=VsmCommand.getServicePolicy(policyMap,portProfile,true);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106487
Project: 106487
Buggy source:
public void addPortProfile(String name,PortProfileType type,BindingType binding,SwitchPortMode mode,int vlanid) throws CloudRuntimeException {
  String command=VsmCommand.getAddPortProfile(name,type,binding,mode,vlanid);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void addPortProfile(String name,PortProfileType type,BindingType binding,SwitchPortMode mode,int vlanid) throws CloudRuntimeException {
  String command=VsmCommand.getAddPortProfile(name,type,binding,mode,vlanid);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    for (int i=0; i < s_retryCount; ++i) {
      send(command);
      VsmOkResponse response=new VsmOkResponse(receive().trim());
      if (!response.isResponseOk()) {
        if (i >= s_retryCount) {
          throw new CloudRuntimeException(response.toString());
        }
        try {
          Thread.sleep(1000);
        }
 catch (        final InterruptedException e) {
          s_logger.debug("String_Node_Str");
        }
      }
 else {
        break;
      }
    }
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106488
Project: 106488
Buggy source:
public void queryStatus() throws CloudRuntimeException {
  String status="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ SSH_NETCONF_TERMINATOR;
  send(status);
  parseReply(receive());
}

Fixed version (ground truth):
public void queryStatus() throws CloudRuntimeException {
  String status="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ SSH_NETCONF_TERMINATOR;
  send(status);
  parseOkReply(receive());
}
Program: 106489
Project: 106489
Buggy source:
public void deletePolicyMap(String name) throws CloudRuntimeException {
  String command=VsmCommand.getDeletePolicyMap(name);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void deletePolicyMap(String name) throws CloudRuntimeException {
  String command=VsmCommand.getDeletePolicyMap(name);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106490
Project: 106490
Buggy source:
public void addPolicyMap(String name,int averageRate,int maxRate,int burstRate) throws CloudRuntimeException {
  String command=VsmCommand.getPolicyMap(name,averageRate,maxRate,burstRate);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void addPolicyMap(String name,int averageRate,int maxRate,int burstRate) throws CloudRuntimeException {
  String command=VsmCommand.getPolicyMap(name,averageRate,maxRate,burstRate);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106491
Project: 106491
Buggy source:
public void deletePortProfile(String name) throws CloudRuntimeException {
  String command=VsmCommand.getDeletePortProfile(name);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void deletePortProfile(String name) throws CloudRuntimeException {
  String command=VsmCommand.getDeletePortProfile(name);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106492
Project: 106492
Buggy source:
public void updatePortProfile(String name,SwitchPortMode mode,List<Pair<VsmCommand.OperationType,String>> params) throws CloudRuntimeException {
  String command=VsmCommand.getUpdatePortProfile(name,mode,params);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void updatePortProfile(String name,SwitchPortMode mode,List<Pair<VsmCommand.OperationType,String>> params) throws CloudRuntimeException {
  String command=VsmCommand.getUpdatePortProfile(name,mode,params);
  if (command != null) {
    command=command.concat(SSH_NETCONF_TERMINATOR);
    send(command);
    parseOkReply(receive());
  }
 else {
    throw new CloudRuntimeException("String_Node_Str");
  }
}
Program: 106493
Project: 106493
Buggy source:
public String getKey(){
  return key;
}

Fixed version (ground truth):
public int getKey(){
  return key;
}
Program: 106494
Project: 106494
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: 106497
Project: 106497
Buggy source:
public long getNetworkId(){
  return networkId;
}

Fixed version (ground truth):
public Long getNetworkId(){
  return networkId;
}
Program: 106498
Project: 106498
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: 106499
Project: 106499
Buggy source:
public long getNetworkId(){
  return networkId;
}

Fixed version (ground truth):
public Long getNetworkId(){
  return networkId;
}
Program: 106500
Project: 106500
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: 106501
Project: 106501
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: 106502
Project: 106502
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: 106503
Project: 106503
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: 106506
Project: 106506
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: 106509
Project: 106509
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: 106510
Project: 106510
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: 106511
Project: 106511
Buggy source:
public ClusterServiceServletImpl(String serviceUrl,int requestTimeoutSeconds){
  s_logger.info("String_Node_Str" + serviceUrl + "String_Node_Str"+ requestTimeoutSeconds+ "String_Node_Str");
  this._serviceUrl=serviceUrl;
  this._requestTimeoutSeconds=requestTimeoutSeconds;
  _gson=GsonHelper.getGson();
}

Fixed version (ground truth):
public ClusterServiceServletImpl(String serviceUrl,int requestTimeoutSeconds){
  s_logger.info("String_Node_Str" + serviceUrl + "String_Node_Str"+ requestTimeoutSeconds+ "String_Node_Str");
  this._serviceUrl=serviceUrl;
  this._requestTimeoutSeconds=requestTimeoutSeconds;
}
Program: 106512
Project: 106512
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: 106513
Project: 106513
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: 106514
Project: 106514
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: 106516
Project: 106516
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: 106517
Project: 106517
Buggy source:
public long getDataCenterId();

Fixed version (ground truth):
public Long getDataCenterId();
Program: 106518
Project: 106518
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: 106519
Project: 106519
Buggy source:
public void setDataCenterId(long dataCenterId){
  this.dataCenterId=dataCenterId;
}

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

Fixed version (ground truth):
@Override public Long getDataCenterId(){
  return dataCenterId;
}
Program: 106528
Project: 106528
Buggy source:
@Override @DB public void postCreateSnapshot(Long volumeId,Long snapshotId,Long policyId,boolean backedUp){
  Long userId=getSnapshotUserId();
  SnapshotVO snapshot=_snapshotDao.findByIdIncludingRemoved(snapshotId);
  if (snapshot.isRecursive()) {
    postCreateRecurringSnapshotForPolicy(userId,volumeId,snapshotId,policyId);
  }
}

Fixed version (ground truth):
@Override @DB public void postCreateSnapshot(Long volumeId,Long snapshotId,Long policyId,boolean backedUp){
  Long userId=getSnapshotUserId();
  SnapshotVO snapshot=_snapshotDao.findById(snapshotId);
  if (snapshot != null && snapshot.isRecursive()) {
    postCreateRecurringSnapshotForPolicy(userId,volumeId,snapshotId,policyId);
  }
}
Program: 106531
Project: 106531
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: 106534
Project: 106534
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: 106535
Project: 106535
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: 106536
Project: 106536
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: 106537
Project: 106537
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: 106538
Project: 106538
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: 106539
Project: 106539
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: 106540
Project: 106540
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: 106541
Project: 106541
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;
}