nus-yam/ex-repair huggingface dataset:
Program: 106724
Project: 106724
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    NetworkOffering offering=_networkOfferingDao.findById(network.getNetworkOfferingId());
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),offering.getRedundantRouter());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    NetworkOffering offering=_networkOfferingDao.findById(network.getNetworkOfferingId());
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),offering.getRedundantRouter());
    if ((routers == null) || (routers.size() == 0)) {
      throw new ResourceUnavailableException("String_Node_Str",this.getClass(),0);
    }
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106725
Project: 106725
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),isRedundant);
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),isRedundant);
    if ((routers == null) || (routers.size() == 0)) {
      throw new ResourceUnavailableException("String_Node_Str",this.getClass(),0);
    }
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106726
Project: 106726
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),isRedundant);
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),isRedundant);
    if ((routers == null) || (routers.size() == 0)) {
      throw new ResourceUnavailableException("String_Node_Str",this.getClass(),0);
    }
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106733
Project: 106733
Buggy source:
public List<String> getSourceCidrList(){
  return null;
}

Fixed version (ground truth):
@Override public List<String> getSourceCidrList(){
  return null;
}
Program: 106734
Project: 106734
Buggy source:
void updateNicProfile(NicProfile profile,Network network);

Fixed version (ground truth):
/** 
 * @deprecated This method should not be here in the first place. What does this really mean? Is it always persistedin the nic? When is it persisted in the nic? When is it called? No Idea.
 * @param profile
 * @param network
 */
@Deprecated void updateNicProfile(NicProfile profile,Network network);
Program: 106735
Project: 106735
Buggy source:
/** 
 * allocate a nic in this network.  This method implementation cannot take a long time as  it is meant to allocate for the DB.
 * @param network configuration to allocate the nic in.
 * @param nic user specified 
 * @param vm virtual machine the network configuraiton will be in.
 * @return NicProfile.
 * @throws InsufficientVirtualNetworkCapcityException
 * @throws InsufficientAddressCapacityException
 */
NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException ;

Fixed version (ground truth):
/** 
 * allocate a nic in this network. This method implementation cannot take a long time as it is meant to allocate for the DB.
 * @param network configuration to allocate the nic in.
 * @param nic user specified
 * @param vm virtual machine the network configuration will be in.
 * @return NicProfile.
 * @throws InsufficientVirtualNetworkCapcityException
 * @throws InsufficientAddressCapacityException
 */
NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException ;
Program: 106736
Project: 106736
Buggy source:
/** 
 * Fully implement the network configuration as specified.
 * @param network network configuration 
 * @param offering offering that the network configuration was based on.
 * @param destination where were deploying to.
 * @return a fully implemented NetworkConfiguration.
 * @throws InsufficientVirtualNetworkCapcityException TODO
 */
Network implement(Network network,NetworkOffering offering,DeployDestination destination,ReservationContext context) throws InsufficientVirtualNetworkCapcityException ;

Fixed version (ground truth):
/** 
 * Fully implement the network configuration as specified.
 * @param network network configuration
 * @param offering offering that the network configuration was based on.
 * @param destination where were deploying to.
 * @return a fully implemented NetworkConfiguration.
 * @throws InsufficientVirtualNetworkCapcityException
 */
Network implement(Network network,NetworkOffering offering,DeployDestination destination,ReservationContext context) throws InsufficientVirtualNetworkCapcityException ;
Program: 106737
Project: 106737
Buggy source:
void updateNicProfile(NicProfile profile,Network network);

Fixed version (ground truth):
/** 
 * @deprecated This method should not be here in the first place. What does this really mean? Is it always persistedin the nic? When is it persisted in the nic? When is it called? No Idea.
 * @param profile
 * @param network
 */
@Deprecated void updateNicProfile(NicProfile profile,Network network);
Program: 106738
Project: 106738
Buggy source:
/** 
 * allocate a nic in this network.  This method implementation cannot take a long time as  it is meant to allocate for the DB.
 * @param network configuration to allocate the nic in.
 * @param nic user specified 
 * @param vm virtual machine the network configuraiton will be in.
 * @return NicProfile.
 * @throws InsufficientVirtualNetworkCapcityException
 * @throws InsufficientAddressCapacityException
 */
NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException ;

Fixed version (ground truth):
/** 
 * allocate a nic in this network. This method implementation cannot take a long time as it is meant to allocate for the DB.
 * @param network configuration to allocate the nic in.
 * @param nic user specified
 * @param vm virtual machine the network configuration will be in.
 * @return NicProfile.
 * @throws InsufficientVirtualNetworkCapcityException
 * @throws InsufficientAddressCapacityException
 */
NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException ;
Program: 106739
Project: 106739
Buggy source:
/** 
 * Fully implement the network configuration as specified.
 * @param network network configuration 
 * @param offering offering that the network configuration was based on.
 * @param destination where were deploying to.
 * @return a fully implemented NetworkConfiguration.
 * @throws InsufficientVirtualNetworkCapcityException TODO
 */
Network implement(Network network,NetworkOffering offering,DeployDestination destination,ReservationContext context) throws InsufficientVirtualNetworkCapcityException ;

Fixed version (ground truth):
/** 
 * Fully implement the network configuration as specified.
 * @param network network configuration
 * @param offering offering that the network configuration was based on.
 * @param destination where were deploying to.
 * @return a fully implemented NetworkConfiguration.
 * @throws InsufficientVirtualNetworkCapcityException
 */
Network implement(Network network,NetworkOffering offering,DeployDestination destination,ReservationContext context) throws InsufficientVirtualNetworkCapcityException ;
Program: 106740
Project: 106740
Buggy source:
public String[][] generateFwRules(){
  String[][] result=new String[2][];
  Set<String> toAdd=new HashSet<String>();
  for (  FirewallRuleTO fwTO : rules) {
    if (fwTO.revoked() == true)     continue;
    List<String> cidr;
    StringBuilder sb=new StringBuilder();
    sb.append(fwTO.getSrcIp()).append("String_Node_Str").append(fwTO.getProtocol()).append("String_Node_Str");
    if ("String_Node_Str".compareTo(fwTO.getProtocol()) == 0) {
      sb.append(fwTO.getIcmpType()).append("String_Node_Str").append(fwTO.getIcmpCode()).append("String_Node_Str");
    }
 else     if (fwTO.getStringSrcPortRange() == null)     sb.append("String_Node_Str").append("String_Node_Str");
 else     sb.append(fwTO.getStringSrcPortRange()).append("String_Node_Str");
    cidr=fwTO.getSourceCidrList();
    if (cidr == null || cidr.isEmpty()) {
      sb.append("String_Node_Str");
    }
 else {
      Boolean firstEntry=true;
      for (      String tag : cidr) {
        if (!firstEntry)         sb.append("String_Node_Str");
        sb.append(tag);
        firstEntry=false;
      }
    }
    sb.append("String_Node_Str");
    String fwRuleEntry=sb.toString();
    toAdd.add(fwRuleEntry);
  }
  result[0]=toAdd.toArray(new String[toAdd.size()]);
  return result;
}

Fixed version (ground truth):
public String[][] generateFwRules(){
  String[][] result=new String[2][];
  Set<String> toAdd=new HashSet<String>();
  for (  FirewallRuleTO fwTO : rules) {
    if (fwTO.revoked() == true) {
      StringBuilder sb=new StringBuilder();
      sb.append(fwTO.getSrcIp()).append("String_Node_Str");
      String fwRuleEntry=sb.toString();
      toAdd.add(fwRuleEntry);
      continue;
    }
    List<String> cidr;
    StringBuilder sb=new StringBuilder();
    sb.append(fwTO.getSrcIp()).append("String_Node_Str").append(fwTO.getProtocol()).append("String_Node_Str");
    if ("String_Node_Str".compareTo(fwTO.getProtocol()) == 0) {
      sb.append(fwTO.getIcmpType()).append("String_Node_Str").append(fwTO.getIcmpCode()).append("String_Node_Str");
    }
 else     if (fwTO.getStringSrcPortRange() == null)     sb.append("String_Node_Str").append("String_Node_Str");
 else     sb.append(fwTO.getStringSrcPortRange()).append("String_Node_Str");
    cidr=fwTO.getSourceCidrList();
    if (cidr == null || cidr.isEmpty()) {
      sb.append("String_Node_Str");
    }
 else {
      Boolean firstEntry=true;
      for (      String tag : cidr) {
        if (!firstEntry)         sb.append("String_Node_Str");
        sb.append(tag);
        firstEntry=false;
      }
    }
    sb.append("String_Node_Str");
    String fwRuleEntry=sb.toString();
    toAdd.add(fwRuleEntry);
  }
  result[0]=toAdd.toArray(new String[toAdd.size()]);
  return result;
}
Program: 106741
Project: 106741
Buggy source:
void updateNicProfile(NicProfile profile,Network network);

