nus-yam/ex-repair huggingface dataset:
Program: 107046
Project: 107046
Buggy source:
private UsageEventVO convertSnapshotEvent(EventVO event,Connection conn) throws IOException, SQLException {
  Properties snapEventParams=new Properties();
  long snapId=-1L;
  long snapSize=-1L;
  Long zoneId=null;
  UsageEventVO usageEvent=null;
  snapEventParams.load(new StringReader(event.getParameters()));
  snapId=Long.parseLong(snapEventParams.getProperty("String_Node_Str"));
  String snapshotName=snapEventParams.getProperty("String_Node_Str");
  String size=snapEventParams.getProperty("String_Node_Str");
  if (size != null) {
    snapSize=Long.parseLong(size);
  }
  String zoneString=snapEventParams.getProperty("String_Node_Str");
  if (zoneString != null) {
    zoneId=Long.parseLong(zoneString);
  }
  Long accountId=event.getAccountId();
  if (accountId.longValue() == 0L || zoneId == null) {
    PreparedStatement pstmt=conn.prepareStatement("String_Node_Str");
    pstmt.setLong(1,snapId);
    s_logger.debug("String_Node_Str" + pstmt);
    ResultSet rs=pstmt.executeQuery();
    if (rs.next()) {
      zoneId=rs.getLong(1);
      accountId=rs.getLong(2);
    }
    rs.close();
    pstmt.close();
  }
  if (EventTypes.EVENT_SNAPSHOT_CREATE.equals(event.getType())) {
    usageEvent=new UsageEventVO(EventTypes.EVENT_SNAPSHOT_CREATE,accountId,zoneId,snapId,snapshotName,null,null,snapSize);
  }
 else   if (EventTypes.EVENT_SNAPSHOT_DELETE.equals(event.getType())) {
    usageEvent=new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE,accountId,zoneId,snapId,snapshotName,null,null,0L);
  }
  return usageEvent;
}

Fixed version (ground truth):
private UsageEventVO convertSnapshotEvent(EventVO event,Connection conn) throws IOException, SQLException {
  Properties snapEventParams=new Properties();
  long snapId=-1L;
  long snapSize=-1L;
  Long zoneId=0L;
  UsageEventVO usageEvent=null;
  snapEventParams.load(new StringReader(event.getParameters()));
  snapId=Long.parseLong(snapEventParams.getProperty("String_Node_Str"));
  String snapshotName=snapEventParams.getProperty("String_Node_Str");
  String size=snapEventParams.getProperty("String_Node_Str");
  if (size != null) {
    snapSize=Long.parseLong(size);
  }
  String zoneString=snapEventParams.getProperty("String_Node_Str");
  if (zoneString != null) {
    zoneId=Long.parseLong(zoneString);
  }
  Long accountId=event.getAccountId();
  if (accountId.longValue() == 0L || zoneId.longValue() == 0L) {
    PreparedStatement pstmt=conn.prepareStatement("String_Node_Str");
    pstmt.setLong(1,snapId);
    s_logger.debug("String_Node_Str" + pstmt);
    ResultSet rs=pstmt.executeQuery();
    if (rs.next()) {
      zoneId=rs.getLong(1);
      accountId=rs.getLong(2);
    }
    rs.close();
    pstmt.close();
  }
  if (EventTypes.EVENT_SNAPSHOT_CREATE.equals(event.getType())) {
    usageEvent=new UsageEventVO(EventTypes.EVENT_SNAPSHOT_CREATE,accountId,zoneId,snapId,snapshotName,null,null,snapSize);
  }
 else   if (EventTypes.EVENT_SNAPSHOT_DELETE.equals(event.getType())) {
    usageEvent=new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE,accountId,zoneId,snapId,snapshotName,null,null,0L);
  }
  return usageEvent;
}
Program: 107048
Project: 107048
Buggy source:
@Override public NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
  DataCenter dc=_dcDao.findById(network.getDataCenterId());
  NetworkOffering offering=_networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
  if (!canHandle(offering,dc)) {
    return null;
  }
  if (nic == null) {
    nic=new NicProfile(ReservationStrategy.Create,null,null,null,null);
  }
 else   if (nic.getIp4Address() == null) {
    nic.setStrategy(ReservationStrategy.Start);
  }
 else {
    nic.setStrategy(ReservationStrategy.Create);
  }
  getIp(nic,dc,vm,network);
  if (network.isSecurityGroupEnabled() && nic.getIp4Address() != null) {
    nic.setStrategy(ReservationStrategy.Create);
  }
  return nic;
}

Fixed version (ground truth):
@Override public NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
  DataCenter dc=_dcDao.findById(network.getDataCenterId());
  NetworkOffering offering=_networkOfferingDao.findByIdIncludingRemoved(network.getNetworkOfferingId());
  if (!canHandle(offering,dc)) {
    return null;
  }
  if (nic == null) {
    nic=new NicProfile(ReservationStrategy.Create,null,null,null,null);
  }
 else   if (nic.getIp4Address() == null) {
    nic.setStrategy(ReservationStrategy.Start);
  }
 else {
    nic.setStrategy(ReservationStrategy.Create);
  }
  getIp(nic,dc,vm,network);
  nic.setStrategy(ReservationStrategy.Create);
  return nic;
}
Program: 107049
Project: 107049
Buggy source:
@Override public void reserve(NicProfile nic,Network network,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
  if (nic.getIp4Address() == null) {
    getIp(nic,dest.getDataCenter(),vm,network);
  }
}

Fixed version (ground truth):
@Override public void reserve(NicProfile nic,Network network,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
  if (nic.getIp4Address() == null) {
    getIp(nic,dest.getDataCenter(),vm,network);
    nic.setStrategy(ReservationStrategy.Create);
  }
}
Program: 107054
Project: 107054
Buggy source:
public DatabaseUpgradeChecker(){
  _dao=ComponentLocator.inject(VersionDaoImpl.class);
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade217to218(),new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade221to222(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade222to224()});
}

