nus-yam/ex-repair huggingface dataset:
Program: 89178
Project: 89178
Buggy source:
@Override public Set<Pair<Long,Long>> listIsos(ListIsosCmd cmd) throws IllegalArgumentException, InvalidParameterValueException {
  TemplateFilter isoFilter=TemplateFilter.valueOf(cmd.getIsoFilter());
  Account caller=UserContext.current().getCaller();
  boolean listAll=(caller.getType() != Account.ACCOUNT_TYPE_NORMAL && (isoFilter != null && isoFilter == TemplateFilter.all));
  List<Long> permittedAccountIds=new ArrayList<Long>();
  Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject=new Ternary<Long,Boolean,ListProjectResourcesCriteria>(cmd.getDomainId(),cmd.isRecursive(),null);
  _accountMgr.buildACLSearchParameters(caller,cmd.getId(),cmd.getAccountName(),cmd.getProjectId(),permittedAccountIds,domainIdRecursiveListProject,listAll);
  ListProjectResourcesCriteria listProjectResourcesCriteria=domainIdRecursiveListProject.third();
  List<Account> permittedAccounts=new ArrayList<Account>();
  for (  Long accountId : permittedAccountIds) {
    permittedAccounts.add(_accountMgr.getAccount(accountId));
  }
  HypervisorType hypervisorType=HypervisorType.getType(cmd.getHypervisor());
  return listTemplates(cmd.getId(),cmd.getIsoName(),cmd.getKeyword(),isoFilter,true,cmd.isBootable(),cmd.getPageSizeVal(),cmd.getStartIndex(),cmd.getZoneId(),hypervisorType,true,cmd.listInReadyState(),permittedAccounts,caller,listProjectResourcesCriteria);
}

Fixed version (ground truth):
@Override public Set<Pair<Long,Long>> listIsos(ListIsosCmd cmd) throws IllegalArgumentException, InvalidParameterValueException {
  TemplateFilter isoFilter=TemplateFilter.valueOf(cmd.getIsoFilter());
  Account caller=UserContext.current().getCaller();
  boolean listAll=(caller.getType() != Account.ACCOUNT_TYPE_NORMAL && (isoFilter != null && isoFilter == TemplateFilter.all));
  List<Long> permittedAccountIds=new ArrayList<Long>();
  Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject=new Ternary<Long,Boolean,ListProjectResourcesCriteria>(cmd.getDomainId(),cmd.isRecursive(),null);
  _accountMgr.buildACLSearchParameters(caller,cmd.getId(),cmd.getAccountName(),cmd.getProjectId(),permittedAccountIds,domainIdRecursiveListProject,listAll,false);
  ListProjectResourcesCriteria listProjectResourcesCriteria=domainIdRecursiveListProject.third();
  List<Account> permittedAccounts=new ArrayList<Account>();
  for (  Long accountId : permittedAccountIds) {
    permittedAccounts.add(_accountMgr.getAccount(accountId));
  }
  HypervisorType hypervisorType=HypervisorType.getType(cmd.getHypervisor());
  return listTemplates(cmd.getId(),cmd.getIsoName(),cmd.getKeyword(),isoFilter,true,cmd.isBootable(),cmd.getPageSizeVal(),cmd.getStartIndex(),cmd.getZoneId(),hypervisorType,true,cmd.listInReadyState(),permittedAccounts,caller,listProjectResourcesCriteria);
}
Program: 89181
Project: 89181
Buggy source:
void buildACLSearchParameters(Account caller,Long id,String accountName,Long projectId,List<Long> permittedAccounts,Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject,boolean listAll);

Fixed version (ground truth):
void buildACLSearchParameters(Account caller,Long id,String accountName,Long projectId,List<Long> permittedAccounts,Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject,boolean listAll,boolean forProjectInvitation);
Program: 89187
Project: 89187
Buggy source:
protected HashMap<String,Pair<String,State>> fullClusterSync(Connection conn){
  XenServerPoolVms vms=new XenServerPoolVms();
  try {
    Map<VM,VM.Record> vm_map=VM.getAllRecords(conn);
    for (    VM.Record record : vm_map.values()) {
      if (record.isControlDomain || record.isASnapshot || record.isATemplate) {
        continue;
      }
      String vm_name=record.nameLabel;
      VmPowerState ps=record.powerState;
      final State state=convertToState(ps);
      Host host=record.residentOn;
      String host_uuid=null;
      if (!isRefNull(host)) {
        host_uuid=host.getUuid(conn);
        vms.put(_cluster,host_uuid,vm_name,state);
      }
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str" + vm_name + "String_Node_Str"+ ps+ "String_Node_Str"+ state.toString());
      }
    }
  }
 catch (  final Throwable e) {
    String msg="String_Node_Str" + _host.uuid + "String_Node_Str"+ e.toString();
    s_logger.warn(msg,e);
    throw new CloudRuntimeException(msg);
  }
  return vms.getClusterVmState(_cluster);
}