Fixed version (ground truth):
/** 
 * @deprecated This method should not be here in the first place. What does this really mean? Is it always persistedin the nic? When is it persisted in the nic? When is it called? No Idea.
 * @param profile
 * @param network
 */
@Deprecated void updateNicProfile(NicProfile profile,Network network);
Program: 106742
Project: 106742
Buggy source:
/** 
 * allocate a nic in this network.  This method implementation cannot take a long time as  it is meant to allocate for the DB.
 * @param network configuration to allocate the nic in.
 * @param nic user specified 
 * @param vm virtual machine the network configuraiton will be in.
 * @return NicProfile.
 * @throws InsufficientVirtualNetworkCapcityException
 * @throws InsufficientAddressCapacityException
 */
NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException ;

Fixed version (ground truth):
/** 
 * allocate a nic in this network. This method implementation cannot take a long time as it is meant to allocate for the DB.
 * @param network configuration to allocate the nic in.
 * @param nic user specified
 * @param vm virtual machine the network configuration will be in.
 * @return NicProfile.
 * @throws InsufficientVirtualNetworkCapcityException
 * @throws InsufficientAddressCapacityException
 */
NicProfile allocate(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException ;
Program: 106743
Project: 106743
Buggy source:
/** 
 * Fully implement the network configuration as specified.
 * @param network network configuration 
 * @param offering offering that the network configuration was based on.
 * @param destination where were deploying to.
 * @return a fully implemented NetworkConfiguration.
 * @throws InsufficientVirtualNetworkCapcityException TODO
 */
Network implement(Network network,NetworkOffering offering,DeployDestination destination,ReservationContext context) throws InsufficientVirtualNetworkCapcityException ;

Fixed version (ground truth):
/** 
 * Fully implement the network configuration as specified.
 * @param network network configuration
 * @param offering offering that the network configuration was based on.
 * @param destination where were deploying to.
 * @return a fully implemented NetworkConfiguration.
 * @throws InsufficientVirtualNetworkCapcityException
 */
Network implement(Network network,NetworkOffering offering,DeployDestination destination,ReservationContext context) throws InsufficientVirtualNetworkCapcityException ;
Program: 106744
Project: 106744
Buggy source:
@Override public void run(){
  final List<DomainRouterVO> routers=_routerDao.listVirtualUpByHostId(null);
  s_logger.debug("String_Node_Str" + routers.size() + "String_Node_Str");
  updateRoutersRedundantState(routers);
  checkDuplicateMaster(routers);
}

Fixed version (ground truth):
@Override public void run(){
  try {
    final List<DomainRouterVO> routers=_routerDao.listVirtualUpByHostId(null);
    s_logger.debug("String_Node_Str" + routers.size() + "String_Node_Str");
    updateRoutersRedundantState(routers);
    checkDuplicateMaster(routers);
  }
 catch (  Exception ex) {
    s_logger.error("String_Node_Str",ex);
  }
}
Program: 106745
Project: 106745
Buggy source:
@Override public void run(){
  final List<DomainRouterVO> routers=_routerDao.listVirtualUpByHostId(null);
  s_logger.debug("String_Node_Str" + routers.size() + "String_Node_Str");
  updateRoutersRedundantState(routers);
  checkDuplicateMaster(routers);
}

Fixed version (ground truth):
@Override public void run(){
  try {
    final List<DomainRouterVO> routers=_routerDao.listVirtualUpByHostId(null);
    s_logger.debug("String_Node_Str" + routers.size() + "String_Node_Str");
    updateRoutersRedundantState(routers);
    checkDuplicateMaster(routers);
  }
 catch (  Exception ex) {
    s_logger.error("String_Node_Str",ex);
  }
}
Program: 106746
Project: 106746
Buggy source:
@Override public void run(){
  final List<DomainRouterVO> routers=_routerDao.listVirtualUpByHostId(null);
  s_logger.debug("String_Node_Str" + routers.size() + "String_Node_Str");
  updateRoutersRedundantState(routers);
  checkDuplicateMaster(routers);
}

Fixed version (ground truth):
@Override public void run(){
  try {
    final List<DomainRouterVO> routers=_routerDao.listVirtualUpByHostId(null);
    s_logger.debug("String_Node_Str" + routers.size() + "String_Node_Str");
    updateRoutersRedundantState(routers);
    checkDuplicateMaster(routers);
  }
 catch (  Exception ex) {
    s_logger.error("String_Node_Str",ex);
  }
}
Program: 106747
Project: 106747
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest,network.getTrafficType())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
    params.put(VirtualMachineProfile.Param.RestartNetwork,true);
    List<DomainRouterVO> routers=_routerMgr.deployDhcp(network,dest,uservm.getOwner(),uservm.getParameters());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest,network.getTrafficType())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
    params.put(VirtualMachineProfile.Param.RestartNetwork,true);
    List<DomainRouterVO> routers=_routerMgr.deployDhcp(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106748
Project: 106748
Buggy source:
@Override public boolean implement(Network network,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  if (!canHandle(network.getGuestType(),dest,offering.getTrafficType())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployDhcp(network,dest,context.getAccount(),params);
  return true;
}

Fixed version (ground truth):
@Override public boolean implement(Network network,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  if (!canHandle(network.getGuestType(),dest,offering.getTrafficType())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployDhcp(network,dest,_accountMgr.getAccount(network.getAccountId()),params);
  return true;
}
Program: 106749
Project: 106749
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    NetworkOffering offering=_networkOfferingDao.findById(network.getNetworkOfferingId());
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,uservm.getOwner(),uservm.getParameters(),offering.getRedundantRouter());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    NetworkOffering offering=_networkOfferingDao.findById(network.getNetworkOfferingId());
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),offering.getRedundantRouter());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106750
Project: 106750
Buggy source:
@Override public boolean implement(Network guestConfig,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  if (!canHandle(guestConfig.getGuestType(),dest.getDataCenter())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployVirtualRouter(guestConfig,dest,context.getAccount(),params,offering.getRedundantRouter());
  return true;
}

Fixed version (ground truth):
@Override public boolean implement(Network guestConfig,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  if (!canHandle(guestConfig.getGuestType(),dest.getDataCenter())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployVirtualRouter(guestConfig,dest,_accountMgr.getAccount(guestConfig.getAccountId()),params,offering.getRedundantRouter());
  return true;
}
Program: 106751
Project: 106751
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest,network.getTrafficType())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
    params.put(VirtualMachineProfile.Param.RestartNetwork,true);
    List<DomainRouterVO> routers=_routerMgr.deployDhcp(network,dest,uservm.getOwner(),uservm.getParameters());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest,network.getTrafficType())) {
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
    params.put(VirtualMachineProfile.Param.RestartNetwork,true);
    List<DomainRouterVO> routers=_routerMgr.deployDhcp(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters());
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106752
Project: 106752
Buggy source:
@Override public boolean implement(Network network,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  if (!canHandle(network.getGuestType(),dest,offering.getTrafficType())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployDhcp(network,dest,context.getAccount(),params);
  return true;
}

Fixed version (ground truth):
@Override public boolean implement(Network network,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  if (!canHandle(network.getGuestType(),dest,offering.getTrafficType())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployDhcp(network,dest,_accountMgr.getAccount(network.getAccountId()),params);
  return true;
}
Program: 106753
Project: 106753
Buggy source:
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,uservm.getOwner(),uservm.getParameters(),isRedundant);
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean prepare(Network network,NicProfile nic,VirtualMachineProfile<? extends VirtualMachine> vm,DeployDestination dest,ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
  if (canHandle(network.getGuestType(),dest.getDataCenter())) {
    boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
    if (vm.getType() != VirtualMachine.Type.User) {
      return false;
    }
    @SuppressWarnings("String_Node_Str") VirtualMachineProfile<UserVm> uservm=(VirtualMachineProfile<UserVm>)vm;
    List<DomainRouterVO> routers=_routerMgr.deployVirtualRouter(network,dest,_accountMgr.getAccount(network.getAccountId()),uservm.getParameters(),isRedundant);
    List<VirtualRouter> rets=_routerMgr.addVirtualMachineIntoNetwork(network,nic,uservm,dest,context,routers);
    return (rets != null) && (!rets.isEmpty());
  }
 else {
    return false;
  }
}
Program: 106754
Project: 106754
Buggy source:
@Override public boolean implement(Network guestConfig,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
  if (!canHandle(guestConfig.getGuestType(),dest.getDataCenter())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployVirtualRouter(guestConfig,dest,context.getAccount(),params,isRedundant);
  return true;
}

Fixed version (ground truth):
@Override public boolean implement(Network guestConfig,NetworkOffering offering,DeployDestination dest,ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException {
  boolean isRedundant=_configDao.getValue("String_Node_Str").equals("String_Node_Str");
  if (!canHandle(guestConfig.getGuestType(),dest.getDataCenter())) {
    return false;
  }
  Map<VirtualMachineProfile.Param,Object> params=new HashMap<VirtualMachineProfile.Param,Object>(1);
  params.put(VirtualMachineProfile.Param.RestartNetwork,true);
  _routerMgr.deployVirtualRouter(guestConfig,dest,_accountMgr.getAccount(guestConfig.getAccountId()),params,isRedundant);
  return true;
}
Program: 106755
Project: 106755
Buggy source:
@Override public Integer getIcmpCode(){
  return null;
}

Fixed version (ground truth):
public Integer getIcmpCode(){
  return null;
}
Program: 106756
Project: 106756
Buggy source:
@Override public Integer getIcmpType(){
  return null;
}

Fixed version (ground truth):
public Integer getIcmpType(){
  return null;
}
Program: 106758
Project: 106758
Buggy source:
LoadBalancer createLoadBalancer(CreateLoadBalancerRuleCmd lb) throws NetworkRuleConflictException ;

Fixed version (ground truth):
LoadBalancer createLoadBalancer(CreateLoadBalancerRuleCmd lb,boolean openFirewall) throws NetworkRuleConflictException ;
Program: 106759
Project: 106759
Buggy source:
@Override @DB @ActionEvent(eventType=EventTypes.EVENT_LOAD_BALANCER_CREATE,eventDescription="String_Node_Str") public LoadBalancer createLoadBalancerRule(CreateLoadBalancerRuleCmd lb){
}

Fixed version (ground truth):
@Override @DB @ActionEvent(eventType=EventTypes.EVENT_LOAD_BALANCER_CREATE,eventDescription="String_Node_Str") public LoadBalancer createLoadBalancerRule(CreateLoadBalancerRuleCmd lb,boolean openFirewall) throws NetworkRuleConflictException, InsufficientAddressCapacityException {
  UserContext caller=UserContext.current();
  int defPortStart=lb.getDefaultPortStart();
  int defPortEnd=lb.getDefaultPortEnd();
  if (!NetUtils.isValidPort(defPortEnd)) {
    throw new InvalidParameterValueException("String_Node_Str" + defPortEnd);
  }
  if (defPortStart > defPortEnd) {
    throw new InvalidParameterValueException("String_Node_Str" + defPortStart + "String_Node_Str"+ defPortEnd);
  }
  if ((lb.getAlgorithm() == null) || !NetUtils.isValidAlgorithm(lb.getAlgorithm())) {
    throw new InvalidParameterValueException("String_Node_Str" + lb.getAlgorithm());
  }
  LoadBalancer result=_elbMgr.handleCreateLoadBalancerRule(lb,caller.getCaller());
  if (result == null) {
    result=createLoadBalancer(lb,openFirewall);
  }
  return result;
}
Program: 106762
Project: 106762
Buggy source:
private static void releaseInternLock(String name){
synchronized (s_lockMap) {
    GlobalLock lock=s_lockMap.get(name);
    assert(lock != null);
    if (lock.referenceCount == 0)     s_lockMap.remove(name);
  }
}

Fixed version (ground truth):
private static void releaseInternLock(String name){
synchronized (s_lockMap) {
    GlobalLock lock=s_lockMap.get(name);
    if (lock != null) {
      if (lock.referenceCount == 0)       s_lockMap.remove(name);
    }
 else {
      s_logger.warn("String_Node_Str" + name + "String_Node_Str");
    }
  }
}
Program: 106763
Project: 106763
Buggy source:
private static void releaseInternLock(String name){
synchronized (s_lockMap) {
    GlobalLock lock=s_lockMap.get(name);
    assert(lock != null);
    if (lock.referenceCount == 0)     s_lockMap.remove(name);
  }
}

Fixed version (ground truth):
private static void releaseInternLock(String name){
synchronized (s_lockMap) {
    GlobalLock lock=s_lockMap.get(name);
    if (lock != null) {
      if (lock.referenceCount == 0)       s_lockMap.remove(name);
    }
 else {
      s_logger.warn("String_Node_Str" + name + "String_Node_Str");
    }
  }
}
Program: 106769
Project: 106769
Buggy source:
public Map<String,String> getDetails(){
  return details;
}

Fixed version (ground truth):
@Override public Map<String,String> getDetails(){
  return details;
}
Program: 106770
Project: 106770
Buggy source:
protected <T extends VirtualMachine>VirtualMachineTO toVirtualMachineTO(VirtualMachineProfile<T> vmProfile){
  ServiceOffering offering=vmProfile.getServiceOffering();
  VirtualMachine vm=vmProfile.getVirtualMachine();
  VirtualMachineTO to=new VirtualMachineTO(vm.getId(),vm.getInstanceName(),vm.getType(),offering.getCpu(),offering.getSpeed(),offering.getRamSize() * 1024l * 1024l,offering.getRamSize() * 1024l * 1024l,null,null,vm.isHaEnabled(),vm.limitCpuUse(),vm.getVncPassword());
  to.setBootArgs(vmProfile.getBootArgs());
  List<NicProfile> nicProfiles=vmProfile.getNics();
  NicTO[] nics=new NicTO[nicProfiles.size()];
  int i=0;
  for (  NicProfile nicProfile : nicProfiles) {
    nics[i++]=toNicTO(nicProfile);
  }
  to.setNics(nics);
  to.setDisks(vmProfile.getDisks().toArray(new VolumeTO[vmProfile.getDisks().size()]));
  if (vmProfile.getTemplate().getBits() == 32) {
    to.setArch("String_Node_Str");
  }
 else {
    to.setArch("String_Node_Str");
  }
  return to;
}

Fixed version (ground truth):
protected <T extends VirtualMachine>VirtualMachineTO toVirtualMachineTO(VirtualMachineProfile<T> vmProfile){
  ServiceOffering offering=vmProfile.getServiceOffering();
  VirtualMachine vm=vmProfile.getVirtualMachine();
  VirtualMachineTO to=new VirtualMachineTO(vm.getId(),vm.getInstanceName(),vm.getType(),offering.getCpu(),offering.getSpeed(),offering.getRamSize() * 1024l * 1024l,offering.getRamSize() * 1024l * 1024l,null,null,vm.isHaEnabled(),vm.limitCpuUse(),vm.getVncPassword());
  to.setBootArgs(vmProfile.getBootArgs());
  List<NicProfile> nicProfiles=vmProfile.getNics();
  NicTO[] nics=new NicTO[nicProfiles.size()];
  int i=0;
  for (  NicProfile nicProfile : nicProfiles) {
    nics[i++]=toNicTO(nicProfile);
  }
  to.setNics(nics);
  to.setDisks(vmProfile.getDisks().toArray(new VolumeTO[vmProfile.getDisks().size()]));
  if (vmProfile.getTemplate().getBits() == 32) {
    to.setArch("String_Node_Str");
  }
 else {
    to.setArch("String_Node_Str");
  }
  to.setDetails(vm.getDetails());
  return to;
}
Program: 106775
Project: 106775
Buggy source:
protected void fullSync(StartupRoutingCommand cmd,Connection conn){
synchronized (_vms) {
    _vms.clear();
  }
  try {
    final HashMap<String,VmState> vmStates=new HashMap<String,VmState>();
    Map<VM,VM.Record> vmRs=VM.getAllRecords(conn);
    for (    VM.Record record : vmRs.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 (host != null) {
        host_uuid=host.getUuid(conn);
        if (host_uuid.equals(_host.uuid)) {
synchronized (_vms) {
            _vms.put(vm_name,state);
          }
        }
      }
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str" + vm_name + "String_Node_Str"+ ps+ "String_Node_Str"+ state.toString());
      }
      VmState vm_state=cmd.new VmState(state,host_uuid);
      vmStates.put(vm_name,vm_state);
    }
    cmd.setChanges(vmStates);
  }
 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);
  }
}

Fixed version (ground truth):
protected void fullSync(StartupRoutingCommand cmd,Connection conn){
synchronized (_vms) {
    _vms.clear();
  }
  try {
    final HashMap<String,VmState> vmStates=new HashMap<String,VmState>();
    Map<VM,VM.Record> vmRs=VM.getAllRecords(conn);
    for (    VM.Record record : vmRs.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 (host != null) {
        host_uuid=host.getUuid(conn);
        if (host_uuid.equals(_host.uuid)) {
synchronized (_vms) {
            _vms.put(vm_name,state);
          }
        }
      }
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str" + vm_name + "String_Node_Str"+ ps+ "String_Node_Str"+ state.toString());
      }
      VmState vm_state=new StartupRoutingCommand.VmState(state,host_uuid);
      vmStates.put(vm_name,vm_state);
    }
    cmd.setChanges(vmStates);
  }
 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);
  }
}
Program: 106776
Project: 106776
Buggy source:
protected void fullSync(StartupRoutingCommand cmd,Connection conn){
synchronized (_vms) {
    _vms.clear();
  }
  try {
    final HashMap<String,VmState> vmStates=new HashMap<String,VmState>();
    Map<VM,VM.Record> vmRs=VM.getAllRecords(conn);
    for (    VM.Record record : vmRs.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 (host != null) {
        host_uuid=host.getUuid(conn);
        if (host_uuid.equals(_host.uuid)) {
synchronized (_vms) {
            _vms.put(vm_name,state);
          }
        }
      }
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str" + vm_name + "String_Node_Str"+ ps+ "String_Node_Str"+ state.toString());
      }
      VmState vm_state=cmd.new VmState(state,host_uuid);
      vmStates.put(vm_name,vm_state);
    }
    cmd.setChanges(vmStates);
  }
 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);
  }
}

