nus-yam/ex-repair huggingface dataset:
Program: 116618
Project: 116618
Buggy source:
public PayloadData create(String alias,Cluster cluster,Subscriber subscriber,Repository repository,CartridgeInfo cartridgeInfo,String subscriptionKey,Map<String,String> customPayloadEntries) throws ADCException, AlreadySubscribedException {
  String clusterId;
  if (isLoadBalancedServiceMultiTenant) {
    Service deployedLBService;
    try {
      deployedLBService=new DataInsertionAndRetrievalManager().getService(cartridgeInfo.getType());
    }
 catch (    PersistenceManagerException e) {
      String errorMsg="String_Node_Str";
      log.error(errorMsg,e);
      throw new ADCException(errorMsg,e);
    }
    if (deployedLBService == null) {
      String errorMsg="String_Node_Str" + cartridgeInfo.getType();
      log.error(errorMsg);
      throw new ADCException(errorMsg);
    }
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + deployedLBService.getClusterId());
      log.debug("String_Node_Str" + deployedLBService.getHostName());
    }
    cluster.setClusterDomain(deployedLBService.getClusterId());
    cluster.setHostName(deployedLBService.getHostName());
  }
 else {
    cluster.setClusterDomain(generateClusterId(alias,cartridgeInfo.getType()));
    cluster.setHostName(generateHostName(alias,cartridgeInfo.getHostName()));
  }
  return createPayload(cartridgeInfo,subscriptionKey,subscriber,cluster,repository,alias,customPayloadEntries);
}

Fixed version (ground truth):
public PayloadData create(String alias,Cluster cluster,Subscriber subscriber,Repository repository,CartridgeInfo cartridgeInfo,String subscriptionKey,Map<String,String> customPayloadEntries) throws ADCException, AlreadySubscribedException {
  String clusterId;
  if (isLoadBalancedServiceMultiTenant) {
    Service deployedLBService;
    try {
      deployedLBService=new DataInsertionAndRetrievalManager().getService(cartridgeInfo.getType());
    }
 catch (    PersistenceManagerException e) {
      String errorMsg="String_Node_Str";
      log.error(errorMsg,e);
      throw new ADCException(errorMsg,e);
    }
    if (deployedLBService == null) {
      String errorMsg="String_Node_Str" + cartridgeInfo.getType();
      log.error(errorMsg);
      throw new ADCException(errorMsg);
    }
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + deployedLBService.getClusterId());
      log.debug("String_Node_Str" + deployedLBService.getHostName());
    }
    cluster.setClusterDomain(deployedLBService.getClusterId());
    cluster.setHostName(deployedLBService.getHostName());
    return null;
  }
 else {
    cluster.setClusterDomain(generateClusterId(alias,cartridgeInfo.getType()));
    cluster.setHostName(generateHostName(alias,cartridgeInfo.getHostName()));
    return createPayload(cartridgeInfo,subscriptionKey,subscriber,cluster,repository,alias,customPayloadEntries);
  }
}
Program: 116620
Project: 116620
Buggy source:
@Override public CartridgeSubscriptionInfo registerSubscription(Properties properties) throws ADCException, UnregisteredCartridgeException {
  getLoadBalancerCategory().register(getCartridgeInfo(),getCluster(),getPayloadData(),getAutoscalingPolicyName(),getDeploymentPolicyName(),properties);
  return ApplicationManagementUtil.createCartridgeSubscription(getCartridgeInfo(),getAutoscalingPolicyName(),getType(),getAlias(),getSubscriber().getTenantId(),getSubscriber().getTenantDomain(),getRepository(),getCluster().getHostName(),getCluster().getClusterDomain(),getCluster().getClusterSubDomain(),getCluster().getMgtClusterDomain(),getCluster().getMgtClusterSubDomain(),null,getSubscriptionStatus(),getSubscriptionKey());
}

Fixed version (ground truth):
@Override public CartridgeSubscriptionInfo registerSubscription(Properties properties) throws ADCException, UnregisteredCartridgeException {
  CartridgeInfo cartridgeInfo=getCartridgeInfo();
  if (!cartridgeInfo.isMultiTenantSpecified()) {
    getLoadBalancerCategory().register(cartridgeInfo,getCluster(),getPayloadData(),getAutoscalingPolicyName(),getDeploymentPolicyName(),properties);
  }
  return ApplicationManagementUtil.createCartridgeSubscription(getCartridgeInfo(),getAutoscalingPolicyName(),getType(),getAlias(),getSubscriber().getTenantId(),getSubscriber().getTenantDomain(),getRepository(),getCluster().getHostName(),getCluster().getClusterDomain(),getCluster().getClusterSubDomain(),getCluster().getMgtClusterDomain(),getCluster().getMgtClusterSubDomain(),null,getSubscriptionStatus(),getSubscriptionKey());
}
Program: 116621
Project: 116621
Buggy source:
public void createSubscription(Subscriber subscriber,String alias,String autoscalingPolicy,String deploymentPolicyName,Repository repository) throws ADCException, PolicyException, UnregisteredCartridgeException, InvalidCartridgeAliasException, DuplicateCartridgeAliasException, RepositoryRequiredException, AlreadySubscribedException, RepositoryCredentialsRequiredException, InvalidRepositoryException, RepositoryTransportException {
  setSubscriber(subscriber);
  setAlias(alias);
  setAutoscalingPolicyName(autoscalingPolicy);
  setDeploymentPolicyName(deploymentPolicyName);
  setRepository(repository);
  setPayloadData(getLoadBalancerCategory().create(getAlias(),getCluster(),getSubscriber(),getRepository(),getCartridgeInfo(),getSubscriptionKey(),getCustomPayloadEntries()));
}