Fixed version (ground truth):
protected HashMap<String,Pair<String,State>> fullClusterSync(Connection conn){
synchronized (_cluster.intern()) {
    s_vms.clear(_cluster);
  }
  try {
    Map<VM,VM.Record> vm_map=VM.getAllRecords(conn);
    for (    VM.Record record : vm_map.values()) {
      if (record.isControlDomain || record.isASnapshot || record.isATemplate) {
        continue;
      }
      String vm_name=record.nameLabel;
      VmPowerState ps=record.powerState;
      final State state=convertToState(ps);
      Host host=record.residentOn;
      String host_uuid=null;
      if (!isRefNull(host)) {
        host_uuid=host.getUuid(conn);
synchronized (_cluster.intern()) {
          s_vms.put(_cluster,host_uuid,vm_name,state);
        }
      }
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str" + vm_name + "String_Node_Str"+ ps+ "String_Node_Str"+ state.toString());
      }
    }
  }
 catch (  final Throwable e) {
    String msg="String_Node_Str" + _host.uuid + "String_Node_Str"+ e.toString();
    s_logger.warn(msg,e);
    throw new CloudRuntimeException(msg);
  }
  return s_vms.getClusterVmState(_cluster);
}
Program: 89188
Project: 89188
Buggy source:
@Override protected FenceAnswer execute(FenceCommand cmd){
  Connection conn=getConnection();
  try {
    String result=callHostPluginPremium(conn,"String_Node_Str","String_Node_Str",cmd.getHostGuid(),"String_Node_Str",Integer.toString(_heartbeatInterval * 2));
    if (!result.contains("String_Node_Str")) {
      s_logger.debug("String_Node_Str");
      return new FenceAnswer(cmd,false,"String_Node_Str");
    }
    Set<VM> vms=VM.getByNameLabel(conn,cmd.getVmName());
    for (    VM vm : vms) {
      Set<VDI> vdis=new HashSet<VDI>();
      Set<VBD> vbds=vm.getVBDs(conn);
      for (      VBD vbd : vbds) {
        VDI vdi=vbd.getVDI(conn);
        if (!isRefNull(vdi)) {
          vdis.add(vdi);
        }
      }
      vm.powerStateReset(conn);
      vm.destroy(conn);
      for (      VDI vdi : vdis) {
        Map<String,String> smConfig=vdi.getSmConfig(conn);
        for (        String key : smConfig.keySet()) {
          if (key.startsWith("String_Node_Str")) {
            vdi.removeFromSmConfig(conn,key);
            break;
          }
        }
      }
    }
    return new FenceAnswer(cmd);
  }
 catch (  XmlRpcException e) {
    s_logger.warn("String_Node_Str",e);
    return new FenceAnswer(cmd,false,e.getMessage());
  }
catch (  XenAPIException e) {
    s_logger.warn("String_Node_Str",e);
    return new FenceAnswer(cmd,false,e.getMessage());
  }
}

Fixed version (ground truth):
@Override protected FenceAnswer execute(FenceCommand cmd){
  Connection conn=getConnection();
  try {
    String result=callHostPluginPremium(conn,"String_Node_Str","String_Node_Str",cmd.getHostGuid(),"String_Node_Str",Integer.toString(_heartbeatInterval * 2));
    if (!result.contains("String_Node_Str")) {
      s_logger.debug("String_Node_Str");
      return new FenceAnswer(cmd,false,"String_Node_Str");
    }
    Set<VM> vms=VM.getByNameLabel(conn,cmd.getVmName());
    for (    VM vm : vms) {
      Set<VDI> vdis=new HashSet<VDI>();
      Set<VBD> vbds=vm.getVBDs(conn);
      for (      VBD vbd : vbds) {
        VDI vdi=vbd.getVDI(conn);
        if (!isRefNull(vdi)) {
          vdis.add(vdi);
        }
      }
synchronized (_cluster.intern()) {
        s_vms.remove(_cluster,_name,vm.getNameLabel(conn));
      }
      s_logger.info("String_Node_Str" + cmd.getVmName());
      vm.powerStateReset(conn);
      vm.destroy(conn);
      for (      VDI vdi : vdis) {
        Map<String,String> smConfig=vdi.getSmConfig(conn);
        for (        String key : smConfig.keySet()) {
          if (key.startsWith("String_Node_Str")) {
            vdi.removeFromSmConfig(conn,key);
            break;
          }
        }
      }
    }
    return new FenceAnswer(cmd);
  }
 catch (  XmlRpcException e) {
    s_logger.warn("String_Node_Str",e);
    return new FenceAnswer(cmd,false,e.getMessage());
  }
catch (  XenAPIException e) {
    s_logger.warn("String_Node_Str",e);
    return new FenceAnswer(cmd,false,e.getMessage());
  }
}
Program: 89192
Project: 89192
Buggy source:
@Override public void performDataMigration(Connection conn){
  encryptData(conn);
  dropKeysIfExist(conn);
  setupPhysicalNetworks(conn);
}

Fixed version (ground truth):
@Override public void performDataMigration(Connection conn){
  encryptData(conn);
  dropKeysIfExist(conn);
  setupPhysicalNetworks(conn);
  createNetworkOfferingServices(conn);
}
Program: 89193
Project: 89193
Buggy source:
private void encryptData(Connection conn){
  encryptConfigValues(conn);
  encryptHostDetails(conn);
  encryptVNCPassword(conn);
  encryptUserCredentials(conn);
  createNetworkOfferingServices(conn);
}

Fixed version (ground truth):
private void encryptData(Connection conn){
  encryptConfigValues(conn);
  encryptHostDetails(conn);
  encryptVNCPassword(conn);
  encryptUserCredentials(conn);
}
Program: 89194
Project: 89194
Buggy source:
public void test2213to30Upgrade() throws SQLException {
}