Fixed version (ground truth):
protected void fullSync(StartupRoutingCommand cmd,Connection conn){
synchronized (_vms) {
    _vms.clear();
  }
  try {
    final HashMap<String,VmState> vmStates=new HashMap<String,VmState>();
    Map<VM,VM.Record> vmRs=VM.getAllRecords(conn);
    for (    VM.Record record : vmRs.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 (host != null) {
        host_uuid=host.getUuid(conn);
        if (host_uuid.equals(_host.uuid)) {
synchronized (_vms) {
            _vms.put(vm_name,state);
          }
        }
      }
      if (s_logger.isTraceEnabled()) {
        s_logger.trace("String_Node_Str" + vm_name + "String_Node_Str"+ ps+ "String_Node_Str"+ state.toString());
      }
      VmState vm_state=new StartupRoutingCommand.VmState(state,host_uuid);
      vmStates.put(vm_name,vm_state);
    }
    cmd.setChanges(vmStates);
  }
 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);
  }
}
Program: 106781
Project: 106781
Buggy source:
public Map<String,String> getDetails(){
  return details;
}

Fixed version (ground truth):
@Override public Map<String,String> getDetails(){
  return details;
}
Program: 106782
Project: 106782
Buggy source:
protected <T extends VirtualMachine>VirtualMachineTO toVirtualMachineTO(VirtualMachineProfile<T> vmProfile){
  ServiceOffering offering=vmProfile.getServiceOffering();
  VirtualMachine vm=vmProfile.getVirtualMachine();
  VirtualMachineTO to=new VirtualMachineTO(vm.getId(),vm.getInstanceName(),vm.getType(),offering.getCpu(),offering.getSpeed(),offering.getRamSize() * 1024l * 1024l,offering.getRamSize() * 1024l * 1024l,null,null,vm.isHaEnabled(),vm.limitCpuUse(),vm.getVncPassword());
  to.setBootArgs(vmProfile.getBootArgs());
  List<NicProfile> nicProfiles=vmProfile.getNics();
  NicTO[] nics=new NicTO[nicProfiles.size()];
  int i=0;
  for (  NicProfile nicProfile : nicProfiles) {
    nics[i++]=toNicTO(nicProfile);
  }
  to.setNics(nics);
  to.setDisks(vmProfile.getDisks().toArray(new VolumeTO[vmProfile.getDisks().size()]));
  if (vmProfile.getTemplate().getBits() == 32) {
    to.setArch("String_Node_Str");
  }
 else {
    to.setArch("String_Node_Str");
  }
  return to;
}