Fixed version (ground truth):
public void createSubscription(Subscriber subscriber,String alias,String autoscalingPolicy,String deploymentPolicyName,Repository repository) throws ADCException, PolicyException, UnregisteredCartridgeException, InvalidCartridgeAliasException, DuplicateCartridgeAliasException, RepositoryRequiredException, AlreadySubscribedException, RepositoryCredentialsRequiredException, InvalidRepositoryException, RepositoryTransportException {
  setSubscriber(subscriber);
  setAlias(alias);
  setAutoscalingPolicyName(autoscalingPolicy);
  setDeploymentPolicyName(deploymentPolicyName);
  setRepository(repository);
  if (!loadBalancerCategory.isLoadBalancedServiceMultiTenant()) {
    setPayloadData(getLoadBalancerCategory().create(getAlias(),getCluster(),getSubscriber(),getRepository(),getCartridgeInfo(),getSubscriptionKey(),getCustomPayloadEntries()));
  }
}
Program: 116625
Project: 116625
Buggy source:
public void undeployCartridgeDefinition(String cartridgeType) throws InvalidCartridgeTypeException {
  Cartridge cartridge=null;
  if ((cartridge=dataHolder.getCartridge(cartridgeType)) != null) {
    if (dataHolder.getCartridges().remove(cartridge)) {
      persist();
      log.info("String_Node_Str" + cartridgeType);
    }
  }
  String msg="String_Node_Str" + cartridgeType + "String_Node_Str";
  log.error(msg);
  throw new InvalidCartridgeTypeException(msg);
}

Fixed version (ground truth):
public void undeployCartridgeDefinition(String cartridgeType) throws InvalidCartridgeTypeException {
  Cartridge cartridge=null;
  if ((cartridge=dataHolder.getCartridge(cartridgeType)) != null) {
    if (dataHolder.getCartridges().remove(cartridge)) {
      persist();
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + cartridgeType);
      }
      return;
    }
  }
  String msg="String_Node_Str" + cartridgeType + "String_Node_Str";
  log.error(msg);
  throw new InvalidCartridgeTypeException(msg);
}
Program: 116626
Project: 116626
Buggy source:
private Map<String,String> loadParametersFile(){
  Map<String,String> parameters=new HashMap<String,String>();
  try {
    File file=new File(System.getProperty(CartridgeAgentConstants.PARAM_FILE_PATH));
    if (!file.exists()) {
      log.warn(String.format("String_Node_Str",CartridgeAgentConstants.PARAM_FILE_PATH));
      return parameters;
    }
    Scanner scanner=new Scanner(file);
    while (scanner.hasNextLine()) {
      String line=scanner.nextLine();
      String[] params=line.split("String_Node_Str");
      for (      String string : params) {
        if (string != null) {
          String[] var=string.split("String_Node_Str");
          if (var.length > 2) {
            parameters.put(var[0],var[1]);
          }
        }
      }
    }
    scanner.close();
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    log.warn(message,e);
  }
  return parameters;
}

Fixed version (ground truth):
private Map<String,String> loadParametersFile(){
  Map<String,String> parameters=new HashMap<String,String>();
  try {
    File file=new File(System.getProperty(CartridgeAgentConstants.PARAM_FILE_PATH));
    if (!file.exists()) {
      log.warn(String.format("String_Node_Str",CartridgeAgentConstants.PARAM_FILE_PATH));
      return parameters;
    }
    Scanner scanner=new Scanner(file);
    while (scanner.hasNextLine()) {
      String line=scanner.nextLine();
      String[] params=line.split("String_Node_Str");
      for (      String string : params) {
        if (string != null) {
          String[] var=string.split("String_Node_Str");
          if (var.length >= 2) {
            parameters.put(var[0],var[1]);
          }
        }
      }
    }
    scanner.close();
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    log.warn(message,e);
  }
  return parameters;
}
Program: 116629
Project: 116629
Buggy source:
private void deployLBCluster(String loadBalancedService,LBDataContext lbDataCtxt,String tenantRange) throws ADCException, UnregisteredCartridgeException {
  if (lbDataCtxt.getLbCategory().equals(Constants.NO_LOAD_BALANCER)) {
    return;
  }
  LoadBalancerCategory loadBalancerCategory=null;
  if (lbDataCtxt.getLbCategory().equals(Constants.EXISTING_LOAD_BALANCERS)) {
    loadBalancerCategory=new ExistingLoadBalancerCategory();
  }
 else   if (lbDataCtxt.getLbCategory().equals(Constants.DEFAULT_LOAD_BALANCER)) {
    loadBalancerCategory=new DefaultLoadBalancerCategory();
  }
 else   if (lbDataCtxt.getLbCategory().equals(Constants.SERVICE_AWARE_LOAD_BALANCER)) {
    loadBalancerCategory=new ServiceLevelLoadBalancerCategory();
  }
  if (loadBalancerCategory == null) {
    throw new ADCException("String_Node_Str" + lbDataCtxt.getLbCategory() + "String_Node_Str");
  }
  loadBalancerCategory.setLoadBalancedServiceType(loadBalancedService);
  Service lbService=new MultiTenantLBService(lbDataCtxt.getLbCartridgeInfo().getType(),lbDataCtxt.getAutoscalePolicy(),lbDataCtxt.getDeploymentPolicy(),-1234,lbDataCtxt.getLbCartridgeInfo(),tenantRange,loadBalancerCategory);
  Properties lbProperties=null;
  if (lbDataCtxt.getLbProperperties() != null && !lbDataCtxt.getLbProperperties().isEmpty()) {
    lbProperties=new Properties();
    lbProperties.setProperties(lbDataCtxt.getLbProperperties().toArray(new Property[0]));
  }
  lbService.deploy(lbProperties);
  persist(lbService);
}

