nus-yam/ex-repair huggingface dataset:
Program: 14979
Project: 14979
Buggy source:
public CancelBundleTaskResponseType cancelBundleTask(final CancelBundleTaskType request) throws EucalyptusCloudException {
  final CancelBundleTaskResponseType reply=request.getReply();
  reply.set_return(true);
  final Context ctx=Contexts.lookup();
  try {
    final VmInstance v=VmInstances.lookupByBundleId(request.getBundleId());
    if (RestrictedTypes.checkPrivilege(request,PolicySpec.VENDOR_EC2,PolicySpec.EC2_RESOURCE_INSTANCE,v.getInstanceId(),v.getOwner())) {
      v.getBundleTask().setState("String_Node_Str");
      LOG.info(EventRecord.here(BundleCallback.class,EventType.BUNDLE_CANCELING,ctx.getUserFullName().toString(),v.getBundleTask().getBundleId(),v.getInstanceId()));
      final Cluster cluster=Clusters.getInstance().lookup(v.getClusterName());
      request.setInstanceId(v.getInstanceId());
      reply.setTask(v.getBundleTask());
      AsyncRequests.newRequest(new CancelBundleCallback(request)).dispatch(cluster.getConfiguration());
      return reply;
    }
 else {
      throw new EucalyptusCloudException("String_Node_Str" + request.getBundleId());
    }
  }
 catch (  final NoSuchElementException e) {
    throw new EucalyptusCloudException("String_Node_Str" + request.getBundleId());
  }
}

Fixed version (ground truth):
public CancelBundleTaskResponseType cancelBundleTask(final CancelBundleTaskType request) throws EucalyptusCloudException {
  final CancelBundleTaskResponseType reply=request.getReply();
  reply.set_return(true);
  final Context ctx=Contexts.lookup();
  try {
    final VmInstance v=VmInstances.lookupByBundleId(request.getBundleId());
    if (RestrictedTypes.checkPrivilege(request,PolicySpec.VENDOR_EC2,PolicySpec.EC2_RESOURCE_INSTANCE,v.getInstanceId(),v.getOwner())) {
      v.getBundleTask().setState("String_Node_Str");
      LOG.info(EventRecord.here(BundleCallback.class,EventType.BUNDLE_CANCELING,ctx.getUserFullName().toString(),v.getBundleTask().getBundleId(),v.getInstanceId()));
      final Cluster cluster=Clusters.getInstance().lookup(v.getPartition());
      request.setInstanceId(v.getInstanceId());
      reply.setTask(v.getBundleTask());
      AsyncRequests.newRequest(new CancelBundleCallback(request)).dispatch(cluster.getConfiguration());
      return reply;
    }
 else {
      throw new EucalyptusCloudException("String_Node_Str" + request.getBundleId());
    }
  }
 catch (  final NoSuchElementException e) {
    throw new EucalyptusCloudException("String_Node_Str" + request.getBundleId());
  }
}
Program: 14981
Project: 14981
Buggy source:
@Override public void fire(VmDescribeResponseType reply){
  for (  final VmInfo runVm : reply.getVms()) {
    runVm.setPlacement(this.getSubject().getConfiguration().getName());
    VmState state=VmState.Mapper.get(runVm.getStateName());
    try {
      final VmInstance vm=VmInstances.lookup(runVm.getInstanceId());
      vm.setServiceTag(runVm.getServiceTag());
      if (VmState.SHUTTING_DOWN.equals(vm.getRuntimeState()) && vm.getSplitTime() > VmInstances.SHUT_DOWN_TIME) {
        vm.setState(VmState.TERMINATED,Reason.EXPIRED);
      }
 else       if (VmState.SHUTTING_DOWN.equals(vm.getRuntimeState()) && VmState.SHUTTING_DOWN.equals(state)) {
        vm.setState(VmState.TERMINATED,Reason.APPEND,"String_Node_Str");
      }
 else       if ((VmState.PENDING.equals(state) || VmState.RUNNING.equals(state)) && (VmState.PENDING.equals(vm.getRuntimeState()) || VmState.RUNNING.equals(vm.getRuntimeState()))) {
        if (!VmInstance.DEFAULT_IP.equals(runVm.getNetParams().getIpAddress())) {
          vm.updateAddresses(runVm.getNetParams().getIpAddress(),runVm.getNetParams().getIgnoredPublicIp());
        }
        vm.setState(VmState.Mapper.get(runVm.getStateName()),Reason.APPEND,"String_Node_Str");
        vm.updateNetworkIndex(runVm.getNetParams().getNetworkIndex());
        vm.updateVolumeAttachments(runVm.getVolumes());
      }
    }
 catch (    NoSuchElementException e) {
      LOG.debug("String_Node_Str" + runVm.getInstanceId());
    }
  }
}