Fixed version (ground truth):
public DatabaseUpgradeChecker(){
  _dao=ComponentLocator.inject(VersionDaoImpl.class);
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade217to218(),new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to224(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to224(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to224(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade221to222(),new UpgradeSnapshot223to224(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new UpgradeSnapshot223to224(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new UpgradeSnapshot223to224(),new Upgrade222to224()});
}
Program: 107055
Project: 107055
Buggy source:
@Override public Pair<AfterScanAction,Object> scanPool(Long pool){
  long dataCenterId=pool.longValue();
  ConsoleProxyLoadInfo proxyInfo=this._zoneProxyCountMap.get(dataCenterId);
  if (proxyInfo == null)   return new Pair<AfterScanAction,Object>(AfterScanAction.nop,null);
  ConsoleProxyLoadInfo vmInfo=this._zoneVmCountMap.get(dataCenterId);
  if (vmInfo == null)   vmInfo=new ConsoleProxyLoadInfo();
  if (!checkCapacity(proxyInfo,vmInfo)) {
    if (s_logger.isDebugEnabled())     s_logger.debug("String_Node_Str" + proxyInfo.getName());
    return new Pair<AfterScanAction,Object>(AfterScanAction.expand,null);
  }
  return new Pair<AfterScanAction,Object>(AfterScanAction.nop,null);
}

Fixed version (ground truth):
@Override public Pair<AfterScanAction,Object> scanPool(Long pool){
  long dataCenterId=pool.longValue();
  ConsoleProxyLoadInfo proxyInfo=this._zoneProxyCountMap.get(dataCenterId);
  if (proxyInfo == null) {
    return new Pair<AfterScanAction,Object>(AfterScanAction.nop,null);
  }
  ConsoleProxyLoadInfo vmInfo=this._zoneVmCountMap.get(dataCenterId);
  if (vmInfo == null) {
    vmInfo=new ConsoleProxyLoadInfo();
  }
  if (!checkCapacity(proxyInfo,vmInfo)) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug("String_Node_Str" + proxyInfo.getName());
    }
    return new Pair<AfterScanAction,Object>(AfterScanAction.expand,null);
  }
  return new Pair<AfterScanAction,Object>(AfterScanAction.nop,null);
}
Program: 107056
Project: 107056
Buggy source:
@Override public boolean isPoolReadyForScan(Long pool){
  long dataCenterId=pool.longValue();
  if (!isZoneReady(_zoneHostInfoMap,dataCenterId)) {
    if (s_logger.isDebugEnabled())     s_logger.debug("String_Node_Str" + dataCenterId + "String_Node_Str");
    return false;
  }
  if (s_logger.isDebugEnabled())   s_logger.debug("String_Node_Str" + dataCenterId + "String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public boolean isPoolReadyForScan(Long pool){
  long dataCenterId=pool.longValue();
  if (!isZoneReady(_zoneHostInfoMap,dataCenterId)) {
    if (s_logger.isDebugEnabled()) {
      s_logger.debug("String_Node_Str" + dataCenterId + "String_Node_Str");
    }
    return false;
  }
  if (s_logger.isDebugEnabled()) {
    s_logger.debug("String_Node_Str" + dataCenterId + "String_Node_Str");
  }
  return true;
}
Program: 107057
Project: 107057
Buggy source:
private boolean reserveStandbyCapacity(){
  ConsoleProxyManagementState state=getManagementState();
  if (state == null || state != ConsoleProxyManagementState.Auto)   return false;
  return true;
}

Fixed version (ground truth):
private boolean reserveStandbyCapacity(){
  ConsoleProxyManagementState state=getManagementState();
  if (state == null || state != ConsoleProxyManagementState.Auto) {
    return false;
  }
  return true;
}
Program: 107058
Project: 107058
Buggy source:
@Override @DB public String uploadCertificate(UploadCustomCertificateCmd cmd){
  if (!_ksMgr.validateCertificate(cmd.getCertificate(),cmd.getPrivateKey(),cmd.getDomainSuffix()))   throw new InvalidParameterValueException("String_Node_Str");
  _ksMgr.saveCertificate(ConsoleProxyManager.CERTIFICATE_NAME,cmd.getCertificate(),cmd.getPrivateKey(),cmd.getDomainSuffix());
  _consoleProxyMgr.setManagementState(ConsoleProxyManagementState.ResetSuspending);
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override @DB public String uploadCertificate(UploadCustomCertificateCmd cmd){
  if (!_ksMgr.validateCertificate(cmd.getCertificate(),cmd.getPrivateKey(),cmd.getDomainSuffix())) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  _ksMgr.saveCertificate(ConsoleProxyManager.CERTIFICATE_NAME,cmd.getCertificate(),cmd.getPrivateKey(),cmd.getDomainSuffix());
  _consoleProxyMgr.setManagementState(ConsoleProxyManagementState.ResetSuspending);
  return "String_Node_Str";
}
Program: 107061
Project: 107061
Buggy source:
public StoragePoolMonitor(StorageManager mgr,HostDao hostDao,StoragePoolDao poolDao){
  this._storageManager=mgr;
  this._hostDao=hostDao;
  this._poolDao=poolDao;
}

Fixed version (ground truth):
public StoragePoolMonitor(StorageManagerImpl mgr,StoragePoolDao poolDao){
  this._storageManager=mgr;
  this._poolDao=poolDao;
}
Program: 107062
Project: 107062
Buggy source:
@Override public void processConnect(HostVO host,StartupCommand cmd) throws ConnectionException {
  if (cmd instanceof StartupRoutingCommand) {
    StartupRoutingCommand scCmd=(StartupRoutingCommand)cmd;
    if (scCmd.getHypervisorType() == HypervisorType.XenServer || scCmd.getHypervisorType() == HypervisorType.KVM || scCmd.getHypervisorType() == HypervisorType.VMware) {
      List<StoragePoolVO> pools=_poolDao.listBy(host.getDataCenterId(),host.getPodId(),host.getClusterId());
      for (      StoragePoolVO pool : pools) {
        Long hostId=host.getId();
        s_logger.debug("String_Node_Str" + hostId + "String_Node_Str");
        try {
          _storageManager.addPoolToHost(hostId,pool);
          _storageManager.createCapacityEntry(pool);
        }
 catch (        Exception e) {
          throw new ConnectionException(true,"String_Node_Str" + pool,e);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void processConnect(HostVO host,StartupCommand cmd) throws ConnectionException {
  if (cmd instanceof StartupRoutingCommand) {
    StartupRoutingCommand scCmd=(StartupRoutingCommand)cmd;
    if (scCmd.getHypervisorType() == HypervisorType.XenServer || scCmd.getHypervisorType() == HypervisorType.KVM || scCmd.getHypervisorType() == HypervisorType.VMware) {
      List<StoragePoolVO> pools=_poolDao.listBy(host.getDataCenterId(),host.getPodId(),host.getClusterId());
      for (      StoragePoolVO pool : pools) {
        if (!pool.getPoolType().isShared()) {
          continue;
        }
        Long hostId=host.getId();
        s_logger.debug("String_Node_Str" + hostId + "String_Node_Str");
        try {
          _storageManager.connectHostToSharedPool(hostId,pool);
          _storageManager.createCapacityEntry(pool);
        }
 catch (        Exception e) {
          throw new ConnectionException(true,"String_Node_Str" + pool,e);
        }
      }
    }
  }
}
Program: 107064
Project: 107064
Buggy source:
VolumeVO allocateDuplicateVolume(VolumeVO oldVol,Long templateId){
  VolumeVO newVol=new VolumeVO(oldVol.getVolumeType(),oldVol.getName(),oldVol.getDataCenterId(),oldVol.getDomainId(),oldVol.getAccountId(),oldVol.getDiskOfferingId(),oldVol.getSize());
  if (templateId != null) {
    newVol.setTemplateId(templateId);
  }
 else {
    newVol.setTemplateId(oldVol.getTemplateId());
  }
  newVol.setDeviceId(oldVol.getDeviceId());
  newVol.setInstanceId(oldVol.getInstanceId());
  return _volsDao.persist(newVol);
}

Fixed version (ground truth):
VolumeVO allocateDuplicateVolume(VolumeVO oldVol,Long templateId){
  VolumeVO newVol=new VolumeVO(oldVol.getVolumeType(),oldVol.getName(),oldVol.getDataCenterId(),oldVol.getDomainId(),oldVol.getAccountId(),oldVol.getDiskOfferingId(),oldVol.getSize());
  if (templateId != null) {
    newVol.setTemplateId(templateId);
  }
 else {
    newVol.setTemplateId(oldVol.getTemplateId());
  }
  newVol.setDeviceId(oldVol.getDeviceId());
  newVol.setInstanceId(oldVol.getInstanceId());
  newVol.setRecreatable(oldVol.isRecreatable());
  return _volsDao.persist(newVol);
}
Program: 107065
Project: 107065
Buggy source:
public DatabaseUpgradeChecker(){
  _dao=ComponentLocator.inject(VersionDaoImpl.class);
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade217to218(),new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade222to224()});
}

Fixed version (ground truth):
public DatabaseUpgradeChecker(){
  _dao=ComponentLocator.inject(VersionDaoImpl.class);
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade217to218(),new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade218to22(),new Upgrade221to222(),new UpgradeSnapshot217to223(),new Upgrade222to224(),new Upgrade218to224DomainVlans()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade221to222(),new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade222to224()});
  _upgradeMap.put("String_Node_Str",new DbUpgrade[]{new Upgrade222to224()});
}
Program: 107066
Project: 107066
Buggy source:
@Override public void performDataMigration(Connection conn){
  updateClusterIdInOpHostCapacity(conn);
  updateGuestOsType(conn);
  updateNicsWithMode(conn);
  updateUserStatsWithNetwork(conn);
  dropIndexIfExists(conn);
  fixBasicZoneNicCount(conn);
  updateTotalCPUInOpHostCapacity(conn);
  upgradeGuestOs(conn);
  upgradeAccountVlanMap(conn);
}

Fixed version (ground truth):
@Override public void performDataMigration(Connection conn){
  try {
    updateClusterIdInOpHostCapacity(conn);
    updateGuestOsType(conn);
    updateNicsWithMode(conn);
    updateUserStatsWithNetwork(conn);
    dropIndexIfExists(conn);
    fixBasicZoneNicCount(conn);
    updateTotalCPUInOpHostCapacity(conn);
    upgradeGuestOs(conn);
    upgradeAccountVlanMap(conn);
    fixRecreatableVolumesProblem(conn);
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str",e);
  }
}
Program: 107067
Project: 107067
Buggy source:
@Override public void performDataMigration(Connection conn){
  updateClusterIdInOpHostCapacity(conn);
  updateGuestOsType(conn);
  updateNicsWithMode(conn);
  updateUserStatsWithNetwork(conn);
  dropIndexIfExists(conn);
  fixBasicZoneNicCount(conn);
  updateTotalCPUInOpHostCapacity(conn);
}

Fixed version (ground truth):
@Override public void performDataMigration(Connection conn){
  updateClusterIdInOpHostCapacity(conn);
  updateGuestOsType(conn);
  updateNicsWithMode(conn);
  updateUserStatsWithNetwork(conn);
  dropIndexIfExists(conn);
  fixBasicZoneNicCount(conn);
  updateTotalCPUInOpHostCapacity(conn);
  upgradeGuestOs(conn);
  upgradeAccountVlanMap(conn);
}
Program: 107071
Project: 107071
Buggy source:
@Override public void performDataMigration(Connection conn){
  updateClusterIdInOpHostCapacity(conn);
  updateGuestOsType(conn);
  updateNicsWithMode(conn);
  updateUserStatsWithNetwork(conn);
  dropIndexIfExists(conn);
}

Fixed version (ground truth):
@Override public void performDataMigration(Connection conn){
  updateClusterIdInOpHostCapacity(conn);
  updateGuestOsType(conn);
  updateNicsWithMode(conn);
  updateUserStatsWithNetwork(conn);
  dropIndexIfExists(conn);
  fixBasicZoneNicCount(conn);
}
Program: 107076
Project: 107076
Buggy source:
@Override @DB public void destroyVolume(VolumeVO volume) throws ConcurrentOperationException {
  Transaction txn=Transaction.currentTxn();
  txn.start();
  _volsDao.update(volume,Volume.Event.Destroy);
  long volumeId=volume.getId();
  _snapshotMgr.deletePoliciesForVolume(volumeId);
  VMInstanceVO vmInstance=_vmInstanceDao.findById(volume.getInstanceId());
  if (vmInstance.getType().equals(VirtualMachine.Type.User)) {
    _accountMgr.decrementResourceCount(volume.getAccountId(),ResourceType.volume);
  }
  txn.commit();
}

Fixed version (ground truth):
@Override @DB public void destroyVolume(VolumeVO volume) throws ConcurrentOperationException {
  Transaction txn=Transaction.currentTxn();
  txn.start();
  _volsDao.update(volume,Volume.Event.Destroy);
  long volumeId=volume.getId();
  _snapshotMgr.deletePoliciesForVolume(volumeId);
  Long instanceId=volume.getInstanceId();
  VMInstanceVO vmInstance=null;
  if (instanceId != null) {
    vmInstance=_vmInstanceDao.findById(instanceId);
  }
  if (instanceId == null || (vmInstance.getType().equals(VirtualMachine.Type.User))) {
    _accountMgr.decrementResourceCount(volume.getAccountId(),ResourceType.volume);
  }
  txn.commit();
}
Program: 107077
Project: 107077
Buggy source:
@Override public boolean applyIpAssociations(Network network,boolean continueOnError) throws ResourceUnavailableException {
  List<IPAddressVO> userIps=_ipAddressDao.listByAssociatedNetwork(network.getId(),null);
  List<PublicIp> publicIps=new ArrayList<PublicIp>();
  if (userIps != null && !userIps.isEmpty()) {
    for (    IPAddressVO userIp : userIps) {
      PublicIp publicIp=new PublicIp(userIp,_vlanDao.findById(userIp.getVlanId()),userIp.getMacAddress());
      publicIps.add(publicIp);
    }
  }
  boolean success=true;
  for (  NetworkElement element : _networkElements) {
    try {
      element.applyIps(network,publicIps);
    }
 catch (    ResourceUnavailableException e) {
      success=false;
      if (!continueOnError) {
        throw e;
      }
 else {
        s_logger.debug("String_Node_Str" + element.getName(),e);
      }
    }
  }
  if (success) {
    for (    IPAddressVO addr : userIps) {
      if (addr.getState() == IpAddress.State.Allocating) {
        addr.setAssociatedWithNetworkId(network.getId());
        markPublicIpAsAllocated(addr);
      }
 else       if (addr.getState() == IpAddress.State.Releasing) {
        if (cleanupIpResources(addr.getId(),Account.ACCOUNT_ID_SYSTEM,_accountMgr.getSystemAccount())) {
          _ipAddressDao.unassignIpAddress(addr.getId());
        }
 else {
          success=false;
          s_logger.warn("String_Node_Str" + addr.getId());
        }
      }
    }
  }
  return success;
}

Fixed version (ground truth):
@Override public boolean applyIpAssociations(Network network,boolean continueOnError) throws ResourceUnavailableException {
  List<IPAddressVO> userIps=_ipAddressDao.listByAssociatedNetwork(network.getId(),null);
  List<PublicIp> publicIps=new ArrayList<PublicIp>();
  if (userIps != null && !userIps.isEmpty()) {
    for (    IPAddressVO userIp : userIps) {
      PublicIp publicIp=new PublicIp(userIp,_vlanDao.findById(userIp.getVlanId()),NetUtils.createSequenceBasedMacAddress(userIp.getMacAddress()));
      publicIps.add(publicIp);
    }
  }
  boolean success=true;
  for (  NetworkElement element : _networkElements) {
    try {
      element.applyIps(network,publicIps);
    }
 catch (    ResourceUnavailableException e) {
      success=false;
      if (!continueOnError) {
        throw e;
      }
 else {
        s_logger.debug("String_Node_Str" + element.getName(),e);
      }
    }
  }
  if (success) {
    for (    IPAddressVO addr : userIps) {
      if (addr.getState() == IpAddress.State.Allocating) {
        addr.setAssociatedWithNetworkId(network.getId());
        markPublicIpAsAllocated(addr);
      }
 else       if (addr.getState() == IpAddress.State.Releasing) {
        if (cleanupIpResources(addr.getId(),Account.ACCOUNT_ID_SYSTEM,_accountMgr.getSystemAccount())) {
          _ipAddressDao.unassignIpAddress(addr.getId());
        }
 else {
          success=false;
          s_logger.warn("String_Node_Str" + addr.getId());
        }
      }
    }
  }
  return success;
}
Program: 107079
Project: 107079
Buggy source:
@Override public boolean applyIpAssociations(Network network,boolean continueOnError) throws ResourceUnavailableException {
  List<IPAddressVO> userIps=_ipAddressDao.listByAssociatedNetwork(network.getId(),null);
  List<PublicIp> publicIps=new ArrayList<PublicIp>();
  if (userIps != null && !userIps.isEmpty()) {
    for (    IPAddressVO userIp : userIps) {
      PublicIp publicIp=new PublicIp(userIp,_vlanDao.findById(userIp.getVlanId()),userIp.getMacAddress());
      publicIps.add(publicIp);
    }
  }
  boolean success=true;
  for (  NetworkElement element : _networkElements) {
    try {
      element.applyIps(network,publicIps);
    }
 catch (    ResourceUnavailableException e) {
      success=false;
      if (!continueOnError) {
        throw e;
      }
 else {
        s_logger.debug("String_Node_Str" + element.getName(),e);
      }
    }
  }
  if (success) {
    for (    IPAddressVO addr : userIps) {
      if (addr.getState() == IpAddress.State.Allocating) {
        addr.setAssociatedWithNetworkId(network.getId());
        markPublicIpAsAllocated(addr);
      }
 else       if (addr.getState() == IpAddress.State.Releasing) {
        if (cleanupIpResources(addr.getId(),Account.ACCOUNT_ID_SYSTEM,_accountMgr.getSystemAccount())) {
          _ipAddressDao.unassignIpAddress(addr.getId());
        }
 else {
          success=false;
          s_logger.warn("String_Node_Str" + addr.getId());
        }
      }
    }
  }
  return success;
}

Fixed version (ground truth):
@Override public boolean applyIpAssociations(Network network,boolean continueOnError) throws ResourceUnavailableException {
  List<IPAddressVO> userIps=_ipAddressDao.listByAssociatedNetwork(network.getId(),null);
  List<PublicIp> publicIps=new ArrayList<PublicIp>();
  if (userIps != null && !userIps.isEmpty()) {
    for (    IPAddressVO userIp : userIps) {
      PublicIp publicIp=new PublicIp(userIp,_vlanDao.findById(userIp.getVlanId()),NetUtils.createSequenceBasedMacAddress(userIp.getMacAddress()));
      publicIps.add(publicIp);
    }
  }
  boolean success=true;
  for (  NetworkElement element : _networkElements) {
    try {
      element.applyIps(network,publicIps);
    }
 catch (    ResourceUnavailableException e) {
      success=false;
      if (!continueOnError) {
        throw e;
      }
 else {
        s_logger.debug("String_Node_Str" + element.getName(),e);
      }
    }
  }
  if (success) {
    for (    IPAddressVO addr : userIps) {
      if (addr.getState() == IpAddress.State.Allocating) {
        addr.setAssociatedWithNetworkId(network.getId());
        markPublicIpAsAllocated(addr);
      }
 else       if (addr.getState() == IpAddress.State.Releasing) {
        if (cleanupIpResources(addr.getId(),Account.ACCOUNT_ID_SYSTEM,_accountMgr.getSystemAccount())) {
          _ipAddressDao.unassignIpAddress(addr.getId());
        }
 else {
          success=false;
          s_logger.warn("String_Node_Str" + addr.getId());
        }
      }
    }
  }
  return success;
}
Program: 107081
Project: 107081
Buggy source:
@Override public boolean isVmSecurityGroupEnabled(Long vmId){
  VirtualMachine vm=_vmDao.findById(vmId);
  List<NicProfile> nics=_networkMgr.getNicProfiles(vm);
  for (  NicProfile nic : nics) {
    if (nic.isSecurityGroupEnabled() && vm.getHypervisorType() != HypervisorType.VMware) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isVmSecurityGroupEnabled(Long vmId){
  VirtualMachine vm=_vmDao.findByIdIncludingRemoved(vmId);
  List<NicProfile> nics=_networkMgr.getNicProfiles(vm);
  for (  NicProfile nic : nics) {
    if (nic.isSecurityGroupEnabled() && vm.getHypervisorType() != HypervisorType.VMware) {
      return true;
    }
  }
  return false;
}
Program: 107082
Project: 107082
Buggy source:
@Override public boolean isVmSecurityGroupEnabled(Long vmId){
  VirtualMachine vm=_vmDao.findById(vmId);
  List<NicProfile> nics=_networkMgr.getNicProfiles(vm);
  for (  NicProfile nic : nics) {
    if (nic.isSecurityGroupEnabled() && vm.getHypervisorType() != HypervisorType.VMware) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isVmSecurityGroupEnabled(Long vmId){
  VirtualMachine vm=_vmDao.findByIdIncludingRemoved(vmId);
  List<NicProfile> nics=_networkMgr.getNicProfiles(vm);
  for (  NicProfile nic : nics) {
    if (nic.isSecurityGroupEnabled() && vm.getHypervisorType() != HypervisorType.VMware) {
      return true;
    }
  }
  return false;
}
Program: 107083
Project: 107083
Buggy source:
protected AgentAttache(final long id,boolean maintenance){
  _id=id;
  _waitForList=new ConcurrentHashMap<Long,Listener>();
  _currentSequence=null;
  _maintenance=maintenance;
  _requests=new LinkedList<Request>();
}

Fixed version (ground truth):
protected AgentAttache(AgentManager agentMgr,final long id,boolean maintenance){
  _id=id;
  _waitForList=new ConcurrentHashMap<Long,Listener>();
  _currentSequence=null;
  _maintenance=maintenance;
  _requests=new LinkedList<Request>();
  _agentMgr=agentMgr;
}
Program: 107084
Project: 107084
Buggy source:
public boolean processAnswers(final long seq,final Response resp){
  resp.log(_id,"String_Node_Str");
  final Answer[] answers=resp.getAnswers();
  boolean processed=false;
  Listener monitor=getListener(seq);
  if (monitor == null) {
    if (answers[0] != null && answers[0].getResult()) {
      processed=true;
    }
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(seq,"String_Node_Str"));
    }
  }
 else {
    processed=monitor.processAnswers(_id,seq,answers);
    if (s_logger.isTraceEnabled()) {
      s_logger.trace(log(seq,(processed ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"));
    }
    if (!monitor.isRecurring()) {
      unregisterListener(seq);
    }
  }
  if (resp.executeInSequence()) {
    sendNext(seq);
  }
  return processed;
}

Fixed version (ground truth):
public boolean processAnswers(final long seq,final Response resp){
  resp.log(_id,"String_Node_Str");
  final Answer[] answers=resp.getAnswers();
  boolean processed=false;
  Listener monitor=getListener(seq);
  if (monitor == null) {
    if (answers[0] != null && answers[0].getResult()) {
      processed=true;
    }
    if (s_logger.isDebugEnabled()) {
      s_logger.debug(log(seq,"String_Node_Str"));
    }
  }
 else {
    processed=monitor.processAnswers(_id,seq,answers);
    if (s_logger.isTraceEnabled()) {
      s_logger.trace(log(seq,(processed ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"));
    }
    if (!monitor.isRecurring()) {
      unregisterListener(seq);
    }
  }
  if (resp.executeInSequence()) {
    sendNext(seq);
  }
  _agentMgr.notifyAnswersFromAttache(_id,seq,answers);
  return processed;
}
Program: 107085
Project: 107085
Buggy source:
protected AgentAttache createAttache(long id,HostVO server,ServerResource resource){
  if (resource instanceof DummySecondaryStorageResource || resource instanceof KvmDummyResourceBase) {
    return new DummyAttache(id,false);
  }
  s_logger.debug("String_Node_Str" + id);
  final DirectAgentAttache attache=new DirectAgentAttache(id,resource,server.getStatus() == Status.Maintenance || server.getStatus() == Status.ErrorInMaintenance || server.getStatus() == Status.PrepareForMaintenance,this);
  AgentAttache old=null;
synchronized (_agents) {
    old=_agents.get(id);
    _agents.put(id,attache);
  }
  if (old != null) {
    old.disconnect(Status.Removed);
  }
  return attache;
}

Fixed version (ground truth):
protected AgentAttache createAttache(long id,HostVO server,ServerResource resource){
  if (resource instanceof DummySecondaryStorageResource || resource instanceof KvmDummyResourceBase) {
    return new DummyAttache(this,id,false);
  }
  s_logger.debug("String_Node_Str" + id);
  final DirectAgentAttache attache=new DirectAgentAttache(this,id,resource,server.getStatus() == Status.Maintenance || server.getStatus() == Status.ErrorInMaintenance || server.getStatus() == Status.PrepareForMaintenance,this);
  AgentAttache old=null;
synchronized (_agents) {
    old=_agents.get(id);
    _agents.put(id,attache);
  }
  if (old != null) {
    old.disconnect(Status.Removed);
  }
  return attache;
}
Program: 107086
Project: 107086
Buggy source:
public ClusteredAgentAttache(long id,Link link,boolean maintenance){
  super(id,link,maintenance);
  _forward=link == null;
}

Fixed version (ground truth):
public ClusteredAgentAttache(AgentManager agentMgr,long id,Link link,boolean maintenance){
  super(agentMgr,id,link,maintenance);
  _forward=link == null;
}
Program: 107087
Project: 107087
Buggy source:
@Override protected AgentAttache createAttache(long id,HostVO server,ServerResource resource){
  if (resource instanceof DummySecondaryStorageResource) {
    return new DummyAttache(id,false);
  }
  s_logger.debug("String_Node_Str" + id);
  final DirectAgentAttache attache=new ClusteredDirectAgentAttache(id,_nodeId,resource,server.getStatus() == Status.Maintenance || server.getStatus() == Status.ErrorInMaintenance || server.getStatus() == Status.PrepareForMaintenance,this);
  AgentAttache old=null;
synchronized (_agents) {
    old=_agents.get(id);
    _agents.put(id,attache);
  }
  if (old != null) {
    old.disconnect(Status.Removed);
  }
  return attache;
}

Fixed version (ground truth):
@Override protected AgentAttache createAttache(long id,HostVO server,ServerResource resource){
  if (resource instanceof DummySecondaryStorageResource) {
    return new DummyAttache(this,id,false);
  }
  s_logger.debug("String_Node_Str" + id);
  final DirectAgentAttache attache=new ClusteredDirectAgentAttache(this,id,_nodeId,resource,server.getStatus() == Status.Maintenance || server.getStatus() == Status.ErrorInMaintenance || server.getStatus() == Status.PrepareForMaintenance,this);
  AgentAttache old=null;
synchronized (_agents) {
    old=_agents.get(id);
    _agents.put(id,attache);
  }
  if (old != null) {
    old.disconnect(Status.Removed);
  }
  return attache;
}
Program: 107088
Project: 107088
Buggy source:
public ClusteredDirectAgentAttache(long id,long mgmtId,ServerResource resource,boolean maintenance,ClusteredAgentManagerImpl mgr){
  super(id,resource,maintenance,mgr);
  _mgr=mgr;
  _nodeId=mgmtId;
}

Fixed version (ground truth):
public ClusteredDirectAgentAttache(AgentManager agentMgr,long id,long mgmtId,ServerResource resource,boolean maintenance,ClusteredAgentManagerImpl mgr){
  super(agentMgr,id,resource,maintenance,mgr);
  _mgr=mgr;
  _nodeId=mgmtId;
}
Program: 107089
Project: 107089
Buggy source:
public ConnectedAgentAttache(final long id,final Link link,boolean maintenance){
  super(id,maintenance);
  _link=link;
}

Fixed version (ground truth):
public ConnectedAgentAttache(AgentManager agentMgr,final long id,final Link link,boolean maintenance){
  super(agentMgr,id,maintenance);
  _link=link;
}
Program: 107090
Project: 107090
Buggy source:
public DirectAgentAttache(long id,ServerResource resource,boolean maintenance,AgentManagerImpl mgr){
  super(id,maintenance);
  _resource=resource;
  _mgr=mgr;
}

Fixed version (ground truth):
public DirectAgentAttache(AgentManager agentMgr,long id,ServerResource resource,boolean maintenance,AgentManagerImpl mgr){
  super(agentMgr,id,maintenance);
  _resource=resource;
  _mgr=mgr;
}
Program: 107091
Project: 107091
Buggy source:
public DummyAttache(long id,boolean maintenance){
  super(id,maintenance);
}

Fixed version (ground truth):
public DummyAttache(AgentManager agentMgr,long id,boolean maintenance){
  super(agentMgr,id,maintenance);
}
Program: 107092
Project: 107092
Buggy source:
@Override public List<Long> listRunningSecStorageOrderByLoad(SecondaryStorageVm.Role role,long zoneId){
  List<Long> l=new ArrayList<Long>();
  Transaction txn=Transaction.currentTxn();
  ;
  PreparedStatement pstmt=null;
  try {
    String sql;
    if (role == null)     sql="String_Node_Str" + "String_Node_Str";
 else     sql="String_Node_Str" + "String_Node_Str";
    pstmt=txn.prepareAutoCloseStatement(sql);
    if (role == null) {
      pstmt.setLong(1,zoneId);
    }
 else {
      pstmt.setLong(1,zoneId);
      pstmt.setString(2,role.toString());
    }
    ResultSet rs=pstmt.executeQuery();
    while (rs.next()) {
      l.add(rs.getLong(1));
    }
  }
 catch (  SQLException e) {
    s_logger.error("String_Node_Str",e);
  }
  return l;
}

Fixed version (ground truth):
@Override public List<Long> listRunningSecStorageOrderByLoad(SecondaryStorageVm.Role role,long zoneId){
  List<Long> l=new ArrayList<Long>();
  Transaction txn=Transaction.currentTxn();
  ;
  PreparedStatement pstmt=null;
  try {
    String sql;
    if (role == null)     sql="String_Node_Str";
 else     sql="String_Node_Str";
    pstmt=txn.prepareAutoCloseStatement(sql);
    if (role == null) {
      pstmt.setLong(1,zoneId);
    }
 else {
      pstmt.setLong(1,zoneId);
      pstmt.setString(2,role.toString());
    }
    ResultSet rs=pstmt.executeQuery();
    while (rs.next()) {
      l.add(rs.getLong(1));
    }
  }
 catch (  SQLException e) {
    s_logger.error("String_Node_Str",e);
  }
  return l;
}
Program: 107093
Project: 107093
Buggy source:
@Override public ItWorkVO findByOutstandingWork(long instanceId,State state){
  SearchCriteria<ItWorkVO> sc=AllFieldsSearch.create();
  sc.setParameters("String_Node_Str",instanceId);
  sc.setParameters("String_Node_Str",state);
  sc.setParameters("String_Node_Str",Step.Done);
  return findOneBy(sc);
}

Fixed version (ground truth):
@Override public ItWorkVO findByOutstandingWork(long instanceId,State state){
  SearchCriteria<ItWorkVO> sc=OutstandingWorkSearch.create();
  sc.setParameters("String_Node_Str",instanceId);
  sc.setParameters("String_Node_Str",state);
  sc.setParameters("String_Node_Str",Step.Done);
  return findOneBy(sc);
}
Program: 107094
Project: 107094
Buggy source:
protected ItWorkDaoImpl(){
  super();
  AllFieldsSearch=createSearchBuilder();
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getInstanceId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getStep(),Op.NEQ);
  AllFieldsSearch.done();
  CleanupSearch=createSearchBuilder();
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getType(),Op.IN);
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getUpdatedAt(),Op.LT);
  CleanupSearch.done();
  OutstandingWorkSearch=createSearchBuilder();
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getInstanceId(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getType(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getStep(),Op.NEQ);
  OutstandingWorkSearch.done();
  WorkInProgressSearch=createSearchBuilder();
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getManagementServerId(),Op.EQ);
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getStep(),Op.NIN);
  WorkInProgressSearch.done();
}

Fixed version (ground truth):
protected ItWorkDaoImpl(){
  super();
  AllFieldsSearch=createSearchBuilder();
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getInstanceId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getStep(),Op.EQ);
  AllFieldsSearch.done();
  CleanupSearch=createSearchBuilder();
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getType(),Op.IN);
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getUpdatedAt(),Op.LT);
  CleanupSearch.done();
  OutstandingWorkSearch=createSearchBuilder();
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getInstanceId(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getType(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getStep(),Op.NEQ);
  OutstandingWorkSearch.done();
  WorkInProgressSearch=createSearchBuilder();
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getManagementServerId(),Op.EQ);
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getStep(),Op.NIN);
  WorkInProgressSearch.done();
}
Program: 107095
Project: 107095
Buggy source:
@Override public ItWorkVO findByOutstandingWork(long instanceId,State state){
  SearchCriteria<ItWorkVO> sc=AllFieldsSearch.create();
  sc.setParameters("String_Node_Str",instanceId);
  sc.setParameters("String_Node_Str",state);
  sc.setParameters("String_Node_Str",Step.Done);
  return findOneBy(sc);
}

Fixed version (ground truth):
@Override public ItWorkVO findByOutstandingWork(long instanceId,State state){
  SearchCriteria<ItWorkVO> sc=OutstandingWorkSearch.create();
  sc.setParameters("String_Node_Str",instanceId);
  sc.setParameters("String_Node_Str",state);
  sc.setParameters("String_Node_Str",Step.Done);
  return findOneBy(sc);
}
Program: 107096
Project: 107096
Buggy source:
protected ItWorkDaoImpl(){
  super();
  AllFieldsSearch=createSearchBuilder();
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getInstanceId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getStep(),Op.NEQ);
  AllFieldsSearch.done();
  CleanupSearch=createSearchBuilder();
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getType(),Op.IN);
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getUpdatedAt(),Op.LT);
  CleanupSearch.done();
  OutstandingWorkSearch=createSearchBuilder();
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getInstanceId(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getType(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getStep(),Op.NEQ);
  OutstandingWorkSearch.done();
  WorkInProgressSearch=createSearchBuilder();
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getManagementServerId(),Op.EQ);
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getStep(),Op.NIN);
  WorkInProgressSearch.done();
}