Fixed version (ground truth):
private void deployLBCluster(String loadBalancedService,LBDataContext lbDataCtxt,String tenantRange) throws ADCException, UnregisteredCartridgeException {
  if (lbDataCtxt.getLbCategory() == null || lbDataCtxt.getLbCategory().equals(Constants.NO_LOAD_BALANCER)) {
    return;
  }
  LoadBalancerCategory loadBalancerCategory=null;
  if (lbDataCtxt.getLbCategory().equals(Constants.EXISTING_LOAD_BALANCERS)) {
    loadBalancerCategory=new ExistingLoadBalancerCategory();
  }
 else   if (lbDataCtxt.getLbCategory().equals(Constants.DEFAULT_LOAD_BALANCER)) {
    loadBalancerCategory=new DefaultLoadBalancerCategory();
  }
 else   if (lbDataCtxt.getLbCategory().equals(Constants.SERVICE_AWARE_LOAD_BALANCER)) {
    loadBalancerCategory=new ServiceLevelLoadBalancerCategory();
  }
  if (loadBalancerCategory == null) {
    throw new ADCException("String_Node_Str" + lbDataCtxt.getLbCategory() + "String_Node_Str");
  }
  loadBalancerCategory.setLoadBalancedServiceType(loadBalancedService);
  Service lbService=new MultiTenantLBService(lbDataCtxt.getLbCartridgeInfo().getType(),lbDataCtxt.getAutoscalePolicy(),lbDataCtxt.getDeploymentPolicy(),-1234,lbDataCtxt.getLbCartridgeInfo(),tenantRange,loadBalancerCategory);
  Properties lbProperties=null;
  if (lbDataCtxt.getLbProperperties() != null && !lbDataCtxt.getLbProperperties().isEmpty()) {
    lbProperties=new Properties();
    lbProperties.setProperties(lbDataCtxt.getLbProperperties().toArray(new Property[0]));
  }
  lbService.deploy(lbProperties);
  persist(lbService);
}
Program: 116631
Project: 116631
Buggy source:
public static void putCurrentMemberIndex(String serviceName,String clusterId,int currentMemberIndex){
  String key=prepareKey(serviceName,clusterId);
  LoadBalancerCache.getInstance().putInteger(Constants.ALGORITHM_CONTEXT_CACHE,key,currentMemberIndex);
}

Fixed version (ground truth):
public static void putCurrentMemberIndex(String serviceName,String clusterId,int currentMemberIndex){
  String key=prepareKey(serviceName,clusterId);
  LoadBalancerCache.putInteger(Constants.ALGORITHM_CONTEXT_CACHE,key,currentMemberIndex);
}
Program: 116632
Project: 116632
Buggy source:
public static int getCurrentMemberIndex(String serviceName,String clusterId){
  String key=prepareKey(serviceName,clusterId);
  return LoadBalancerCache.getInstance().getInteger(Constants.ALGORITHM_CONTEXT_CACHE,key);
}

Fixed version (ground truth):
public static int getCurrentMemberIndex(String serviceName,String clusterId){
  String key=prepareKey(serviceName,clusterId);
  return LoadBalancerCache.getInteger(Constants.ALGORITHM_CONTEXT_CACHE,key);
}
Program: 116633
Project: 116633
Buggy source:
void putInteger(String cacheName,String propertyName,int value){
  try {
    startSuperTenantFlow();
    Cache<String,Integer> cache=cacheManager.getCache(cacheName);
    cache.put(propertyName,value);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
  }
  finally {
    endSuperTenantFlow();
  }
}

Fixed version (ground truth):
static void putInteger(String cacheName,String propertyName,int value){
  try {
    startSuperTenantFlow();
    Cache<String,Integer> cache=getCacheManager().getCache(cacheName);
    cache.put(propertyName,value);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
  }
  finally {
    endSuperTenantFlow();
  }
}
Program: 116634
Project: 116634
Buggy source:
void putString(String cacheName,String propertyName,String value){
  try {
    startSuperTenantFlow();
    Cache<String,String> cache=cacheManager.getCache(cacheName);
    cache.put(propertyName,value);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
  }
  finally {
    endSuperTenantFlow();
  }
}

Fixed version (ground truth):
static void putString(String cacheName,String propertyName,String value){
  try {
    startSuperTenantFlow();
    Cache<String,String> cache=getCacheManager().getCache(cacheName);
    cache.put(propertyName,value);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
  }
  finally {
    endSuperTenantFlow();
  }
}
Program: 116635
Project: 116635
Buggy source:
int getInteger(String cacheName,String propertyName){
  try {
    startSuperTenantFlow();
    Cache<String,Integer> cache=cacheManager.getCache(cacheName);
    int value=cache.get(propertyName);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
    return value;
  }
  finally {
    endSuperTenantFlow();
  }
}