Fixed version (ground truth):
@Override public void fire(VmDescribeResponseType reply){
  for (  final VmInfo runVm : reply.getVms()) {
    runVm.setPlacement(this.getSubject().getConfiguration().getName());
    VmState state=VmState.Mapper.get(runVm.getStateName());
    try {
      final VmInstance vm=VmInstances.lookup(runVm.getInstanceId());
      vm.setServiceTag(runVm.getServiceTag());
      if (VmState.SHUTTING_DOWN.equals(vm.getRuntimeState()) && vm.getSplitTime() > VmInstances.SHUT_DOWN_TIME) {
        vm.setState(VmState.TERMINATED,Reason.EXPIRED);
      }
 else       if (VmState.SHUTTING_DOWN.equals(vm.getRuntimeState()) && VmState.SHUTTING_DOWN.equals(state)) {
        vm.setState(VmState.TERMINATED,Reason.APPEND,"String_Node_Str");
      }
 else       if ((VmState.PENDING.equals(state) || VmState.RUNNING.equals(state)) && (VmState.PENDING.equals(vm.getRuntimeState()) || VmState.RUNNING.equals(vm.getRuntimeState()))) {
        if (!VmInstance.DEFAULT_IP.equals(runVm.getNetParams().getIpAddress())) {
          vm.updateAddresses(runVm.getNetParams().getIpAddress(),runVm.getNetParams().getIgnoredPublicIp());
        }
        vm.setState(VmState.Mapper.get(runVm.getStateName()),Reason.APPEND,"String_Node_Str");
        vm.updateVolumeAttachments(runVm.getVolumes());
      }
    }
 catch (    NoSuchElementException e) {
      LOG.debug("String_Node_Str" + runVm.getInstanceId());
    }
  }
}
Program: 14982
Project: 14982
Buggy source:
@Override public String toString(){
  return String.format(this.message.toString(),this.args);
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append(this.instanceId).append("String_Node_Str");
  if (this.runtimeState != null)   builder.append("String_Node_Str").append(this.runtimeState.getReference()).append("String_Node_Str");
  if (this.clusterName != null)   builder.append("String_Node_Str").append(this.clusterName).append("String_Node_Str");
  if (this.partitionName != null)   builder.append("String_Node_Str").append(this.partitionName).append("String_Node_Str");
  if (this.imageId != null)   builder.append("String_Node_Str").append(this.imageId).append("String_Node_Str");
  if (this.kernelId != null)   builder.append("String_Node_Str").append(this.kernelId).append("String_Node_Str");
  if (this.ramdiskId != null)   builder.append("String_Node_Str").append(this.ramdiskId).append("String_Node_Str");
  if (this.vmType != null)   builder.append("String_Node_Str").append(this.vmType).append("String_Node_Str");
  if (this.platform != null)   builder.append("String_Node_Str").append(this.platform).append("String_Node_Str");
  if (this.networkGroups != null)   builder.append("String_Node_Str").append(this.networkGroups).append("String_Node_Str");
  if (this.networkIndex != null)   builder.append("String_Node_Str").append(this.networkIndex).append("String_Node_Str");
  if (this.transientVolumes != null)   builder.append("String_Node_Str").append(this.transientVolumes).append("String_Node_Str");
  if (this.persistentVolumes != null)   builder.append("String_Node_Str").append(this.persistentVolumes);
  if (this.bundleTask != null)   builder.append("String_Node_Str").append(this.bundleTask).append("String_Node_Str");
  if (this.networkConfig != null)   builder.append("String_Node_Str").append(this.networkConfig).append("String_Node_Str");
  if (this.launchTime != null)   builder.append("String_Node_Str").append(this.launchTime).append("String_Node_Str");
  if (this.sshKeyPair != null)   builder.append("String_Node_Str").append(this.sshKeyPair).append("String_Node_Str");
  return builder.toString();
}
Program: 14983
Project: 14983
Buggy source:
private VmInstance makeVmInstance(ResourceToken token) throws TransactionException, ResourceAllocationException {
  EntityTransaction db=Entities.get(VmInstance.class);
  try {
    Allocation allocInfo=token.getAllocationInfo();
    VmInstance vmInst=new VmInstance(allocInfo.getOwnerFullName(),token.getInstanceId(),token.getInstanceUuid(),allocInfo.getReservationId(),token.getLaunchIndex(),allocInfo.getRequest().getAvailabilityZone(),allocInfo.getUserData(),allocInfo.getBootSet(),allocInfo.getSshKeyPair(),allocInfo.getVmType(),allocInfo.getNetworkGroups(),token.getNetworkIndex());
    vmInst=Entities.persist(vmInst);
    token.setVmInstance(vmInst);
    db.commit();
    return vmInst;
  }
 catch (  ResourceAllocationException ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw new TransactionExecutionException(ex);
  }
}

Fixed version (ground truth):
private VmInstance makeVmInstance(ResourceToken token) throws TransactionException, ResourceAllocationException {
  EntityTransaction db=Entities.get(VmInstance.class);
  try {
    Allocation allocInfo=token.getAllocationInfo();
    VmInstance vmInst=new VmInstance(allocInfo.getOwnerFullName(),token.getInstanceId(),token.getInstanceUuid(),allocInfo.getReservationId(),token.getLaunchIndex(),allocInfo.getRequest().getAvailabilityZone(),allocInfo.getUserData(),allocInfo.getBootSet(),allocInfo.getSshKeyPair(),allocInfo.getVmType(),allocInfo.getNetworkGroups(),token.getNetworkIndex());
    vmInst=Entities.persist(vmInst);
    token.getNetworkIndex().set(vmInst);
    token.setVmInstance(vmInst);
    db.commit();
    return vmInst;
  }
 catch (  ResourceAllocationException ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw new TransactionExecutionException(ex);
  }
}
Program: 14984
Project: 14984
Buggy source:
public ExtantNetwork getExtantNetwork(){
  EntityTransaction db=Entities.get(ExtantNetwork.class);
  try {
    ExtantNetwork ex=this.primaryNetwork.extantNetwork();
    db.commit();
    return ex;
  }
 catch (  TransientEntityException ex) {
    LOG.error(ex,ex);
    db.rollback();
    throw new RuntimeException(ex);
  }
catch (  NotEnoughResourcesException ex) {
    db.rollback();
    return ExtantNetwork.bogus(this.getPrimaryNetwork());
  }
}