Fixed version (ground truth):
protected ItWorkDaoImpl(){
  super();
  AllFieldsSearch=createSearchBuilder();
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getInstanceId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getStep(),Op.EQ);
  AllFieldsSearch.done();
  CleanupSearch=createSearchBuilder();
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getType(),Op.IN);
  CleanupSearch.and("String_Node_Str",CleanupSearch.entity().getUpdatedAt(),Op.LT);
  CleanupSearch.done();
  OutstandingWorkSearch=createSearchBuilder();
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getInstanceId(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getType(),Op.EQ);
  OutstandingWorkSearch.and("String_Node_Str",OutstandingWorkSearch.entity().getStep(),Op.NEQ);
  OutstandingWorkSearch.done();
  WorkInProgressSearch=createSearchBuilder();
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getManagementServerId(),Op.EQ);
  WorkInProgressSearch.and("String_Node_Str",WorkInProgressSearch.entity().getStep(),Op.NIN);
  WorkInProgressSearch.done();
}
Program: 107097
Project: 107097
Buggy source:
/** 
 * This is added to allow calling agent control service from within the resource
 * @return
 */
public IAgentControl getAgentControl();

Fixed version (ground truth):
/** 
 * This is added to allow calling agent control service from within the resource
 * @return
 */
IAgentControl getAgentControl();
Program: 107098
Project: 107098
Buggy source:
/** 
 * disconnected() is called when the connection is down between the agent and the management server.  If there are any cleanups, this is the time to do it.
 */