Fixed version (ground truth):
static int getInteger(String cacheName,String propertyName){
  try {
    startSuperTenantFlow();
    Cache<String,Integer> cache=getCacheManager().getCache(cacheName);
    int value=cache.get(propertyName);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
    return value;
  }
  finally {
    endSuperTenantFlow();
  }
}
Program: 116636
Project: 116636
Buggy source:
String getString(String cacheName,String propertyName){
  try {
    startSuperTenantFlow();
    Cache<String,String> cache=cacheManager.getCache(cacheName);
    String value=cache.get(propertyName);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
    return value;
  }
  finally {
    endSuperTenantFlow();
  }
}

Fixed version (ground truth):
static String getString(String cacheName,String propertyName){
  try {
    startSuperTenantFlow();
    Cache<String,String> cache=getCacheManager().getCache(cacheName);
    String value=cache.get(propertyName);
    if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str",cacheName,propertyName,value));
    }
    return value;
  }
  finally {
    endSuperTenantFlow();
  }
}
Program: 116637
Project: 116637
Buggy source:
private void startSuperTenantFlow(){
  PrivilegedCarbonContext.startTenantFlow();
  PrivilegedCarbonContext ctx=PrivilegedCarbonContext.getThreadLocalCarbonContext();
  ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
  ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
}

Fixed version (ground truth):
private static void startSuperTenantFlow(){
  PrivilegedCarbonContext.startTenantFlow();
  PrivilegedCarbonContext ctx=PrivilegedCarbonContext.getThreadLocalCarbonContext();
  ctx.setTenantId(MultitenantConstants.SUPER_TENANT_ID);
  ctx.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
}
Program: 116638
Project: 116638
Buggy source:
private void endSuperTenantFlow(){
  PrivilegedCarbonContext.endTenantFlow();
}

Fixed version (ground truth):
private static void endSuperTenantFlow(){
  PrivilegedCarbonContext.endTenantFlow();
}
Program: 116639
Project: 116639
Buggy source:
public void terminateObsoleteInstance(String memberId){
}

Fixed version (ground truth):
public void terminateObsoleteInstance(String memberId){
  try {
    CloudControllerClient.getInstance().terminate(memberId);
  }
 catch (  Throwable e) {
    log.error("String_Node_Str",e);
  }
}
Program: 116641
Project: 116641
Buggy source:
@GET @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Cartridge getAvailableSingleTenantCartridgeInfo(@PathParam("String_Node_Str") String cartridgeType) throws RestAPIException {
  return ServiceUtils.getAvailableCartridgeInfo(cartridgeType,false,getConfigContext());
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") @Produces("String_Node_Str") @Consumes("String_Node_Str") @AuthorizationAction("String_Node_Str") public Cartridge getAvailableSingleTenantCartridgeInfo(@PathParam("String_Node_Str") String cartridgeType) throws RestAPIException {
  return ServiceUtils.getAvailableCartridgeInfo(cartridgeType,null,getConfigContext());
}
Program: 116642
Project: 116642
Buggy source:
@Override public void run(){
  Thread tenantReceiverThread=new Thread(tenantReceiver);
  tenantReceiverThread.start();
  while (!terminated)   ;
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  Thread tenantReceiverThread=new Thread(tenantReceiver);
  tenantReceiverThread.start();
  while (!terminated) {
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException ignore) {
    }
  }
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}
Program: 116643
Project: 116643
Buggy source:
@Override public void run(){
  Thread thread=new Thread(topologyReceiver);
  thread.start();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  while (!terminated)   ;
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  Thread thread=new Thread(topologyReceiver);
  thread.start();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  while (!terminated) {
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException ignore) {
    }
  }
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}
Program: 116644
Project: 116644
Buggy source:
@Override public IaasProvider validate(String partitionId,Properties properties) throws InvalidPartitionException {
  try {
    if (properties.containsKey(Scope.region.toString())) {
      String region=properties.getProperty(Scope.region.toString());
      if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
        String msg="String_Node_Str" + partitionId + "String_Node_Str"+ region;
        log.error(msg);
        throw new InvalidPartitionException(msg);
      }
      iaas.isValidRegion(region);
      IaasProvider updatedIaasProvider=new IaasProvider(iaasProvider);
      Iaas updatedIaas=CloudControllerUtil.getIaas(updatedIaasProvider);
      updatedIaas.setIaasProvider(updatedIaasProvider);
      if (properties.containsKey(Scope.zone.toString())) {
        String zone=properties.getProperty(Scope.zone.toString());
        iaas.isValidZone(region,zone);
        updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE,zone);
        updatedIaas.buildTemplate();
      }
      return updatedIaasProvider;
    }
 else {
      return iaasProvider;
    }
  }
 catch (  Exception ex) {
    String msg="String_Node_Str" + partitionId;
    log.error(msg,ex);
    throw new InvalidPartitionException(msg,ex);
  }
}