Fixed version (ground truth):
public void test2213to30Upgrade() throws SQLException {
  s_logger.debug("String_Node_Str");
  DbTestUtils.executeScript("String_Node_Str",false,true);
  DatabaseUpgradeChecker checker=ComponentLocator.inject(DatabaseUpgradeChecker.class);
  checker.upgrade("String_Node_Str","String_Node_Str");
  Connection conn=Transaction.getStandaloneConnection();
  try {
    checkPhysicalNetworks(conn);
    checkNetworkOfferings(conn);
  }
  finally {
    try {
      conn.close();
    }
 catch (    SQLException e) {
    }
  }
}
Program: 89197
Project: 89197
Buggy source:
private boolean restartNetwork(long networkId,Account callerAccount,User callerUser,boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
  NetworkVO network=_networksDao.findById(networkId);
  s_logger.debug("String_Node_Str" + networkId + "String_Node_Str");
  ReservationContext context=new ReservationContextImpl(null,null,callerUser,callerAccount);
  if (cleanup) {
    s_logger.debug("String_Node_Str" + networkId + "String_Node_Str");
    if (!shutdownNetworkElementsAndResources(context,true,network)) {
      s_logger.debug("String_Node_Str" + network.getState());
      setRestartRequired(network,true);
      return false;
    }
  }
 else {
    s_logger.debug("String_Node_Str" + networkId);
  }
  DeployDestination dest=new DeployDestination(_dcDao.findById(network.getDataCenterId()),null,null,null);
  s_logger.debug("String_Node_Str" + network + "String_Node_Str");
  NetworkOfferingVO offering=_networkOfferingDao.findById(network.getNetworkOfferingId());
  try {
    implementNetworkElementsAndResources(dest,context,network,offering);
    setRestartRequired(network,true);
  }
 catch (  Exception ex) {
    s_logger.warn("String_Node_Str" + network + "String_Node_Str",ex);
    return false;
  }
  setRestartRequired(network,false);
  return true;
}