Fixed version (ground truth):
public ExtantNetwork getExtantNetwork(){
  EntityTransaction db=Entities.get(ExtantNetwork.class);
  try {
    NetworkGroup net=Entities.merge(this.primaryNetwork);
    ExtantNetwork ex=net.extantNetwork();
    db.commit();
    return ex;
  }
 catch (  TransientEntityException ex) {
    LOG.error(ex,ex);
    db.rollback();
    throw new RuntimeException(ex);
  }
catch (  NotEnoughResourcesException ex) {
    db.rollback();
    return ExtantNetwork.bogus(this.getPrimaryNetwork());
  }
}
Program: 14985
Project: 14985
Buggy source:
public ExtantNetwork getExtantNetwork(){
  try {
    return this.primaryNetwork.extantNetwork();
  }
 catch (  TransientEntityException ex) {
    LOG.error(ex,ex);
    throw new RuntimeException(ex);
  }
catch (  NotEnoughResourcesException ex) {
    return ExtantNetwork.bogus(this.getPrimaryNetwork());
  }
}

Fixed version (ground truth):
public ExtantNetwork getExtantNetwork(){
  EntityTransaction db=Entities.get(ExtantNetwork.class);
  try {
    ExtantNetwork ex=this.primaryNetwork.extantNetwork();
    db.commit();
    return ex;
  }
 catch (  TransientEntityException ex) {
    LOG.error(ex,ex);
    db.rollback();
    throw new RuntimeException(ex);
  }
catch (  NotEnoughResourcesException ex) {
    db.rollback();
    return ExtantNetwork.bogus(this.getPrimaryNetwork());
  }
}
Program: 14986
Project: 14986
Buggy source:
private ClusterAllocator(final Allocation allocInfo){
  this.allocInfo=allocInfo;
  try {
    this.cluster=Clusters.lookup(allocInfo.getPartition());
    this.messages=new StatefulMessageSet<State>(this.cluster,State.values());
    this.setupVolumeMessages();
    this.setupNetworkMessages();
    for (    final ResourceToken token : allocInfo.getAllocationTokens()) {
      this.setupVmMessages(token);
    }
  }
 catch (  final Exception e) {
    LOG.debug(e,e);
    this.allocInfo.abort();
    for (    final ResourceToken token : allocInfo.getAllocationTokens()) {
      try {
        final VmInstance vm=VmInstances.lookup(token.getInstanceId());
        vm.setState(VmState.TERMINATED,Reason.FAILED,e.getMessage());
        VmInstances.disable(vm);
      }
 catch (      final Exception e1) {
        LOG.debug(e1,e1);
      }
    }
  }
}

Fixed version (ground truth):
private ClusterAllocator(final Allocation allocInfo){
  this.allocInfo=allocInfo;
  EntityTransaction db=Entities.get(VmInstance.class);
  try {
    this.cluster=Clusters.lookup(allocInfo.getPartition());
    this.messages=new StatefulMessageSet<State>(this.cluster,State.values());
    this.setupVolumeMessages();
    this.setupNetworkMessages();
    for (    final ResourceToken token : allocInfo.getAllocationTokens()) {
      this.setupVmMessages(token);
    }
    db.commit();
  }
 catch (  final Exception e) {
    db.rollback();
    LOG.debug(e,e);
    this.allocInfo.abort();
    for (    final ResourceToken token : allocInfo.getAllocationTokens()) {
      try {
        final VmInstance vm=VmInstances.lookup(token.getInstanceId());
        vm.setState(VmState.TERMINATED,Reason.FAILED,e.getMessage());
        VmInstances.disable(vm);
      }
 catch (      final Exception e1) {
        LOG.debug(e1,e1);
      }
    }
  }
}
Program: 14987
Project: 14987
Buggy source:
private VmInstance makeVmInstance(ResourceToken token) throws TransactionException, ResourceAllocationException {
  EntityTransaction db=Entities.get(VmInstance.class);
  try {
    Allocation allocInfo=token.getAllocationInfo();
    VmInstance vmInst=new VmInstance(allocInfo.getOwnerFullName(),token.getInstanceId(),token.getInstanceUuid(),allocInfo.getReservationId(),token.getLaunchIndex(),allocInfo.getRequest().getAvailabilityZone(),allocInfo.getUserData(),allocInfo.getBootSet(),allocInfo.getSshKeyPair(),allocInfo.getVmType(),allocInfo.getNetworkGroups(),token.getNetworkIndex());
    vmInst=Entities.persist(vmInst);
    token.getNetworkIndex().set(vmInst);
    token.setVmInstance(vmInst);
    db.commit();
    return vmInst;
  }
 catch (  ResourceAllocationException ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw new TransactionExecutionException(ex);
  }
}