public void disconnected();

Fixed version (ground truth):
/** 
 * disconnected() is called when the connection is down between the agent and the management server.  If there are any cleanups, this is the time to do it.
 */
void disconnected();
Program: 107099
Project: 107099
Buggy source:
public void setAgentControl(IAgentControl agentControl);

Fixed version (ground truth):
void setAgentControl(IAgentControl agentControl);
Program: 107100
Project: 107100
Buggy source:
/** 
 * Generate a startup command containing information regarding the resource.
 * @return StartupCommand ready to be sent to the management server.
 */
public StartupCommand[] initialize();

Fixed version (ground truth):
/** 
 * Generate a startup command containing information regarding the resource.
 * @return StartupCommand ready to be sent to the management server.
 */
StartupCommand[] initialize();
Program: 107101
Project: 107101
Buggy source:
/** 
 * @param id id of the server to put in the PingCommand
 * @return PingCommand
 */
public PingCommand getCurrentStatus(long id);

Fixed version (ground truth):
/** 
 * @param id id of the server to put in the PingCommand
 * @return PingCommand
 */
PingCommand getCurrentStatus(long id);
Program: 107102
Project: 107102
Buggy source:
/** 
 * Execute the request coming from the computing server.
 * @param cmd Command to execute.
 * @return Answer
 */