Fixed version (ground truth):
private boolean restartNetwork(long networkId,Account callerAccount,User callerUser,boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
  NetworkVO network=_networksDao.findById(networkId);
  s_logger.debug("String_Node_Str" + networkId + "String_Node_Str");
  ReservationContext context=new ReservationContextImpl(null,null,callerUser,callerAccount);
  if (cleanup) {
    if (network.getGuestType() != GuestType.Isolated) {
      s_logger.warn("String_Node_Str");
      return false;
    }
    s_logger.debug("String_Node_Str" + networkId + "String_Node_Str");
    if (!shutdownNetworkElementsAndResources(context,true,network)) {
      s_logger.debug("String_Node_Str" + network.getState());
      setRestartRequired(network,true);
      return false;
    }
  }
 else {
    s_logger.debug("String_Node_Str" + networkId);
  }
  DeployDestination dest=new DeployDestination(_dcDao.findById(network.getDataCenterId()),null,null,null);
  s_logger.debug("String_Node_Str" + network + "String_Node_Str");
  NetworkOfferingVO offering=_networkOfferingDao.findById(network.getNetworkOfferingId());
  try {
    implementNetworkElementsAndResources(dest,context,network,offering);
    setRestartRequired(network,true);
  }
 catch (  Exception ex) {
    s_logger.warn("String_Node_Str" + network + "String_Node_Str",ex);
    return false;
  }
  setRestartRequired(network,false);
  return true;
}
Program: 89202
Project: 89202
Buggy source:
private boolean doMaintain(final long hostId){
  HostVO host=_hostDao.findById(hostId);
  MaintainAnswer answer=(MaintainAnswer)_agentMgr.easySend(hostId,new MaintainCommand());
  if (answer == null || !answer.getResult()) {
    s_logger.warn("String_Node_Str" + hostId);
    return false;
  }
  try {
    resourceStateTransitTo(host,ResourceState.Event.AdminAskMaintenace,_nodeId);
  }
 catch (  NoTransitionException e) {
    String err="String_Node_Str" + host.getId() + "String_Node_Str"+ ResourceState.Maintenance;
    s_logger.debug(err,e);
    throw new CloudRuntimeException(err + e.getMessage());
  }
  _agentMgr.pullAgentToMaintenance(hostId);
  if (host.getType() == Host.Type.Routing) {
    final List<VMInstanceVO> vms=_vmDao.listByHostId(hostId);
    if (vms.size() == 0) {
      return true;
    }
    List<HostVO> hosts=listAllUpAndEnabledHosts(Host.Type.Routing,host.getClusterId(),host.getPodId(),host.getDataCenterId());
    for (    final VMInstanceVO vm : vms) {
      if (hosts == null || hosts.size() <= 1 || !answer.getMigrate()) {
        _haMgr.scheduleStop(vm,hostId,WorkType.ForceStop);
      }
 else {
        _haMgr.scheduleMigration(vm);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean doMaintain(final long hostId){
  HostVO host=_hostDao.findById(hostId);
  MaintainAnswer answer=(MaintainAnswer)_agentMgr.easySend(hostId,new MaintainCommand());
  if (answer == null || !answer.getResult()) {
    s_logger.warn("String_Node_Str" + hostId);
  }
  try {
    resourceStateTransitTo(host,ResourceState.Event.AdminAskMaintenace,_nodeId);
  }
 catch (  NoTransitionException e) {
    String err="String_Node_Str" + host.getId() + "String_Node_Str"+ ResourceState.Maintenance;
    s_logger.debug(err,e);
    throw new CloudRuntimeException(err + e.getMessage());
  }
  _agentMgr.pullAgentToMaintenance(hostId);
  if (host.getType() == Host.Type.Routing) {
    final List<VMInstanceVO> vms=_vmDao.listByHostId(hostId);
    if (vms.size() == 0) {
      return true;
    }
    List<HostVO> hosts=listAllUpAndEnabledHosts(Host.Type.Routing,host.getClusterId(),host.getPodId(),host.getDataCenterId());
    for (    final VMInstanceVO vm : vms) {
      if (hosts == null || hosts.size() <= 1 || !answer.getMigrate()) {
        _haMgr.scheduleStop(vm,hostId,WorkType.ForceStop);
      }
 else {
        _haMgr.scheduleMigration(vm);
      }
    }
  }
  return true;
}
Program: 89203
Project: 89203
Buggy source:
private boolean doCancelMaintenance(long hostId){
  HostVO host;
  host=_hostDao.findById(hostId);
  if (host == null || host.getRemoved() != null) {
    s_logger.warn("String_Node_Str" + hostId);
    return true;
  }
  if (host.getResourceState() != ResourceState.PrepareForMaintenance && host.getResourceState() != ResourceState.Maintenance && host.getResourceState() != ResourceState.ErrorInMaintenance) {
    throw new CloudRuntimeException("String_Node_Str" + host.getResourceState() + "String_Node_Str"+ hostId);
  }
  _haMgr.cancelScheduledMigrations(host);
  List<VMInstanceVO> vms=_haMgr.findTakenMigrationWork();
  for (  VMInstanceVO vm : vms) {
    if (vm.getHostId() != null && vm.getHostId() == hostId) {
      s_logger.info("String_Node_Str" + vm);
      return false;
    }
  }
  try {
    resourceStateTransitTo(host,ResourceState.Event.AdminCancelMaintenance,_nodeId);
    _agentMgr.pullAgentOutMaintenance(hostId);
    return true;
  }
 catch (  NoTransitionException e) {
    s_logger.debug("String_Node_Str" + host.getId() + "String_Node_Str",e);
    return false;
  }
}

Fixed version (ground truth):
private boolean doCancelMaintenance(long hostId){
  HostVO host;
  host=_hostDao.findById(hostId);
  if (host == null || host.getRemoved() != null) {
    s_logger.warn("String_Node_Str" + hostId);
    return true;
  }
  if (host.getResourceState() != ResourceState.PrepareForMaintenance && host.getResourceState() != ResourceState.Maintenance && host.getResourceState() != ResourceState.ErrorInMaintenance) {
    throw new CloudRuntimeException("String_Node_Str" + host.getResourceState() + "String_Node_Str"+ hostId);
  }
  _haMgr.cancelScheduledMigrations(host);
  List<VMInstanceVO> vms=_haMgr.findTakenMigrationWork();
  for (  VMInstanceVO vm : vms) {
    if (vm.getHostId() != null && vm.getHostId() == hostId) {
      s_logger.info("String_Node_Str" + vm);
      return false;
    }
  }
  try {
    resourceStateTransitTo(host,ResourceState.Event.AdminCancelMaintenance,_nodeId);
    _agentMgr.pullAgentOutMaintenance(hostId);
    if (host.getHypervisorType() == HypervisorType.KVM) {
      _hostDao.loadDetails(host);
      String password=host.getDetail("String_Node_Str");
      String username=host.getDetail("String_Node_Str");
      if (password == null || username == null) {
        s_logger.debug("String_Node_Str");
        return false;
      }
      com.trilead.ssh2.Connection connection=SSHCmdHelper.acquireAuthorizedConnection(host.getPrivateIpAddress(),22,username,password);
      if (connection == null) {
        s_logger.debug("String_Node_Str" + host.getPrivateIpAddress());
        return false;
      }
      try {
        SSHCmdHelper.sshExecuteCmdOneShot(connection,"String_Node_Str");
      }
 catch (      sshException e) {
        return false;
      }
    }
    return true;
  }
 catch (  NoTransitionException e) {
    s_logger.debug("String_Node_Str" + host.getId() + "String_Node_Str",e);
    return false;
  }
}
Program: 89205
Project: 89205
Buggy source:
public void uploadVmdkFile(String httpMethod,String urlString,String localFileName,long totalBytesUpdated,ActionDelegate progressUpdater) throws Exception {
  HttpURLConnection conn=getRawHTTPConnection(urlString);
  conn.setDoOutput(true);
  conn.setUseCaches(false);
  conn.setChunkedStreamingMode(_CHUNKSIZE);
  conn.setRequestMethod(httpMethod);
  conn.setRequestProperty("String_Node_Str","String_Node_Str");
  conn.setRequestProperty("String_Node_Str","String_Node_Str");
  conn.setRequestProperty("String_Node_Str",Long.toString(new File(localFileName).length()));
  conn.connect();
  BufferedOutputStream bos=null;
  BufferedInputStream is=null;
  try {
    bos=new BufferedOutputStream(conn.getOutputStream());
    is=new BufferedInputStream(new FileInputStream(localFileName));
    int bytesAvailable=is.available();
    int bufferSize=Math.min(bytesAvailable,_CHUNKSIZE);
    byte[] buffer=new byte[bufferSize];
    while (true) {
      int bytesRead=is.read(buffer,0,bufferSize);
      if (bytesRead == -1) {
        break;
      }
      bos.write(buffer,0,bufferSize);
      totalBytesUpdated+=bytesRead;
      bos.flush();
      if (progressUpdater != null)       progressUpdater.action(new Long(totalBytesUpdated));
    }
    bos.flush();
  }
  finally {
    if (is != null)     is.close();
    if (bos != null)     bos.close();
    conn.disconnect();
  }
}

Fixed version (ground truth):
public void uploadVmdkFile(String httpMethod,String urlString,String localFileName,long totalBytesUpdated,ActionDelegate progressUpdater) throws Exception {
  HttpURLConnection conn=getRawHTTPConnection(urlString);
  conn.setDoOutput(true);
  conn.setUseCaches(false);
  conn.setChunkedStreamingMode(_CHUNKSIZE);
  conn.setRequestMethod(httpMethod);
  conn.setRequestProperty("String_Node_Str","String_Node_Str");
  conn.setRequestProperty("String_Node_Str","String_Node_Str");
  conn.setRequestProperty("String_Node_Str",Long.toString(new File(localFileName).length()));
  conn.connect();
  BufferedOutputStream bos=null;
  BufferedInputStream is=null;
  try {
    bos=new BufferedOutputStream(conn.getOutputStream());
    is=new BufferedInputStream(new FileInputStream(localFileName));
    int bufferSize=_CHUNKSIZE;
    byte[] buffer=new byte[bufferSize];
    while (true) {
      int bytesRead=is.read(buffer,0,bufferSize);
      if (bytesRead == -1) {
        break;
      }
      bos.write(buffer,0,bytesRead);
      totalBytesUpdated+=bytesRead;
      bos.flush();
      if (progressUpdater != null)       progressUpdater.action(new Long(totalBytesUpdated));
    }
    bos.flush();
  }
  finally {
    if (is != null)     is.close();
    if (bos != null)     bos.close();
    conn.disconnect();
  }
}
Program: 89207
Project: 89207
Buggy source:
@Override public void checkVirtualNetworkCidrOverlap(Long zoneId,String cidr){
  if (zoneId == null) {
    return;
  }
  List<NetworkVO> networks=_networksDao.listByZone((long)zoneId);
  Map<Long,String> networkToCidr=new HashMap<Long,String>();
  for (  NetworkVO network : networks) {
    if (network.getGuestType() != GuestType.Isolated) {
      continue;
    }
    networkToCidr.put(network.getId(),network.getCidr());
  }
  if (networkToCidr == null || networkToCidr.isEmpty()) {
    return;
  }
  String currCidrAddress=getCidrAddress(cidr);
  int currCidrSize=getCidrSize(cidr);
  for (  long networkId : networkToCidr.keySet()) {
    String ntwkCidr=networkToCidr.get(networkId);
    String ntwkCidrAddress=getCidrAddress(ntwkCidr);
    int ntwkCidrSize=getCidrSize(ntwkCidr);
    long cidrSizeToUse=currCidrSize < ntwkCidrSize ? currCidrSize : ntwkCidrSize;
    String ntwkCidrSubnet=NetUtils.getCidrSubNet(getCidrAddress(ntwkCidr),cidrSizeToUse);
    String cidrSubnet=NetUtils.getCidrSubNet(currCidrAddress,cidrSizeToUse);
    if (cidrSubnet.equals(ntwkCidrSubnet)) {
      throw new InvalidParameterValueException("String_Node_Str" + networkId + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void checkVirtualNetworkCidrOverlap(Long zoneId,String cidr){
  if (zoneId == null) {
    return;
  }
  if (cidr == null) {
    return;
  }
  List<NetworkVO> networks=_networksDao.listByZone((long)zoneId);
  Map<Long,String> networkToCidr=new HashMap<Long,String>();
  for (  NetworkVO network : networks) {
    if (network.getGuestType() != GuestType.Isolated) {
      continue;
    }
    networkToCidr.put(network.getId(),network.getCidr());
  }
  if (networkToCidr == null || networkToCidr.isEmpty()) {
    return;
  }
  String currCidrAddress=getCidrAddress(cidr);
  int currCidrSize=getCidrSize(cidr);
  for (  long networkId : networkToCidr.keySet()) {
    String ntwkCidr=networkToCidr.get(networkId);
    String ntwkCidrAddress=getCidrAddress(ntwkCidr);
    int ntwkCidrSize=getCidrSize(ntwkCidr);
    long cidrSizeToUse=currCidrSize < ntwkCidrSize ? currCidrSize : ntwkCidrSize;
    String ntwkCidrSubnet=NetUtils.getCidrSubNet(getCidrAddress(ntwkCidr),cidrSizeToUse);
    String cidrSubnet=NetUtils.getCidrSubNet(currCidrAddress,cidrSizeToUse);
    if (cidrSubnet.equals(ntwkCidrSubnet)) {
      throw new InvalidParameterValueException("String_Node_Str" + networkId + "String_Node_Str");
    }
  }
}
Program: 89209
Project: 89209
Buggy source:
public Integer getPageSize(){
  if (pageSize != null && MAX_PAGESIZE != null && pageSize.longValue() > MAX_PAGESIZE.longValue()) {
    throw new InvalidParameterValueException("String_Node_Str" + MAX_PAGESIZE.longValue());
  }
  if (pageSize != null && pageSize.longValue() == -1 && page != null) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  return pageSize;
}

Fixed version (ground truth):
public Integer getPageSize(){
  if (pageSize != null && MAX_PAGESIZE != null && pageSize.longValue() > MAX_PAGESIZE.longValue()) {
    throw new InvalidParameterValueException("String_Node_Str" + MAX_PAGESIZE.longValue());
  }
  if (pageSize != null && pageSize.longValue() == PAGESIZE_UNLIMITED && page != null) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  return pageSize;
}
Program: 89210
Project: 89210
Buggy source:
static void configure(){
  if (_configService.getDefaultPageSize().longValue() != -1) {
    MAX_PAGESIZE=_configService.getDefaultPageSize();
  }
}

Fixed version (ground truth):
static void configure(){
  if (_configService.getDefaultPageSize().longValue() != PAGESIZE_UNLIMITED) {
    MAX_PAGESIZE=_configService.getDefaultPageSize();
  }
}
Program: 89211
Project: 89211
Buggy source:
public Long getPageSizeVal(){
  Long defaultPageSize=MAX_PAGESIZE;
  Integer pageSizeInt=getPageSize();
  if (pageSizeInt != null && pageSizeInt.intValue() != -1) {
    defaultPageSize=pageSizeInt.longValue();
  }
  return defaultPageSize;
}

Fixed version (ground truth):
public Long getPageSizeVal(){
  Long defaultPageSize=MAX_PAGESIZE;
  Integer pageSizeInt=getPageSize();
  if (pageSizeInt != null) {
    if (pageSizeInt.longValue() == PAGESIZE_UNLIMITED) {
      defaultPageSize=null;
    }
 else {
      defaultPageSize=pageSizeInt.longValue();
    }
  }
  return defaultPageSize;
}
Program: 89213
Project: 89213
Buggy source:
@Override public String toString(){
  StringBuilder storageVolBuilder=new StringBuilder();
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str" + _volName + "String_Node_Str");
  if (_volSize != null) {
    storageVolBuilder.append("String_Node_Str" + _volSize + "String_Node_Str");
  }
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str" + _volFormat + "String_Node_Str");
  storageVolBuilder.append("String_Node_Str");
  if (_backingPath != null) {
    storageVolBuilder.append("String_Node_Str");
    storageVolBuilder.append("String_Node_Str" + _backingPath + "String_Node_Str");
    storageVolBuilder.append("String_Node_Str" + _backingFormat + "String_Node_Str");
    storageVolBuilder.append("String_Node_Str");
  }
  storageVolBuilder.append("String_Node_Str");
  return storageVolBuilder.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder storageVolBuilder=new StringBuilder();
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str" + _volName + "String_Node_Str");
  if (_volSize != null) {
    storageVolBuilder.append("String_Node_Str" + _volSize + "String_Node_Str");
  }
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str" + _volFormat + "String_Node_Str");
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str");
  storageVolBuilder.append("String_Node_Str");
  if (_backingPath != null) {
    storageVolBuilder.append("String_Node_Str");
    storageVolBuilder.append("String_Node_Str" + _backingPath + "String_Node_Str");
    storageVolBuilder.append("String_Node_Str" + _backingFormat + "String_Node_Str");
    storageVolBuilder.append("String_Node_Str");
  }
  storageVolBuilder.append("String_Node_Str");
  return storageVolBuilder.toString();
}
Program: 89214
Project: 89214
Buggy source:
@Override public String getProviderForServiceInNetwork(long networkId,Service service){
  SearchCriteria<NetworkServiceMapVO> sc=AllFieldsSearch.create();
  sc.setParameters("String_Node_Str",networkId);
  sc.setParameters("String_Node_Str",service.getName());
  NetworkServiceMapVO ntwkSvc=findOneBy(sc);
  if (ntwkSvc == null) {
    throw new UnsupportedServiceException("String_Node_Str" + service + "String_Node_Str"+ networkId);
  }
  return ntwkSvc.getProvider();
}

Fixed version (ground truth):
@Override public String getProviderForServiceInNetwork(long networkId,Service service){
  SearchCriteria<NetworkServiceMapVO> sc=AllFieldsSearch.create();
  sc.setParameters("String_Node_Str",networkId);
  sc.setParameters("String_Node_Str",service.getName());
  NetworkServiceMapVO ntwkSvc=findOneBy(sc);
  if (ntwkSvc == null) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkId);
  }
  return ntwkSvc.getProvider();
}
Program: 89215
Project: 89215
Buggy source:
@Override public ExtractResponse createExtractResponse(Long uploadId,Long id,Long zoneId,Long accountId,String mode){
  UploadVO uploadInfo=ApiDBUtils.findUploadById(uploadId);
  ExtractResponse response=new ExtractResponse();
  response.setObjectName("String_Node_Str");
  response.setId(id);
  response.setName(ApiDBUtils.findTemplateById(id).getName());
  response.setZoneId(zoneId);
  response.setZoneName(ApiDBUtils.findZoneById(zoneId).getName());
  response.setMode(mode);
  response.setUploadId(uploadId);
  response.setState(uploadInfo.getUploadState().toString());
  response.setAccountId(accountId);
  response.setUrl(uploadInfo.getUploadUrl());
  return response;
}

Fixed version (ground truth):
@Override public ExtractResponse createExtractResponse(Long uploadId,Long id,Long zoneId,Long accountId,String mode){
  UploadVO uploadInfo=ApiDBUtils.findUploadById(uploadId);
  ExtractResponse response=new ExtractResponse();
  response.setObjectName("String_Node_Str");
  response.setId(id);
  response.setName(ApiDBUtils.findTemplateById(id).getName());
  if (zoneId != null) {
    response.setZoneId(zoneId);
    response.setZoneName(ApiDBUtils.findZoneById(zoneId).getName());
  }
  response.setMode(mode);
  response.setUploadId(uploadId);
  response.setState(uploadInfo.getUploadState().toString());
  response.setAccountId(accountId);
  response.setUrl(uploadInfo.getUploadUrl());
  return response;
}
Program: 89217
Project: 89217
Buggy source:
@Override public Map<Capability,String> getNetworkServiceCapabilities(long networkId,Service service){
  if (!areServicesSupportedInNetwork(networkId,service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkId);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  String provider=_ntwkSrvcDao.getProviderForServiceInNetwork(networkId,service);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || elementCapabilities.get(service) == null) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}

Fixed version (ground truth):
@Override public Map<Capability,String> getNetworkServiceCapabilities(long networkId,Service service){
  if (!areServicesSupportedInNetwork(networkId,service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkId);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  String provider=_ntwkSrvcDao.getProviderForServiceInNetwork(networkId,service);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || !elementCapabilities.containsKey(service)) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}
Program: 89218
Project: 89218
Buggy source:
@Override public Map<Capability,String> getNetworkOfferingServiceCapabilities(NetworkOffering offering,Service service){
  if (!areServicesSupportedByNetworkOffering(offering.getId(),service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  List<String> providers=_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(),service);
  if (providers.isEmpty()) {
    throw new InvalidParameterValueException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  String provider=providers.get(0);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || elementCapabilities.get(service) == null) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}

Fixed version (ground truth):
@Override public Map<Capability,String> getNetworkOfferingServiceCapabilities(NetworkOffering offering,Service service){
  if (!areServicesSupportedByNetworkOffering(offering.getId(),service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  List<String> providers=_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(),service);
  if (providers.isEmpty()) {
    throw new InvalidParameterValueException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  String provider=providers.get(0);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || !elementCapabilities.containsKey(service)) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}
Program: 89219
Project: 89219
Buggy source:
@Override public Map<Capability,String> getNetworkServiceCapabilities(long networkId,Service service){
  if (!areServicesSupportedInNetwork(networkId,service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkId);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  String provider=_ntwkSrvcDao.getProviderForServiceInNetwork(networkId,service);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || elementCapabilities.get(service) == null) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}

Fixed version (ground truth):
@Override public Map<Capability,String> getNetworkServiceCapabilities(long networkId,Service service){
  if (!areServicesSupportedInNetwork(networkId,service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ networkId);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  String provider=_ntwkSrvcDao.getProviderForServiceInNetwork(networkId,service);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || !elementCapabilities.containsKey(service)) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}
Program: 89220
Project: 89220
Buggy source:
@Override public Map<Capability,String> getNetworkOfferingServiceCapabilities(NetworkOffering offering,Service service){
  if (!areServicesSupportedByNetworkOffering(offering.getId(),service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  List<String> providers=_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(),service);
  if (providers.isEmpty()) {
    throw new InvalidParameterValueException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  String provider=providers.get(0);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || elementCapabilities.get(service) == null) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}

Fixed version (ground truth):
@Override public Map<Capability,String> getNetworkOfferingServiceCapabilities(NetworkOffering offering,Service service){
  if (!areServicesSupportedByNetworkOffering(offering.getId(),service)) {
    throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  Map<Capability,String> serviceCapabilities=new HashMap<Capability,String>();
  List<String> providers=_ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(),service);
  if (providers.isEmpty()) {
    throw new InvalidParameterValueException("String_Node_Str" + service.getName() + "String_Node_Str"+ offering);
  }
  String provider=providers.get(0);
  NetworkElement element=getElementImplementingProvider(provider);
  if (element != null) {
    Map<Service,Map<Capability,String>> elementCapabilities=element.getCapabilities();
    ;
    if (elementCapabilities == null || !elementCapabilities.containsKey(service)) {
      throw new UnsupportedServiceException("String_Node_Str" + service.getName() + "String_Node_Str"+ element.getName()+ "String_Node_Str"+ provider);
    }
    serviceCapabilities=elementCapabilities.get(service);
  }
  return serviceCapabilities;
}
Program: 89223
Project: 89223
Buggy source:
@Override public long findCorrectResourceLimitForAccount(Account account,ResourceType type){
  long max=-1;
  ResourceLimitVO limit=_resourceLimitDao.findByOwnerIdAndType(account.getId(),ResourceOwnerType.Account,type);
  if (limit != null) {
    max=limit.getMax().longValue();
  }
 else {
    Long value=null;
    if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) {
      value=projectResourceLimitMap.get(type);
    }
 else {
      value=accountResourceLimitMap.get(type);
    }
    if (value != null) {
      return value;
    }
  }
  return max;
}

Fixed version (ground truth):
@Override public long findCorrectResourceLimitForAccount(Account account,ResourceType type){
  long max=Resource.RESOURCE_UNLIMITED;
  ResourceLimitVO limit=_resourceLimitDao.findByOwnerIdAndType(account.getId(),ResourceOwnerType.Account,type);
  if (limit != null) {
    max=limit.getMax().longValue();
  }
 else {
    Long value=null;
    if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) {
      value=projectResourceLimitMap.get(type);
    }
 else {
      value=accountResourceLimitMap.get(type);
    }
    if (value != null) {
      return value;
    }
  }
  return max;
}
Program: 89224
Project: 89224
Buggy source:
@Override public long findCorrectResourceLimitForDomain(Domain domain,ResourceType type){
  long max=-1;
  ResourceLimitVO limit=_resourceLimitDao.findByOwnerIdAndType(domain.getId(),ResourceOwnerType.Domain,type);
  if (limit != null) {
    max=limit.getMax().longValue();
  }
 else {
    Long domainId=domain.getParent();
    while ((domainId != null) && (limit == null)) {
      limit=_resourceLimitDao.findByOwnerIdAndType(domainId,ResourceOwnerType.Domain,type);
      DomainVO tmpDomain=_domainDao.findById(domainId);
      domainId=tmpDomain.getParent();
    }
    if (limit != null) {
      max=limit.getMax().longValue();
    }
  }
  return max;
}

Fixed version (ground truth):
@Override public long findCorrectResourceLimitForDomain(Domain domain,ResourceType type){
  long max=Resource.RESOURCE_UNLIMITED;
  ResourceLimitVO limit=_resourceLimitDao.findByOwnerIdAndType(domain.getId(),ResourceOwnerType.Domain,type);
  if (limit != null) {
    max=limit.getMax().longValue();
  }
 else {
    Long domainId=domain.getParent();
    while ((domainId != null) && (limit == null)) {
      limit=_resourceLimitDao.findByOwnerIdAndType(domainId,ResourceOwnerType.Domain,type);
      DomainVO tmpDomain=_domainDao.findById(domainId);
      domainId=tmpDomain.getParent();
    }
    if (limit != null) {
      max=limit.getMax().longValue();
    }
  }
  return max;
}
Program: 89230
Project: 89230
Buggy source:
@Override public List<? extends ProjectAccount> listProjectAccounts(long projectId,String accountName,String role,Long startIndex,Long pageSizeVal){
  Account caller=UserContext.current().getCaller();
  Project project=getProject(projectId);
  if (project == null) {
    throw new InvalidParameterValueException("String_Node_Str" + projectId);
  }
  if (!_accountMgr.isAdmin(caller.getType()) && _projectAccountDao.findByProjectIdAccountId(projectId,caller.getAccountId()) == null) {
    throw new PermissionDeniedException("String_Node_Str" + caller + "String_Node_Str"+ projectId);
  }
  Filter searchFilter=new Filter(ProjectAccountVO.class,"String_Node_Str",false,startIndex,pageSizeVal);
  SearchBuilder<ProjectAccountVO> sb=_projectAccountDao.createSearchBuilder();
  sb.and("String_Node_Str",sb.entity().getAccountRole(),Op.EQ);
  SearchBuilder<AccountVO> accountSearch;
  if (accountName != null) {
    accountSearch=_accountDao.createSearchBuilder();
    accountSearch.and("String_Node_Str",accountSearch.entity().getAccountName(),SearchCriteria.Op.EQ);
    sb.join("String_Node_Str",accountSearch,sb.entity().getAccountId(),accountSearch.entity().getId(),JoinBuilder.JoinType.INNER);
  }
  SearchCriteria<ProjectAccountVO> sc=sb.create();
  if (role != null) {
    sc.setParameters("String_Node_Str",role);
  }
  if (accountName != null) {
    sc.setJoinParameters("String_Node_Str","String_Node_Str",accountName);
  }
  return _projectAccountDao.search(sc,searchFilter);
}

Fixed version (ground truth):
@Override public List<? extends ProjectAccount> listProjectAccounts(long projectId,String accountName,String role,Long startIndex,Long pageSizeVal){
  Account caller=UserContext.current().getCaller();
  Project project=getProject(projectId);
  if (project == null) {
    throw new InvalidParameterValueException("String_Node_Str" + projectId);
  }
  if (!_accountMgr.isAdmin(caller.getType()) && _projectAccountDao.findByProjectIdAccountId(projectId,caller.getAccountId()) == null) {
    throw new PermissionDeniedException("String_Node_Str" + caller + "String_Node_Str"+ projectId);
  }
  Filter searchFilter=new Filter(ProjectAccountVO.class,"String_Node_Str",false,startIndex,pageSizeVal);
  SearchBuilder<ProjectAccountVO> sb=_projectAccountDao.createSearchBuilder();
  sb.and("String_Node_Str",sb.entity().getAccountRole(),Op.EQ);
  sb.and("String_Node_Str",sb.entity().getProjectId(),Op.EQ);
  SearchBuilder<AccountVO> accountSearch;
  if (accountName != null) {
    accountSearch=_accountDao.createSearchBuilder();
    accountSearch.and("String_Node_Str",accountSearch.entity().getAccountName(),SearchCriteria.Op.EQ);
    sb.join("String_Node_Str",accountSearch,sb.entity().getAccountId(),accountSearch.entity().getId(),JoinBuilder.JoinType.INNER);
  }
  SearchCriteria<ProjectAccountVO> sc=sb.create();
  sc.setParameters("String_Node_Str",projectId);
  if (role != null) {
    sc.setParameters("String_Node_Str",role);
  }
  if (accountName != null) {
    sc.setJoinParameters("String_Node_Str","String_Node_Str",accountName);
  }
  return _projectAccountDao.search(sc,searchFilter);
}
Program: 89232
Project: 89232
Buggy source:
String swiftUpload(SwiftTO swift,String container,String lDir,String lFilename){
  Script command=new Script("String_Node_Str",s_logger);
  command.add("String_Node_Str");
  command.add("String_Node_Str" + lDir + "String_Node_Str"+ swift.getUrl()+ "String_Node_Str"+ swift.getAccount()+ "String_Node_Str"+ swift.getUserName()+ "String_Node_Str"+ swift.getKey()+ "String_Node_Str"+ container+ "String_Node_Str"+ lFilename);
  String result=command.execute();
  if (result != null) {
    String errMsg="String_Node_Str" + result;
    s_logger.warn(errMsg);
    return errMsg;
  }
  return null;
}

Fixed version (ground truth):
String swiftUpload(SwiftTO swift,String container,String lDir,String lFilename){
  Script command=new Script("String_Node_Str",s_logger);
  command.add("String_Node_Str");
  command.add("String_Node_Str" + lDir + "String_Node_Str"+ swift.getUrl()+ "String_Node_Str"+ swift.getAccount()+ "String_Node_Str"+ swift.getUserName()+ "String_Node_Str"+ swift.getKey()+ "String_Node_Str"+ container+ "String_Node_Str"+ lFilename);
  OutputInterpreter.AllLinesParser parser=new OutputInterpreter.AllLinesParser();
  String result=command.execute(parser);
  if (result != null) {
    String errMsg="String_Node_Str" + result;
    s_logger.warn(errMsg);
    return errMsg;
  }
  if (parser.getLines() != null) {
    String[] lines=parser.getLines().split("String_Node_Str");
    for (    String line : lines) {
      if (line.contains("String_Node_Str")) {
        String errMsg="String_Node_Str" + lines.toString();
        s_logger.warn(errMsg);
        return errMsg;
      }
    }
  }
  return null;
}
Program: 89233
Project: 89233
Buggy source:
String swiftDelete(SwiftTO swift,String container,String rFilename){
  Script command=new Script("String_Node_Str",s_logger);
  command.add("String_Node_Str");
  command.add("String_Node_Str" + swift.getUrl() + "String_Node_Str"+ swift.getAccount()+ "String_Node_Str"+ swift.getUserName()+ "String_Node_Str"+ swift.getKey()+ "String_Node_Str"+ container+ "String_Node_Str"+ rFilename);
  String result=command.execute();
  if (result != null) {
    String errMsg="String_Node_Str" + result;
    s_logger.warn(errMsg);
    return errMsg;
  }
  return null;
}

Fixed version (ground truth):
String swiftDelete(SwiftTO swift,String container,String rFilename){
  Script command=new Script("String_Node_Str",s_logger);
  command.add("String_Node_Str");
  command.add("String_Node_Str" + swift.getUrl() + "String_Node_Str"+ swift.getAccount()+ "String_Node_Str"+ swift.getUserName()+ "String_Node_Str"+ swift.getKey()+ "String_Node_Str"+ container+ "String_Node_Str"+ rFilename);
  OutputInterpreter.AllLinesParser parser=new OutputInterpreter.AllLinesParser();
  String result=command.execute(parser);
  if (result != null) {
    String errMsg="String_Node_Str" + result;
    s_logger.warn(errMsg);
    return errMsg;
  }
  if (parser.getLines() != null) {
    String[] lines=parser.getLines().split("String_Node_Str");
    for (    String line : lines) {
      if (line.contains("String_Node_Str")) {
        String errMsg="String_Node_Str" + lines.toString();
        s_logger.warn(errMsg);
        return errMsg;
      }
    }
  }
  return null;
}