Fixed version (ground truth):
protected <T extends VirtualMachine>VirtualMachineTO toVirtualMachineTO(VirtualMachineProfile<T> vmProfile){
  ServiceOffering offering=vmProfile.getServiceOffering();
  VirtualMachine vm=vmProfile.getVirtualMachine();
  VirtualMachineTO to=new VirtualMachineTO(vm.getId(),vm.getInstanceName(),vm.getType(),offering.getCpu(),offering.getSpeed(),offering.getRamSize() * 1024l * 1024l,offering.getRamSize() * 1024l * 1024l,null,null,vm.isHaEnabled(),vm.limitCpuUse(),vm.getVncPassword());
  to.setBootArgs(vmProfile.getBootArgs());
  List<NicProfile> nicProfiles=vmProfile.getNics();
  NicTO[] nics=new NicTO[nicProfiles.size()];
  int i=0;
  for (  NicProfile nicProfile : nicProfiles) {
    nics[i++]=toNicTO(nicProfile);
  }
  to.setNics(nics);
  to.setDisks(vmProfile.getDisks().toArray(new VolumeTO[vmProfile.getDisks().size()]));
  if (vmProfile.getTemplate().getBits() == 32) {
    to.setArch("String_Node_Str");
  }
 else {
    to.setArch("String_Node_Str");
  }
  to.setDetails(vm.getDetails());
  return to;
}
Program: 106788
Project: 106788
Buggy source:
@Override public void run(){
  cleanupFinishedWork();
  cleanupUnfinishedWork();
}