Fixed version (ground truth):
@Override public IaasProvider validate(String partitionId,Properties properties) throws InvalidPartitionException {
  try {
    if (properties.containsKey(Scope.region.toString())) {
      String region=properties.getProperty(Scope.region.toString());
      if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
        String msg="String_Node_Str" + partitionId + "String_Node_Str"+ region;
        log.error(msg);
        throw new InvalidPartitionException(msg);
      }
      iaas.isValidRegion(region);
      IaasProvider updatedIaasProvider=new IaasProvider(iaasProvider);
      Iaas updatedIaas=CloudControllerUtil.getIaas(updatedIaasProvider);
      updatedIaas.setIaasProvider(updatedIaasProvider);
      if (properties.containsKey(Scope.zone.toString())) {
        String zone=properties.getProperty(Scope.zone.toString());
        iaas.isValidZone(region,zone);
        updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE,zone);
        updatedIaas=CloudControllerUtil.getIaas(updatedIaasProvider);
        updatedIaas.setIaasProvider(updatedIaasProvider);
      }
      return updatedIaasProvider;
    }
 else {
      return iaasProvider;
    }
  }
 catch (  Exception ex) {
    String msg="String_Node_Str" + partitionId;
    log.error(msg,ex);
    throw new InvalidPartitionException(msg,ex);
  }
}
Program: 116645
Project: 116645
Buggy source:
@Override public IaasProvider validate(String partitionId,Properties properties) throws InvalidPartitionException {
  try {
    if (properties.containsKey(Scope.region.toString())) {
      String region=properties.getProperty(Scope.region.toString());
      if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
        String msg="String_Node_Str" + partitionId + "String_Node_Str"+ region;
        log.error(msg);
        throw new InvalidPartitionException(msg);
      }
      iaas.isValidRegion(region);
      IaasProvider updatedIaasProvider=new IaasProvider(iaasProvider);
      Iaas updatedIaas=CloudControllerUtil.getIaas(updatedIaasProvider);
      updatedIaas.setIaasProvider(updatedIaasProvider);
      if (properties.containsKey(Scope.zone.toString())) {
        String zone=properties.getProperty(Scope.zone.toString());
        iaas.isValidZone(region,zone);
        updatedIaasProvider.setProperty(CloudControllerConstants.ZONE_ELEMENT,zone);
        updatedIaas.buildTemplate();
      }
      return updatedIaasProvider;
    }
 else {
      return iaasProvider;
    }
  }
 catch (  Exception ex) {
    String msg="String_Node_Str" + partitionId;
    log.error(msg,ex);
    throw new InvalidPartitionException(msg,ex);
  }
}

Fixed version (ground truth):
@Override public IaasProvider validate(String partitionId,Properties properties) throws InvalidPartitionException {
  try {
    if (properties.containsKey(Scope.region.toString())) {
      String region=properties.getProperty(Scope.region.toString());
      if (iaasProvider.getImage() != null && !iaasProvider.getImage().contains(region)) {
        String msg="String_Node_Str" + partitionId + "String_Node_Str"+ region;
        log.error(msg);
        throw new InvalidPartitionException(msg);
      }
      iaas.isValidRegion(region);
      IaasProvider updatedIaasProvider=new IaasProvider(iaasProvider);
      Iaas updatedIaas=CloudControllerUtil.getIaas(updatedIaasProvider);
      updatedIaas.setIaasProvider(updatedIaasProvider);
      if (properties.containsKey(Scope.zone.toString())) {
        String zone=properties.getProperty(Scope.zone.toString());
        iaas.isValidZone(region,zone);
        updatedIaasProvider.setProperty(CloudControllerConstants.ZONE_ELEMENT,zone);
        updatedIaas=CloudControllerUtil.getIaas(updatedIaasProvider);
        updatedIaas.setIaasProvider(updatedIaasProvider);
      }
      return updatedIaasProvider;
    }
 else {
      return iaasProvider;
    }
  }
 catch (  Exception ex) {
    String msg="String_Node_Str" + partitionId;
    log.error(msg,ex);
    throw new InvalidPartitionException(msg,ex);
  }
}
Program: 116647
Project: 116647
Buggy source:
public void run(){
  ClusterContext ctxt=dataHolder.getClusterContext(clusterId_);
  if (ctxt == null) {
    String msg="String_Node_Str" + clusterId_;
    log.error(msg);
  }
  Collection<Member> members=TopologyManager.getTopology().getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
  long endTime=System.currentTimeMillis() + ctxt.getTimeoutInMillis() * members.size();
  while (members.size() > 0 && System.currentTimeMillis() < endTime) {
    CloudControllerUtil.sleep(1000);
  }
  if (members.size() > 0) {
    for (    Member member : members) {
      try {
        terminateInstance(member.getMemberId());
      }
 catch (      Exception e) {
        log.warn("String_Node_Str" + member.getMemberId(),e);
      }
    }
  }
  log.info("String_Node_Str" + clusterId_);
  deleteVolumes(ctxt);
  TopologyBuilder.handleClusterRemoved(ctxt);
  dataHolder.removeClusterContext(clusterId_);
  dataHolder.removeMemberContextsOfCluster(clusterId_);
  persist();
}

Fixed version (ground truth):
public void run(){
  ClusterContext ctxt=dataHolder.getClusterContext(clusterId_);
  if (ctxt == null) {
    String msg="String_Node_Str" + clusterId_;
    log.error(msg);
  }
  Collection<Member> members=TopologyManager.getTopology().getService(ctxt.getCartridgeType()).getCluster(clusterId_).getMembers();
  long endTime=System.currentTimeMillis() + ctxt.getTimeoutInMillis() * members.size();
  while (members.size() > 0) {
    CloudControllerUtil.sleep(1000);
  }
  log.info("String_Node_Str" + clusterId_);
  deleteVolumes(ctxt);
  TopologyBuilder.handleClusterRemoved(ctxt);
  dataHolder.removeClusterContext(clusterId_);
  dataHolder.removeMemberContextsOfCluster(clusterId_);
  persist();
}
Program: 116648
Project: 116648
Buggy source:
@Override public void run(){
  try {
    Thread.sleep(15000);
  }
 catch (  InterruptedException ignore) {
  }
  Thread thread=new Thread(healthStatReceiver);
  thread.start();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  while (!terminated)   ;
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    Thread.sleep(15000);
  }
 catch (  InterruptedException ignore) {
  }
  Thread thread=new Thread(healthStatReceiver);
  thread.start();
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  while (!terminated) {
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException ignore) {
    }
  }
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
}
Program: 116649
Project: 116649
Buggy source:
@Override public void run(){
  Thread thread=new Thread(stratosManagerTopologyReceiver);
  thread.start();
  log.info("String_Node_Str");
  while (!terminate) {
  }
  log.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public void run(){
  Thread thread=new Thread(stratosManagerTopologyReceiver);
  thread.start();
  log.info("String_Node_Str");
  while (!terminate) {
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException ignore) {
    }
  }
  log.info("String_Node_Str");
}
Program: 116652
Project: 116652
Buggy source:
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.HEALTH_STAT_TOPIC);
    topicSubscriber.setMessageListener(new HealthStatEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated)     ;
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.HEALTH_STAT_TOPIC);
    topicSubscriber.setMessageListener(new HealthStatEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}