public Answer executeRequest(Command cmd);

Fixed version (ground truth):
/** 
 * Execute the request coming from the computing server.
 * @param cmd Command to execute.
 * @return Answer
 */
Answer executeRequest(Command cmd);
Program: 107105
Project: 107105
Buggy source:
/** 
 * This is added to allow calling agent control service from within the resource
 * @return
 */
public IAgentControl getAgentControl();

Fixed version (ground truth):
/** 
 * This is added to allow calling agent control service from within the resource
 * @return
 */
IAgentControl getAgentControl();
Program: 107106
Project: 107106
Buggy source:
/** 
 * disconnected() is called when the connection is down between the agent and the management server.  If there are any cleanups, this is the time to do it.
 */
public void disconnected();

Fixed version (ground truth):
/** 
 * disconnected() is called when the connection is down between the agent and the management server.  If there are any cleanups, this is the time to do it.
 */
void disconnected();
Program: 107107
Project: 107107
Buggy source:
public void setAgentControl(IAgentControl agentControl);

Fixed version (ground truth):
void setAgentControl(IAgentControl agentControl);
Program: 107108
Project: 107108
Buggy source:
/** 
 * Generate a startup command containing information regarding the resource.
 * @return StartupCommand ready to be sent to the management server.
 */
public StartupCommand[] initialize();

Fixed version (ground truth):
/** 
 * Generate a startup command containing information regarding the resource.
 * @return StartupCommand ready to be sent to the management server.
 */
StartupCommand[] initialize();
Program: 107109
Project: 107109
Buggy source:
/** 
 * @param id id of the server to put in the PingCommand
 * @return PingCommand
 */
public PingCommand getCurrentStatus(long id);

Fixed version (ground truth):
/** 
 * @param id id of the server to put in the PingCommand
 * @return PingCommand
 */
PingCommand getCurrentStatus(long id);
Program: 107110
Project: 107110
Buggy source:
/** 
 * Execute the request coming from the computing server.
 * @param cmd Command to execute.
 * @return Answer
 */
public Answer executeRequest(Command cmd);

Fixed version (ground truth):
/** 
 * Execute the request coming from the computing server.
 * @param cmd Command to execute.
 * @return Answer
 */
Answer executeRequest(Command cmd);