Fixed version (ground truth):
private VmInstance makeVmInstance(ResourceToken token) throws TransactionException, ResourceAllocationException {
  EntityTransaction db=Entities.get(VmInstance.class);
  try {
    Allocation allocInfo=token.getAllocationInfo();
    VmInstance vmInst=new VmInstance(allocInfo.getOwnerFullName(),token.getInstanceId(),token.getInstanceUuid(),allocInfo.getReservationId(),token.getLaunchIndex(),allocInfo.getRequest().getAvailabilityZone(),allocInfo.getUserData(),allocInfo.getBootSet(),allocInfo.getSshKeyPair(),allocInfo.getVmType(),allocInfo.getNetworkGroups(),token.getNetworkIndex());
    token.getNetworkIndex().set(vmInst);
    token.setVmInstance(vmInst);
    db.commit();
    return vmInst;
  }
 catch (  ResourceAllocationException ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    Logs.extreme().error(ex,ex);
    throw new TransactionExecutionException(ex);
  }
}
Program: 14988
Project: 14988
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public <T>List<T> query(final T example){
  final Example qbe=Example.create(example).enableLike(MatchMode.EXACT);
  final List<T> resultList=this.getSession().createCriteria(example.getClass()).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY).setCacheable(true).add(qbe).list();
  return Lists.newArrayList(Sets.newHashSet(resultList));
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public <T>List<T> query(final T example){
  final Example qbe=Example.create(example).enableLike(MatchMode.EXACT);
  final List<T> resultList=this.getSession().createCriteria(example.getClass()).setLockMode(LockMode.NONE).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY).setCacheable(true).add(qbe).list();
  return Lists.newArrayList(Sets.newHashSet(resultList));
}
Program: 14990
Project: 14990
Buggy source:
public SetReference<PrivateNetworkIndex,VmInstance> allocateNetworkIndex() throws TransactionException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return PrivateNetworkIndex.bogus().allocate();
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    EntityTransaction db=Entities.get(ExtantNetwork.class);
    SetReference<PrivateNetworkIndex,VmInstance> ref=null;
    try {
      PrivateNetworkIndex netIdx=null;
      for (      Long i : Numbers.shuffled(NetworkGroups.networkIndexInterval())) {
        try {
          Entities.uniqueResult(PrivateNetworkIndex.create(this,i));
          continue;
        }
 catch (        Exception ex) {
          try {
            netIdx=PrivateNetworkIndex.create(this,i);
            this.getIndexes().add(netIdx);
            break;
          }
 catch (          Exception ex1) {
            continue;
          }
        }
      }
      if (netIdx != null) {
        return netIdx.allocate();
      }
 else {
        throw new TransactionExecutionException("String_Node_Str" + this.displayName);
      }
    }
 catch (    TransactionException ex) {
      throw ex;
    }
catch (    Exception ex) {
      throw new TransactionExecutionException("String_Node_Str" + this.displayName,ex);
    }
  }
}

Fixed version (ground truth):
public SetReference<PrivateNetworkIndex,VmInstance> allocateNetworkIndex() throws TransactionException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    try {
      return PrivateNetworkIndex.bogus().allocate();
    }
 catch (    ResourceAllocationException ex) {
      throw new RuntimeException("String_Node_Str");
    }
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    SetReference<PrivateNetworkIndex,VmInstance> ref=null;
    try {
      PrivateNetworkIndex netIdx=null;
      for (      Long i : Numbers.shuffled(NetworkGroups.networkIndexInterval())) {
        try {
          Entities.uniqueResult(PrivateNetworkIndex.named(this,i));
          continue;
        }
 catch (        Exception ex) {
          try {
            netIdx=PrivateNetworkIndex.create(this,i);
            Entities.persist(netIdx);
            this.getIndexes().add(netIdx);
            return netIdx.allocate();
          }
 catch (          Exception ex1) {
            continue;
          }
        }
      }
      throw new TransactionExecutionException("String_Node_Str" + this.displayName);
    }
 catch (    TransactionException ex) {
      throw ex;
    }
catch (    Exception ex) {
      throw new TransactionExecutionException("String_Node_Str" + this.displayName,ex);
    }
  }
}
Program: 14991
Project: 14991
Buggy source:
@Override public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  if (this.networkGroup != null)   builder.append(this.networkGroup.getDisplayName()).append("String_Node_Str");
  if (this.tag != null)   builder.append("String_Node_Str").append(this.tag).append("String_Node_Str");
  if (this.indexes != null)   builder.append("String_Node_Str").append(this.indexes).append("String_Node_Str");
  return builder.toString();
}

Fixed version (ground truth):
public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  if (this.networkGroup != null)   builder.append(this.networkGroup.getDisplayName()).append("String_Node_Str");
  if (this.tag != null)   builder.append("String_Node_Str").append(this.tag).append("String_Node_Str");
  if (this.indexes != null)   builder.append("String_Node_Str").append(this.indexes).append("String_Node_Str");
  return builder.toString();
}
Program: 14992
Project: 14992
Buggy source:
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          this.setExtantNetwork(exNet);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}

Fixed version (ground truth):
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          Entities.persist(exNet);
          this.setExtantNetwork(exNet);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}
Program: 14993
Project: 14993
Buggy source:
private void updateClusterConfiguration(final DescribeNetworksResponseType reply){
  EntityTransaction db=Entities.get(ClusterConfiguration.class);
  try {
    ClusterConfiguration config=Entities.uniqueResult(this.getSubject().getConfiguration());
    config.setNetworkMode(reply.getMode());
    config.setUseNetworkTags(reply.getUseVlans() == 1);
    config.setMinNetworkTag(reply.getVlanMin());
    config.setMaxNetworkTag(reply.getVlanMax());
    config.setAddressesPerNetwork(reply.getAddrsPerNet());
    config.setVnetNetmask(reply.getVnetNetmask());
    config.setVnetSubnet(reply.getVnetSubnet());
    db.commit();
  }
 catch (  Exception ex) {
    Logs.exhaust().error(ex,ex);
    db.rollback();
  }
}