Program: 116653
Project: 116653
Buggy source:
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.INSTANCE_NOTIFIER_TOPIC);
    topicSubscriber.setMessageListener(new InstanceNotifierEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated)     ;
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.INSTANCE_NOTIFIER_TOPIC);
    topicSubscriber.setMessageListener(new InstanceNotifierEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}
Program: 116654
Project: 116654
Buggy source:
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.TENANT_TOPIC);
    topicSubscriber.setMessageListener(new TenantEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated)     ;
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.TENANT_TOPIC);
    topicSubscriber.setMessageListener(new TenantEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}
Program: 116655
Project: 116655
Buggy source:
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.TOPOLOGY_TOPIC);
    topicSubscriber.setMessageListener(new TopologyEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated)     ;
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    topicSubscriber=new TopicSubscriber(Constants.TOPOLOGY_TOPIC);
    topicSubscriber.setMessageListener(new TopologyEventMessageListener());
    Thread subscriberThread=new Thread(topicSubscriber);
    subscriberThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    Thread receiverThread=new Thread(messageDelegator);
    receiverThread.start();
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    while (!terminated) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}
Program: 116656
Project: 116656
Buggy source:
@Override public void run(){
  try {
    while (true) {
      threadBarrier.pass();
      Iterator it=timeStampMap.entrySet().iterator();
      while (it.hasNext()) {
        Map.Entry pair=(Map.Entry)it.next();
        long currentTime=System.currentTimeMillis();
        InEvent event=(InEvent)pair.getValue();
        if ((currentTime - event.getTimeStamp()) / MILI_TO_MINUTE > TIME_OUT) {
          log.info("String_Node_Str" + pair.getKey() + "String_Node_Str"+ "String_Node_Str"+ TIME_OUT+ "String_Node_Str");
          it.remove();
          log.debug("String_Node_Str" + pair.getKey() + "String_Node_Str"+ "String_Node_Str"+ TIME_OUT+ "String_Node_Str");
          nextProcessor.process(event);
        }
      }
    }
  }
 catch (  Throwable t) {
    log.error(t.getMessage(),t);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    while (true) {
      threadBarrier.pass();
      Iterator it=timeStampMap.entrySet().iterator();
      while (it.hasNext()) {
        Map.Entry pair=(Map.Entry)it.next();
        long currentTime=System.currentTimeMillis();
        InEvent event=(InEvent)pair.getValue();
        if ((currentTime - event.getTimeStamp()) / MILI_TO_MINUTE > TIME_OUT) {
          log.info("String_Node_Str" + pair.getKey() + "String_Node_Str"+ "String_Node_Str"+ TIME_OUT+ "String_Node_Str");
          it.remove();
          log.debug("String_Node_Str" + pair.getKey() + "String_Node_Str"+ "String_Node_Str"+ TIME_OUT+ "String_Node_Str");
          nextProcessor.process(event);
        }
      }
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
 catch (  Throwable t) {
    log.error(t.getMessage(),t);
  }
}
Program: 116660
Project: 116660
Buggy source:
@Override protected void onEvent(Event event){
  log.info("String_Node_Str" + event.getClass() + "String_Node_Str");
  MemberTerminatedEvent memberTerminatedEvent=(MemberTerminatedEvent)event;
  String clusterDomain=memberTerminatedEvent.getClusterId();
  Set<CartridgeSubscription> cartridgeSubscriptions=getCartridgeSubscription(clusterDomain);
  if (cartridgeSubscriptions != null) {
    Cluster cluster;
    TopologyManager.acquireReadLock();
    try {
      for (      CartridgeSubscription cartridgeSubscription : cartridgeSubscriptions) {
        cluster=TopologyManager.getTopology().getService(cartridgeSubscription.getType()).getCluster(cartridgeSubscription.getClusterDomain());
        Member terminatedMember=cluster.getMember(memberTerminatedEvent.getMemberId());
        cluster.removeMember(terminatedMember);
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + memberTerminatedEvent.getMemberId() + "String_Node_Str");
        }
        TopologyClusterInformationModel.getInstance().addCluster(cartridgeSubscription.getSubscriber().getTenantId(),cartridgeSubscription.getType(),cartridgeSubscription.getAlias(),cluster);
      }
    }
  finally {
      TopologyManager.releaseReadLock();
    }
  }
}