Fixed version (ground truth):
@Override public void run(){
  try {
    Transaction txn=Transaction.open("String_Node_Str");
    try {
      cleanupFinishedWork();
      cleanupUnfinishedWork();
    }
  finally {
      txn.close("String_Node_Str");
    }
  }
 catch (  Throwable th) {
    try {
      s_logger.error("String_Node_Str",th);
    }
 catch (    Throwable th2) {
    }
  }
}
Program: 106794
Project: 106794
Buggy source:
public Attribute findAttribute(String name){
  for (  Attribute attr : _attributes) {
    if (attr.columnName.equals(GenericDao.REMOVED) && attr.isUpdatable()) {
      return null;
    }
    if (attr.columnName.equals(name)) {
      return attr;
    }
  }
  return null;
}

Fixed version (ground truth):
public Attribute findAttribute(String name){
  for (  Attribute attr : _attributes) {
    if (attr.columnName.equalsIgnoreCase(name)) {
      if (attr.columnName.equalsIgnoreCase(GenericDao.REMOVED) && attr.isUpdatable()) {
        return null;
      }
      return attr;
    }
  }
  return null;
}
Program: 106795
Project: 106795
Buggy source:
public Attribute findAttribute(String name){
  for (  Attribute attr : _attributes) {
    if (attr.columnName.equals(GenericDao.REMOVED) && attr.isUpdatable()) {
      return null;
    }
    if (attr.columnName.equals(name)) {
      return attr;
    }
  }
  return null;
}

Fixed version (ground truth):
public Attribute findAttribute(String name){
  for (  Attribute attr : _attributes) {
    if (attr.columnName.equalsIgnoreCase(name)) {
      if (attr.columnName.equalsIgnoreCase(GenericDao.REMOVED) && attr.isUpdatable()) {
        return null;
      }
      return attr;
    }
  }
  return null;
}