Fixed version (ground truth):
private void updateClusterConfiguration(final DescribeNetworksResponseType reply){
  EntityTransaction db=Entities.get(ClusterConfiguration.class);
  try {
    ClusterConfiguration config=Entities.uniqueResult(this.getSubject().getConfiguration());
    config.setNetworkMode(reply.getMode());
    config.setUseNetworkTags(reply.getUseVlans() == 1);
    config.setMinNetworkTag(reply.getVlanMin());
    config.setMaxNetworkTag(reply.getVlanMax());
    config.setMinNetworkIndex((long)reply.getAddrIndexMin().intValue());
    config.setMaxNetworkIndex((long)reply.getAddrIndexMax().intValue());
    config.setAddressesPerNetwork(reply.getAddrsPerNet());
    config.setVnetNetmask(reply.getVnetNetmask());
    config.setVnetSubnet(reply.getVnetSubnet());
    db.commit();
  }
 catch (  Exception ex) {
    Logs.exhaust().error(ex,ex);
    db.rollback();
  }
}
Program: 14995
Project: 14995
Buggy source:
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      int tag=this.attemptNetworkTagging();
      exNet=ExtantNetwork.create(this,tag);
      Entities.persist(exNet);
      this.setExtantNetwork(exNet);
    }
    Entities.merge(this);
    return this.getExtantNetwork();
  }
}

Fixed version (ground truth):
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          Entities.persist(exNet);
          this.setExtantNetwork(exNet);
          Entities.merge(this);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}
Program: 14996
Project: 14996
Buggy source:
public SetReference<PrivateNetworkIndex,VmInstance> allocateNetworkIndex() throws TransactionException {
  EntityTransaction db=Entities.get(ExtantNetwork.class);
  SetReference<PrivateNetworkIndex,VmInstance> ref=null;
  try {
    ExtantNetwork exNet=Entities.merge(this);
    PrivateNetworkIndex netIdx=null;
    for (    Long i : Numbers.shuffled(NetworkGroups.networkIndexInterval())) {
      try {
        Entities.uniqueResult(PrivateNetworkIndex.create(this,i));
        continue;
      }
 catch (      Exception ex) {
        try {
          netIdx=PrivateNetworkIndex.create(exNet,i);
          exNet.getIndexes().add(netIdx);
          netIdx=Entities.persist(netIdx);
          exNet=Entities.merge(exNet);
          break;
        }
 catch (        Exception ex1) {
          continue;
        }
      }
    }
    if (netIdx != null) {
      try {
        ref=netIdx.allocate();
        Entities.merge(this);
        db.commit();
        return ref;
      }
 catch (      Exception ex1) {
        db.rollback();
        throw new TransactionExecutionException("String_Node_Str" + this.displayName);
      }
    }
 else {
      throw new TransactionExecutionException("String_Node_Str" + this.displayName);
    }
  }
 catch (  TransactionException ex) {
    throw ex;
  }
catch (  Exception ex) {
    throw new TransactionExecutionException("String_Node_Str" + this.displayName,ex);
  }
}