Fixed version (ground truth):
@Override protected void onEvent(Event event){
  log.info("String_Node_Str" + event.getClass() + "String_Node_Str");
  MemberTerminatedEvent memberTerminatedEvent=(MemberTerminatedEvent)event;
  String clusterDomain=memberTerminatedEvent.getClusterId();
  Set<CartridgeSubscription> cartridgeSubscriptions=getCartridgeSubscription(clusterDomain);
  if (cartridgeSubscriptions != null) {
    Cluster cluster;
    TopologyManager.acquireReadLock();
    try {
      for (      CartridgeSubscription cartridgeSubscription : cartridgeSubscriptions) {
        cluster=TopologyManager.getTopology().getService(cartridgeSubscription.getType()).getCluster(cartridgeSubscription.getClusterDomain());
        if (cluster.memberExists(memberTerminatedEvent.getMemberId())) {
          Member terminatedMember=cluster.getMember(memberTerminatedEvent.getMemberId());
          cluster.removeMember(terminatedMember);
          if (log.isDebugEnabled()) {
            log.debug("String_Node_Str" + memberTerminatedEvent.getMemberId() + "String_Node_Str");
          }
        }
        TopologyClusterInformationModel.getInstance().addCluster(cartridgeSubscription.getSubscriber().getTenantId(),cartridgeSubscription.getType(),cartridgeSubscription.getAlias(),cluster);
      }
    }
  finally {
      TopologyManager.releaseReadLock();
    }
  }
}
Program: 116661
Project: 116661
Buggy source:
private void printLBs(String resultString){
  Cluster cluster=getClusterObjectFromString(resultString);
  if (cluster == null) {
    System.out.println("String_Node_Str");
    return;
  }
  Member[] members=new Member[cluster.getMember().size()];
  members=cluster.getMember().toArray(members);
  if (members.length == 0) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
    System.out.println("String_Node_Str");
    return;
  }
  RowMapper<Member> memberMapper=new RowMapper<Member>(){
    public String[] getData(    Member member){
      String[] data=new String[8];
      data[0]=member.getServiceName();
      data[1]=member.getClusterId();
      data[2]=member.getNetworkPartitionId();
      data[3]=member.getPartitionId();
      data[4]=member.getMemberIp();
      data[5]=member.getStatus().toString();
      data[6]=member.getLbClusterId() != null ? member.getLbClusterId() : "String_Node_Str";
      data[7]=member.getMemberPublicIp().toString();
      return data;
    }
  }
;
  List<String> headers=new ArrayList<String>();
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  headers.add("String_Node_Str");
  CommandLineUtils.printTable(members,memberMapper,headers.toArray(new String[headers.size()]));
}

Fixed version (ground truth):
private void printLBs(String resultString){
  Cluster cluster=getClusterObjectFromString(resultString);
  if (cluster == null) {
    System.out.println("String_Node_Str");
    return;
  }
  Member[] members=new Member[cluster.getMember().size()];
  members=cluster.getMember().toArray(members);
  if (members.length == 0) {
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str");
    }
    System.out.println("String_Node_Str");
    return;
  }
  for (  Member member : members) {
    System.out.println("String_Node_Str" + member.getServiceName());
    System.out.println("String_Node_Str" + member.getClusterId());
    System.out.println("String_Node_Str" + member.getNetworkPartitionId());
    System.out.println("String_Node_Str" + member.getPartitionId());
    System.out.println("String_Node_Str" + member.getStatus());
    if (member.getLbClusterId() != null) {
      System.out.println("String_Node_Str" + member.getLbClusterId());
    }
    System.out.println("String_Node_Str" + member.getMemberIp());
    System.out.println("String_Node_Str" + member.getMemberPublicIp());
    System.out.println("String_Node_Str");
  }
}
Program: 116663
Project: 116663
Buggy source:
private Map<String,Set<String>> getLbIpList(Cartridge cartridge,DefaultHttpClient httpClient){
  Map<String,Set<String>> privateFloatingLBIPMap=new HashMap<String,Set<String>>();
  Set<String> lbFloatingIpSet=new HashSet<String>();
  Set<String> lbPrivateIpSet=new HashSet<String>();
  Member[] members=getMembers(cartridge.getCartridgeType(),cartridge.getCartridgeAlias(),httpClient);
  Set<String> lbClusterIdSet=new HashSet<String>();
  for (  Member member : members) {
    lbClusterIdSet.add(member.getLbClusterId());
  }
  for (  String clusterId : lbClusterIdSet) {
    HttpResponse responseCluster=restClientService.doGet(httpClient,restClientService.getUrl() + listClusterRestEndpoint + "String_Node_Str"+ clusterId,restClientService.getUsername(),restClientService.getPassword());
    String resultStringCluster=getHttpResponseString(responseCluster);
    Cluster cluster=getClusterObjectFromString(resultStringCluster);
    if (cluster == null) {
      System.out.println("String_Node_Str");
      return null;
    }
    Member[] lbMembers=new Member[cluster.getMember().size()];
    lbMembers=cluster.getMember().toArray(lbMembers);
    for (    Member lbMember : lbMembers) {
      lbPrivateIpSet.add(lbMember.getMemberIp());
      lbFloatingIpSet.add(lbMember.getMemberPublicIp());
    }
  }
  privateFloatingLBIPMap.put("String_Node_Str",lbPrivateIpSet);
  privateFloatingLBIPMap.put("String_Node_Str",lbFloatingIpSet);
  return privateFloatingLBIPMap;
}