Fixed version (ground truth):
public SetReference<PrivateNetworkIndex,VmInstance> allocateNetworkIndex() throws TransactionException {
  EntityTransaction db=Entities.get(ExtantNetwork.class);
  SetReference<PrivateNetworkIndex,VmInstance> ref=null;
  try {
    ExtantNetwork exNet=Entities.merge(this);
    PrivateNetworkIndex netIdx=null;
    for (    Long i : Numbers.shuffled(NetworkGroups.networkIndexInterval())) {
      try {
        Entities.uniqueResult(PrivateNetworkIndex.create(this,i));
        continue;
      }
 catch (      Exception ex) {
        try {
          netIdx=PrivateNetworkIndex.create(exNet,i);
          netIdx=Entities.persist(netIdx);
          exNet.getIndexes().add(netIdx);
          exNet=Entities.merge(exNet);
          break;
        }
 catch (        Exception ex1) {
          continue;
        }
      }
    }
    if (netIdx != null) {
      try {
        ref=netIdx.allocate();
        Entities.merge(this);
        db.commit();
        return ref;
      }
 catch (      Exception ex1) {
        db.rollback();
        throw new TransactionExecutionException("String_Node_Str" + this.displayName);
      }
    }
 else {
      throw new TransactionExecutionException("String_Node_Str" + this.displayName);
    }
  }
 catch (  TransactionException ex) {
    throw ex;
  }
catch (  Exception ex) {
    throw new TransactionExecutionException("String_Node_Str" + this.displayName,ex);
  }
}
Program: 14997
Project: 14997
Buggy source:
public NetworkGroup getPrimaryNetwork(){
  if (this.networkGroups.size() < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
 else {
    try {
      return Transactions.find(this.networkGroups.values().iterator().next());
    }
 catch (    TransactionException ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
}

Fixed version (ground truth):
public NetworkGroup getPrimaryNetwork(){
  return this.primaryNetwork;
}
Program: 14998
Project: 14998
Buggy source:
@SuppressWarnings("String_Node_Str") private void setupNetworkMessages() throws NotEnoughResourcesException {
  NetworkGroup net=this.allocInfo.getPrimaryNetwork();
  if (net != null) {
    final Request<StartNetworkType,StartNetworkResponseType> callback=AsyncRequests.newRequest(new StartNetworkCallback(net.extantNetwork()));
    this.messages.addRequest(State.CREATE_NETWORK,callback);
    EventRecord.here(ClusterAllocator.class,EventType.VM_PREPARE,callback.getClass().getSimpleName(),net.toString()).debug();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void setupNetworkMessages() throws NotEnoughResourcesException {
  NetworkGroup net=this.allocInfo.getPrimaryNetwork();
  if (net != null) {
    final Request<StartNetworkType,StartNetworkResponseType> callback=AsyncRequests.newRequest(new StartNetworkCallback(this.allocInfo.getExtantNetwork()));
    this.messages.addRequest(State.CREATE_NETWORK,callback);
    EventRecord.here(ClusterAllocator.class,EventType.VM_PREPARE,callback.getClass().getSimpleName(),net.toString()).debug();
  }
}
Program: 15000
Project: 15000
Buggy source:
private void setupVmMessages(final ResourceToken token) throws Exception {
  final String networkName=NetworkGroups.networkingConfiguration().hasNetworking() ? this.allocInfo.getPrimaryNetwork().getNaturalId() : NetworkGroups.lookup(this.allocInfo.getOwnerFullName(),NetworkGroups.defaultNetworkName()).getNaturalId();
  final Integer vlan=token.getAllocationInfo().getPrimaryNetwork().extantNetwork().getTag();
  final SshKeyPair keyInfo=this.allocInfo.getSshKeyPair();
  final VmTypeInfo vmInfo=this.allocInfo.getVmTypeInfo();
  Request cb=null;
  try {
    final VirtualBootRecord root=vmInfo.lookupRoot();
    final VmTypeInfo childVmInfo=this.makeVmTypeInfo(vmInfo,token.getLaunchIndex(),root);
    cb=this.makeRunRequest(token,childVmInfo,networkName);
    this.messages.addRequest(State.CREATE_VMS,cb);
  }
 catch (  final Exception ex) {
    Logs.extreme().error(ex,ex);
    throw ex;
  }
}

Fixed version (ground truth):
private void setupVmMessages(final ResourceToken token) throws Exception {
  final String networkName=NetworkGroups.networkingConfiguration().hasNetworking() ? this.allocInfo.getPrimaryNetwork().getNaturalId() : NetworkGroups.lookup(this.allocInfo.getOwnerFullName(),NetworkGroups.defaultNetworkName()).getNaturalId();
  final SshKeyPair keyInfo=this.allocInfo.getSshKeyPair();
  final VmTypeInfo vmInfo=this.allocInfo.getVmTypeInfo();
  Request cb=null;
  try {
    final VirtualBootRecord root=vmInfo.lookupRoot();
    final VmTypeInfo childVmInfo=this.makeVmTypeInfo(vmInfo,token.getLaunchIndex(),root);
    cb=this.makeRunRequest(token,childVmInfo,networkName);
    this.messages.addRequest(State.CREATE_VMS,cb);
  }
 catch (  final Exception ex) {
    Logs.extreme().error(ex,ex);
    throw ex;
  }
}
Program: 15001
Project: 15001
Buggy source:
@Override public void initialize(StopNetworkType msg) throws Exception {
  try {
    NetworkGroup net=NetworkGroups.lookup(this.networkGroup.getNaturalId());
    ExtantNetwork exNet=net.extantNetwork();
    if (!net.extantNetwork().hasIndexes()) {
      LOG.debug("String_Node_Str" + net.extantNetwork());
      throw new EucalyptusClusterException("String_Node_Str");
    }
 else {
      LOG.debug("String_Node_Str" + net.extantNetwork());
    }
  }
 catch (  Exception e) {
    LOG.debug(e);
  }
}

Fixed version (ground truth):
@Override public void initialize(StopNetworkType msg) throws Exception {
}
Program: 15002
Project: 15002
Buggy source:
@SuppressWarnings("String_Node_Str") public StopNetworkCallback(final NetworkGroup networkGroup){
  this.networkGroup=networkGroup;
  try {
    this.tag=this.networkGroup.extantNetwork().getTag();
  }
 catch (  NotEnoughResourcesException ex) {
    this.tag=-1;
  }
  StopNetworkType msg=new StopNetworkType(this.networkGroup.getOwnerAccountNumber(),this.networkGroup.getOwnerUserId(),this.networkGroup.getNaturalId(),this.tag).regarding();
  msg.setUserId(this.networkGroup.getOwnerUserId());
  msg.setAccountId(this.networkGroup.getOwnerAccountNumber());
  this.setRequest(msg);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public StopNetworkCallback(final NetworkGroup networkGroup){
  this.networkGroup=networkGroup;
  try {
    this.tag=this.networkGroup.extantNetwork().getTag();
  }
 catch (  Exception ex) {
    this.tag=-1;
  }
  StopNetworkType msg=new StopNetworkType(this.networkGroup.getOwnerAccountNumber(),this.networkGroup.getOwnerUserId(),this.networkGroup.getNaturalId(),this.tag).regarding();
  msg.setUserId(this.networkGroup.getOwnerUserId());
  msg.setAccountId(this.networkGroup.getOwnerAccountNumber());
  this.setRequest(msg);
}
Program: 15003
Project: 15003
Buggy source:
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else {
    final EntityTransaction db=Entities.get(NetworkGroup.class);
    try {
      NetworkGroup net=Entities.merge(this);
      ExtantNetwork exNet=net.getExtantNetwork();
      if (net.getExtantNetwork() == null) {
        exNet=net.findOrCreateExtantNetwork();
      }
      Entities.merge(net);
      db.commit();
      return exNet;
    }
 catch (    Exception ex) {
      db.rollback();
      Logs.exhaust().trace(ex,ex);
      throw new NotEnoughResourcesException(ex);
    }
  }
}

Fixed version (ground truth):
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      int tag=this.attemptNetworkTagging();
      exNet=ExtantNetwork.create(this,tag);
      Entities.persist(exNet);
      this.setExtantNetwork(exNet);
    }
    Entities.merge(this);
    return this.getExtantNetwork();
  }
}
Program: 15005
Project: 15005
Buggy source:
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      int tag=this.attemptNetworkTagging();
      exNet=ExtantNetwork.create(this,tag);
      Entities.persist(exNet);
      this.setExtantNetwork(exNet);
    }
    Entities.merge(this);
    return this.getExtantNetwork();
  }
}

Fixed version (ground truth):
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      int tag=this.attemptNetworkTagging();
      exNet=ExtantNetwork.create(this,tag);
      Entities.persist(exNet);
      this.setExtantNetwork(exNet);
    }
    Entities.merge(this);
    return this.getExtantNetwork();
  }
}
Program: 15006
Project: 15006
Buggy source:
public EntityTransaction join(){
  return new EntityTransaction(){
    private final String uuid=UUID.randomUUID().toString();
{
      CascadingTx.this.startStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(2));
    }
    @Override public void setRollbackOnly(){
    }
    @Override public void rollback(){
    }
    @Override public boolean isActive(){
      return CascadingTx.this.isActive();
    }
    @Override public boolean getRollbackOnly(){
      return CascadingTx.this.getRollbackOnly();
    }
    @Override public void commit(){
      try {
        CascadingTx.this.endStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(1));
      }
 catch (      final HibernateException ex) {
        LOG.error(ex,ex);
      }
    }
    @Override public void begin(){
    }
  }
;
}

Fixed version (ground truth):
public EntityTransaction join(){
  return new EntityTransaction(){
    private final String uuid=UUID.randomUUID().toString();
{
      CascadingTx.this.startStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(2));
    }
    @Override public void setRollbackOnly(){
    }
    @Override public void rollback(){
    }
    @Override public boolean isActive(){
      return CascadingTx.this.isActive();
    }
    @Override public boolean getRollbackOnly(){
      return CascadingTx.this.getRollbackOnly();
    }
    @Override public void commit(){
      try {
        CascadingTx.this.endStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(1));
        CascadingTx.this.getTxState().getEntityManager().flush();
      }
 catch (      final HibernateException ex) {
        LOG.error(ex,ex);
      }
    }
    @Override public void begin(){
    }
  }
;
}
Program: 15007
Project: 15007
Buggy source:
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          Entities.persist(exNet);
          this.setExtantNetwork(exNet);
          Entities.merge(this);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}

Fixed version (ground truth):
public ExtantNetwork extantNetwork() throws NotEnoughResourcesException, TransientEntityException {
  if (!NetworkGroups.networkingConfiguration().hasNetworking()) {
    return ExtantNetwork.bogus(this);
  }
 else   if (!Entities.isPersistent(this)) {
    throw new TransientEntityException(this.toString());
  }
 else {
    ExtantNetwork exNet=this.getExtantNetwork();
    if (exNet == null) {
      for (      Integer i : Numbers.shuffled(NetworkGroups.networkTagInterval())) {
        try {
          Entities.uniqueResult(ExtantNetwork.named(i));
          continue;
        }
 catch (        Exception ex) {
          exNet=ExtantNetwork.create(this,i);
          this.setExtantNetwork(exNet);
          return this.getExtantNetwork();
        }
      }
      throw new NotEnoughResourcesException("String_Node_Str" + this.getFullName() + "String_Node_Str");
    }
 else {
      return this.getExtantNetwork();
    }
  }
}
Program: 15008
Project: 15008
Buggy source:
public EntityTransaction join(){
  return new EntityTransaction(){
    private final String uuid=UUID.randomUUID().toString();
{
      CascadingTx.this.startStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(2));
    }
    @Override public void setRollbackOnly(){
    }
    @Override public void rollback(){
    }
    @Override public boolean isActive(){
      return CascadingTx.this.isActive();
    }
    @Override public boolean getRollbackOnly(){
      return CascadingTx.this.getRollbackOnly();
    }
    @Override public void commit(){
      try {
        CascadingTx.this.endStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(1));
        CascadingTx.this.getTxState().getEntityManager().flush();
      }
 catch (      final HibernateException ex) {
        LOG.error(ex,ex);
      }
    }
    @Override public void begin(){
    }
  }
;
}

Fixed version (ground truth):
public EntityTransaction join(){
  return new EntityTransaction(){
    private final String uuid=UUID.randomUUID().toString();
{
      CascadingTx.this.startStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(2));
    }
    @Override public void setRollbackOnly(){
    }
    @Override public void rollback(){
    }
    @Override public boolean isActive(){
      return CascadingTx.this.isActive();
    }
    @Override public boolean getRollbackOnly(){
      return CascadingTx.this.getRollbackOnly();
    }
    @Override public void commit(){
      try {
        CascadingTx.this.endStes.put(CascadingTx.this.getRecord().getUuid() + "String_Node_Str" + this.uuid,Threads.currentStackFrame(1));
      }
 catch (      final HibernateException ex) {
        LOG.error(ex,ex);
      }
    }
    @Override public void begin(){
    }
  }