Fixed version (ground truth):
private Map<String,Set<String>> getLbIpList(Cartridge cartridge,DefaultHttpClient httpClient){
  Map<String,Set<String>> privateFloatingLBIPMap=new HashMap<String,Set<String>>();
  Set<String> lbFloatingIpSet=new HashSet<String>();
  Set<String> lbPrivateIpSet=new HashSet<String>();
  Member[] members=getMembers(cartridge.getCartridgeType(),cartridge.getCartridgeAlias(),httpClient);
  Set<String> lbClusterIdSet=new HashSet<String>();
  for (  Member member : members) {
    lbClusterIdSet.add(member.getLbClusterId());
    cartridge.setIp(member.getMemberIp());
    cartridge.setPublicIp(member.getMemberPublicIp());
  }
  for (  String clusterId : lbClusterIdSet) {
    HttpResponse responseCluster=restClientService.doGet(httpClient,restClientService.getUrl() + listClusterRestEndpoint + "String_Node_Str"+ clusterId,restClientService.getUsername(),restClientService.getPassword());
    String resultStringCluster=getHttpResponseString(responseCluster);
    Cluster cluster=getClusterObjectFromString(resultStringCluster);
    if (cluster == null) {
      System.out.println("String_Node_Str");
      return null;
    }
    Member[] lbMembers=new Member[cluster.getMember().size()];
    lbMembers=cluster.getMember().toArray(lbMembers);
    for (    Member lbMember : lbMembers) {
      lbPrivateIpSet.add(lbMember.getMemberIp());
      lbFloatingIpSet.add(lbMember.getMemberPublicIp());
    }
  }
  privateFloatingLBIPMap.put("String_Node_Str",lbPrivateIpSet);
  privateFloatingLBIPMap.put("String_Node_Str",lbFloatingIpSet);
  return privateFloatingLBIPMap;
}
Program: 116665
Project: 116665
Buggy source:
public static void handleMemberSpawned(String memberId,String serviceName,String clusterId,String networkPartitionId,String partitionId,String privateIp,String lbClusterId,String publicIp){
  Topology topology=TopologyManager.getTopology();
  Service service=topology.getService(serviceName);
  Cluster cluster=service.getCluster(clusterId);
  if (cluster.memberExists(memberId)) {
    throw new RuntimeException(String.format("String_Node_Str",memberId));
  }
  try {
    TopologyManager.acquireWriteLock();
    Member member=new Member(serviceName,clusterId,networkPartitionId,partitionId,memberId);
    member.setStatus(MemberStatus.Created);
    member.setMemberIp(privateIp);
    member.setLbClusterId(lbClusterId);
    member.setMemberPublicIp(publicIp);
    cluster.addMember(member);
    TopologyManager.updateTopology(topology);
  }
  finally {
    TopologyManager.releaseWriteLock();
  }
  TopologyEventPublisher.sendInstanceSpawnedEvent(serviceName,clusterId,networkPartitionId,partitionId,memberId,lbClusterId);
}

Fixed version (ground truth):
public static void handleMemberSpawned(String memberId,String serviceName,String clusterId,String networkPartitionId,String partitionId,String privateIp,String lbClusterId,String publicIp){
  Topology topology=TopologyManager.getTopology();
  Service service=topology.getService(serviceName);
  Cluster cluster=service.getCluster(clusterId);
  if (cluster.memberExists(memberId)) {
    throw new RuntimeException(String.format("String_Node_Str",memberId));
  }
  try {
    TopologyManager.acquireWriteLock();
    Member member=new Member(serviceName,clusterId,networkPartitionId,partitionId,memberId);
    member.setStatus(MemberStatus.Created);
    member.setMemberIp(privateIp);
    member.setLbClusterId(lbClusterId);
    member.setMemberPublicIp(publicIp);
    cluster.addMember(member);
    TopologyManager.updateTopology(topology);
  }
  finally {
    TopologyManager.releaseWriteLock();
  }
  TopologyEventPublisher.sendInstanceSpawnedEvent(serviceName,clusterId,networkPartitionId,partitionId,memberId,lbClusterId,publicIp,privateIp);
}
Program: 116666
Project: 116666
Buggy source:
public static void sendInstanceSpawnedEvent(String serviceName,String clusterId,String networkPartitionId,String partitionId,String memberId,String lbClusterId){
  InstanceSpawnedEvent instanceSpawnedEvent=new InstanceSpawnedEvent(serviceName,clusterId,networkPartitionId,partitionId,memberId);
  instanceSpawnedEvent.setLbClusterId(lbClusterId);
  if (log.isInfoEnabled()) {
    log.info(String.format("String_Node_Str",serviceName,clusterId,networkPartitionId,partitionId,memberId,lbClusterId));
  }
  publishEvent(instanceSpawnedEvent);
}

Fixed version (ground truth):
public static void sendInstanceSpawnedEvent(String serviceName,String clusterId,String networkPartitionId,String partitionId,String memberId,String lbClusterId,String publicIp,String privateIp){
  InstanceSpawnedEvent instanceSpawnedEvent=new InstanceSpawnedEvent(serviceName,clusterId,networkPartitionId,partitionId,memberId);
  instanceSpawnedEvent.setLbClusterId(lbClusterId);
  instanceSpawnedEvent.setMemberIp(privateIp);
  instanceSpawnedEvent.setMemberPublicIp(publicIp);
  if (log.isInfoEnabled()) {
    log.info(String.format("String_Node_Str",serviceName,clusterId,networkPartitionId,partitionId,memberId,lbClusterId));
  }
  publishEvent(instanceSpawnedEvent);
}
Program: 116669
Project: 116669
Buggy source:
@POST @Path("String_Node_Str") public void initialize() throws RestAPIException {
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @AuthorizationAction("String_Node_Str") public void initialize() throws RestAPIException {
}