;
}
Program: 15009
Project: 15009
Buggy source:
public static <T>void refresh(final T newObject) throws ConstraintViolationException {
  try {
    getTransaction(newObject).getTxState().getEntityManager().refresh(newObject);
  }
 catch (  final RuntimeException ex) {
    PersistenceExceptions.throwFiltered(ex);
    throw ex;
  }
}

Fixed version (ground truth):
public static <T>void refresh(final T newObject,final LockModeType lockMode) throws ConstraintViolationException {
  try {
    getTransaction(newObject).getTxState().getEntityManager().refresh(newObject,lockMode);
  }
 catch (  final RuntimeException ex) {
    PersistenceExceptions.throwFiltered(ex);
    throw ex;
  }
}
Program: 15010
Project: 15010
Buggy source:
private static boolean hasTransaction(final Object obj){
  final String ctx=lookatPersistenceContext(obj);
  return txStateThreadLocal.get().containsKey(ctx);
}

Fixed version (ground truth):
private static boolean hasTransaction(final Object obj){
  final String ctx=lookatPersistenceContext(obj);
  CascadingTx tx=txStateThreadLocal.get().get(ctx);
  if (tx == null) {
    return false;
  }
 else   if (tx.isActive()) {
    return true;
  }
 else {
    txStateThreadLocal.get().remove(ctx);
    return false;
  }
}
Program: 15011
Project: 15011
Buggy source:
@Override public Account getAccount() throws AuthException {
  return Accounts.lookupAccountByName(Account.NOBODY_ACCOUNT);
}

Fixed version (ground truth):
@Override public Account getAccount() throws AuthException {
  return NOBODY_ACCOUNT;
}
Program: 15012
Project: 15012
Buggy source:
@Override public boolean onSave(final Object entity,final Serializable id,final Object[] state,final String[] propertyNames,final Type[] types){
  LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,entity.getClass().getSimpleName(),id,toStringNullably(entity)));
  return super.onSave(entity,id,state,propertyNames,types);
}

Fixed version (ground truth):
@Override public boolean onSave(final Object entity,final Serializable id,final Object[] state,final String[] propertyNames,final Type[] types){
  try {
    LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,entity.getClass().getSimpleName(),id,toStringNullably(entity)));
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  return super.onSave(entity,id,state,propertyNames,types);
}
Program: 15013
Project: 15013
Buggy source:
@Override public void onCollectionRemove(final Object collection,final Serializable key) throws CallbackException {
  Iterable<Object> iter=(collection instanceof Iterable ? (Iterable)collection : Lists.newArrayList(collection));
  String summary=Iterables.toString(Iterables.transform(iter,Classes.canonicalNameFunction()));
  LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,key,summary));
  super.onCollectionRemove(collection,key);
}

Fixed version (ground truth):
@Override public void onCollectionRemove(final Object collection,final Serializable key) throws CallbackException {
  try {
    Iterable<Object> iter=(collection instanceof Iterable ? (Iterable)collection : Lists.newArrayList(collection));
    String summary=Iterables.toString(Iterables.transform(iter,Classes.canonicalNameFunction()));
    LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,key,summary));
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  super.onCollectionRemove(collection,key);
}
Program: 15014
Project: 15014
Buggy source:
@Override public void onCollectionRecreate(final Object collection,final Serializable key) throws CallbackException {
  Iterable<Object> iter=(collection instanceof Iterable ? (Iterable)collection : Lists.newArrayList(collection));
  String summary=Iterables.toString(Iterables.transform(iter,Classes.canonicalNameFunction()));
  LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,key,summary));
  super.onCollectionRecreate(collection,key);
}

Fixed version (ground truth):
@Override public void onCollectionRecreate(final Object collection,final Serializable key) throws CallbackException {
  try {
    Iterable<Object> iter=(collection instanceof Iterable ? (Iterable)collection : Lists.newArrayList(collection));
    String summary=Iterables.toString(Iterables.transform(iter,Classes.canonicalNameFunction()));
    LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,key,summary));
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  super.onCollectionRecreate(collection,key);
}
Program: 15015
Project: 15015
Buggy source:
@Override public void beforeTransactionCompletion(final Transaction tx){
  if (this.operations == 0) {
    LOG.error(Threads.currentStackString());
  }
  LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),this.operations,tx.toString()));
  super.beforeTransactionCompletion(tx);
}

Fixed version (ground truth):
@Override public void beforeTransactionCompletion(final Transaction tx){
  if (this.operations == 0) {
    LOG.error(Threads.currentStackString());
  }
  try {
    LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),this.operations,tx.toString()));
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  super.beforeTransactionCompletion(tx);
}
Program: 15016
Project: 15016
Buggy source:
@Override public Object getEntity(String entityName,Serializable id){
  LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,entityName,id));
  return super.getEntity(entityName,id);
}

Fixed version (ground truth):
@Override public Object getEntity(String entityName,Serializable id){
  try {
    LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,entityName,id));
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  return super.getEntity(entityName,id);
}
Program: 15017
Project: 15017
Buggy source:
@Override public Object instantiate(String entityName,EntityMode entityMode,Serializable id){
  LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,entityName,id));
  return super.instantiate(entityName,entityMode,id);
}

Fixed version (ground truth):
@Override public Object instantiate(String entityName,EntityMode entityMode,Serializable id){
  try {
    LOG.debug(String.format("String_Node_Str",Threads.currentStackFrame().getMethodName(),++this.operations,entityName,id));
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  return super.instantiate(entityName,entityMode,id);
}