nus-yam/ex-repair huggingface dataset:
Program: 14259
Project: 14259
Buggy source:
public DeleteStackResponseType deleteStack(DeleteStackType request) throws CloudFormationException {
  DeleteStackResponseType reply=request.getReply();
  try {
    final Context ctx=Contexts.lookup();
    Account account=ctx.getAccount();
    User user=account.lookupUserByName(User.ACCOUNT_ADMIN);
    String stackName=request.getStackName();
    if (stackName == null)     throw new ValidationErrorException("String_Node_Str");
    Stack stack=StackEntityManager.getStack(stackName);
    if (stack == null)     throw new ValidationErrorException("String_Node_Str" + stackName + "String_Node_Str");
    new StackDeletor(stack,user.getUserId());
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  return reply;
}

Fixed version (ground truth):
public DeleteStackResponseType deleteStack(DeleteStackType request) throws CloudFormationException {
  DeleteStackResponseType reply=request.getReply();
  try {
    final Context ctx=Contexts.lookup();
    Account account=ctx.getAccount();
    User user=account.lookupUserByName(User.ACCOUNT_ADMIN);
    String stackName=request.getStackName();
    if (stackName == null)     throw new ValidationErrorException("String_Node_Str");
    Stack stack=StackEntityManager.getStack(stackName);
    if (stack == null)     throw new ValidationErrorException("String_Node_Str" + stackName + "String_Node_Str");
    new StackDeletor(stack,user.getUserId()).start();
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
  return reply;
}
Program: 14262
Project: 14262
Buggy source:
public void run(){
  for (  StackResourceEntity stackResourceEntity : StackResourceEntityManager.getStackResources(stack.getStackName())) {
    Resource resource=null;
    if (stackResourceEntity.getResourceType().equals("String_Node_Str")) {
      AWSEC2Instance awsec2Instance=new AWSEC2Instance();
      awsec2Instance.setOwnerUserId(userId);
      awsec2Instance.setLogicalResourceId(stackResourceEntity.getLogicalResourceId());
      awsec2Instance.setType(stackResourceEntity.getResourceType());
      awsec2Instance.setPhysicalResourceId(awsec2Instance.getPhysicalResourceId());
      resource=awsec2Instance;
    }
    try {
      resource.delete();
    }
 catch (    Exception ex) {
    }
  }
  StackResourceEntityManager.deleteStackResources(stack.getStackName());
  StackEventEntityManager.deleteStackEvents(stack.getStackName());
  StackEntityManager.deleteStack(stack.getStackName());
}

Fixed version (ground truth):
@Override public void run(){
  try {
    for (    StackResourceEntity stackResourceEntity : StackResourceEntityManager.getStackResources(stack.getStackName())) {
      Resource resource=null;
      if (stackResourceEntity.getResourceType().equals("String_Node_Str")) {
        AWSEC2Instance awsec2Instance=new AWSEC2Instance();
        awsec2Instance.setOwnerUserId(userId);
        awsec2Instance.setLogicalResourceId(stackResourceEntity.getLogicalResourceId());
        awsec2Instance.setType(stackResourceEntity.getResourceType());
        awsec2Instance.setPhysicalResourceId(awsec2Instance.getPhysicalResourceId());
        resource=awsec2Instance;
      }
      try {
        resource.delete();
      }
 catch (      Exception ex) {
        LOG.error(ex,ex);
      }
    }
    StackResourceEntityManager.deleteStackResources(stack.getStackName());
    StackEventEntityManager.deleteStackEvents(stack.getStackName());
    StackEntityManager.deleteStack(stack.getStackName());
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
}
Program: 14263
Project: 14263
Buggy source:
public static void addStack(Stack stack) throws Exception {
  try (TransactionResource db=Entities.transactionFor(StackEntity.class)){
    Criteria criteria=Entities.createCriteria(StackEntity.class).add(Restrictions.or(Restrictions.eq("String_Node_Str",stack.getStackName()),Restrictions.eq("String_Node_Str",stack.getStackId())));
    List<StackEntity> EntityList=criteria.list();
    if (!EntityList.isEmpty()) {
      throw new Exception("String_Node_Str");
    }
    StackEntity stackEntity=stackToStackEntity(stack);
    Entities.persist(stackEntity);
    db.commit();
  }
 }

Fixed version (ground truth):
public static void addStack(Stack stack) throws Exception {
  try (TransactionResource db=Entities.transactionFor(StackEntity.class)){
    Criteria criteria=Entities.createCriteria(StackEntity.class).add(Restrictions.or(Restrictions.eq("String_Node_Str",stack.getStackName()),Restrictions.eq("String_Node_Str",stack.getStackId())));
    List<StackEntity> EntityList=criteria.list();
    if (!EntityList.isEmpty()) {
      throw new Exception("String_Node_Str");
    }
    LOG.info("String_Node_Str" + stack.getStackName());
    StackEntity stackEntity=stackToStackEntity(stack);
    LOG.info("String_Node_Str" + stackEntity.getStackName());
    Entities.persist(stackEntity);
    db.commit();
  }
 }
Program: 14264
Project: 14264
Buggy source:
public static void addStackEvent(StackEvent stackEvent){
  try (TransactionResource db=Entities.transactionFor(StackEntity.class)){
    Entities.persist(stackEventToStackEventEntity(stackEvent));
    db.commit();
  }
 }

Fixed version (ground truth):
public static void addStackEvent(StackEvent stackEvent){
  try (TransactionResource db=Entities.transactionFor(StackEventEntity.class)){
    Entities.persist(stackEventToStackEventEntity(stackEvent));
    db.commit();
  }
 }
Program: 14265
Project: 14265
Buggy source:
public static StackEvent stackEventEntityToStackEvent(StackEventEntity stackEventEntity){
  StackEvent stackEvent=new StackEvent();
  stackEvent.setEventId(stackEventEntity.getEventId());
  stackEvent.setLogicalResourceId(stackEventEntity.getLogicalResourceId());
  stackEvent.setPhysicalResourceId(stackEventEntity.getPhysicalResourceId());
  stackEvent.setResourceProperties(stackEventEntity.getResourceProperties());
  stackEvent.setResourceStatus(stackEventEntity.getResourceStatus().toString());
  stackEvent.setResourceStatusReason(stackEventEntity.getResourceStatusReason());
  stackEvent.setResourceType(stackEventEntity.getResourceType());
  stackEvent.setStackId(stackEventEntity.getStackId());
  stackEvent.setStackId(stackEventEntity.getStackName());
  stackEvent.setTimestamp(stackEventEntity.getTimestamp());
  return stackEvent;
}

Fixed version (ground truth):
public static StackEvent stackEventEntityToStackEvent(StackEventEntity stackEventEntity){
  StackEvent stackEvent=new StackEvent();
  stackEvent.setEventId(stackEventEntity.getEventId());
  stackEvent.setLogicalResourceId(stackEventEntity.getLogicalResourceId());
  stackEvent.setPhysicalResourceId(stackEventEntity.getPhysicalResourceId());
  stackEvent.setResourceProperties(stackEventEntity.getResourceProperties());
  stackEvent.setResourceStatus(stackEventEntity.getResourceStatus().toString());
  stackEvent.setResourceStatusReason(stackEventEntity.getResourceStatusReason());
  stackEvent.setResourceType(stackEventEntity.getResourceType());
  stackEvent.setStackId(stackEventEntity.getStackId());
  stackEvent.setStackName(stackEventEntity.getStackName());
  stackEvent.setTimestamp(stackEventEntity.getTimestamp());
  return stackEvent;
}
Program: 14266
Project: 14266
Buggy source:
public static StackEventEntity stackEventToStackEventEntity(StackEvent stackEvent){
  StackEventEntity stackEventEntity=new StackEventEntity();
  stackEventEntity.setEventId(stackEvent.getEventId());
  stackEventEntity.setLogicalResourceId(stackEvent.getLogicalResourceId());
  stackEventEntity.setPhysicalResourceId(stackEvent.getPhysicalResourceId());
  stackEventEntity.setResourceProperties(stackEvent.getResourceProperties());
  stackEventEntity.setResourceStatus(StackResourceEntity.Status.valueOf(stackEvent.getResourceStatus()));
  stackEventEntity.setResourceStatusReason(stackEvent.getResourceStatusReason());
  stackEventEntity.setResourceType(stackEvent.getResourceType());
  stackEventEntity.setStackId(stackEvent.getStackId());
  stackEventEntity.setStackId(stackEvent.getStackName());
  stackEventEntity.setTimestamp(stackEvent.getTimestamp());
  return stackEventEntity;
}

Fixed version (ground truth):
public static StackEventEntity stackEventToStackEventEntity(StackEvent stackEvent){
  StackEventEntity stackEventEntity=new StackEventEntity();
  stackEventEntity.setEventId(stackEvent.getEventId());
  stackEventEntity.setLogicalResourceId(stackEvent.getLogicalResourceId());
  stackEventEntity.setPhysicalResourceId(stackEvent.getPhysicalResourceId());
  stackEventEntity.setResourceProperties(stackEvent.getResourceProperties());
  stackEventEntity.setResourceStatus(StackResourceEntity.Status.valueOf(stackEvent.getResourceStatus()));
  stackEventEntity.setResourceStatusReason(stackEvent.getResourceStatusReason());
  stackEventEntity.setResourceType(stackEvent.getResourceType());
  stackEventEntity.setStackId(stackEvent.getStackId());
  stackEventEntity.setStackName(stackEvent.getStackName());
  stackEventEntity.setTimestamp(stackEvent.getTimestamp());
  return stackEventEntity;
}
Program: 14267
Project: 14267
Buggy source:
public DeregisterImageResponseType deregister(DeregisterImageType request) throws EucalyptusCloudException {
  DeregisterImageResponseType reply=request.getReply();
  final Context ctx=Contexts.lookup();
  final String requestAccountId=ctx.getUserFullName().getAccountNumber();
  EntityTransaction tx=Entities.get(ImageInfo.class);
  try {
    ImageInfo imgInfo=Entities.uniqueResult(Images.exampleWithImageId(imageIdentifier(request.getImageId())));
    if (!ctx.hasAdministrativePrivileges() && (!imgInfo.getOwnerAccountNumber().equals(requestAccountId) || !RestrictedTypes.filterPrivileged().apply(imgInfo))) {
      throw new EucalyptusCloudException("String_Node_Str");
    }
    Images.deregisterImage(imgInfo.getDisplayName());
    tx.commit();
    return reply;
  }
 catch (  NoSuchImageException|NoSuchElementException ex) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  InstanceNotTerminatedException|ConstraintViolationException re) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  TransactionException ex) {
    if (ex.getCause() instanceof NoSuchElementException)     throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
 else     throw new EucalyptusCloudException(ex);
  }
}

Fixed version (ground truth):
public DeregisterImageResponseType deregister(DeregisterImageType request) throws EucalyptusCloudException {
  DeregisterImageResponseType reply=request.getReply();
  final Context ctx=Contexts.lookup();
  final String requestAccountId=ctx.getUserFullName().getAccountNumber();
  EntityTransaction tx=Entities.get(ImageInfo.class);
  try {
    ImageInfo imgInfo=Entities.uniqueResult(Images.exampleWithImageId(imageIdentifier(request.getImageId())));
    if (!ctx.hasAdministrativePrivileges() && (!imgInfo.getOwnerAccountNumber().equals(requestAccountId) || !RestrictedTypes.filterPrivileged().apply(imgInfo))) {
      throw new EucalyptusCloudException("String_Node_Str");
    }
    Images.deregisterImage(imgInfo.getDisplayName());
    tx.commit();
    return reply;
  }
 catch (  NoSuchImageException|NoSuchElementException ex) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  InstanceNotTerminatedException|ConstraintViolationException re) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  TransactionException ex) {
    if (ex.getCause() instanceof NoSuchElementException)     throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
 else     throw new EucalyptusCloudException(ex);
  }
 finally {
    if (tx.isActive())     tx.rollback();
  }
}
Program: 14268
Project: 14268
Buggy source:
public static void deregisterImage(String imageId) throws NoSuchImageException, InstanceNotTerminatedException {
  EntityTransaction tx=Entities.get(ImageInfo.class);
  try {
    ImageInfo img=Entities.uniqueResult(Images.exampleWithImageId(imageId));
    if (ImageMetadata.State.deregistered.equals(img.getState())) {
      Entities.delete(img);
    }
 else {
      img.setState(ImageMetadata.State.deregistered);
    }
    tx.commit();
    if (img instanceof ImageMetadata.StaticDiskImage) {
      StaticDiskImages.flush((StaticDiskImage)img);
    }
  }
 catch (  ConstraintViolationException cve) {
    tx.rollback();
    throw new InstanceNotTerminatedException("String_Node_Str" + imageId + "String_Node_Str");
  }
catch (  TransactionException ex) {
    tx.rollback();
    throw new NoSuchImageException("String_Node_Str" + imageId,ex);
  }
catch (  NoSuchElementException ex) {
    tx.rollback();
    throw new NoSuchImageException("String_Node_Str" + imageId,ex);
  }
}

Fixed version (ground truth):
public static void deregisterImage(String imageId) throws NoSuchImageException, InstanceNotTerminatedException {
  EntityTransaction tx=Entities.get(ImageInfo.class);
  try {
    ImageInfo img=Entities.uniqueResult(Images.exampleWithImageId(imageId));
    if (ImageMetadata.State.deregistered.equals(img.getState())) {
      Entities.delete(img);
    }
 else {
      img.setState(ImageMetadata.State.deregistered);
    }
    tx.commit();
    if (img instanceof ImageMetadata.StaticDiskImage) {
      StaticDiskImages.flush((StaticDiskImage)img);
    }
  }
 catch (  ConstraintViolationException cve) {
    tx.rollback();
    throw new InstanceNotTerminatedException("String_Node_Str" + imageId + "String_Node_Str");
  }
catch (  TransactionException ex) {
    tx.rollback();
    throw new NoSuchImageException("String_Node_Str" + imageId,ex);
  }
catch (  NoSuchElementException ex) {
    tx.rollback();
    throw new NoSuchImageException("String_Node_Str" + imageId,ex);
  }
 finally {
    if (tx.isActive())     tx.rollback();
  }
}
Program: 14269
Project: 14269
Buggy source:
public DeregisterImageResponseType deregister(DeregisterImageType request) throws EucalyptusCloudException {
  DeregisterImageResponseType reply=request.getReply();
  final Context ctx=Contexts.lookup();
  final String requestAccountId=ctx.getUserFullName().getAccountNumber();
  EntityTransaction tx=Entities.get(ImageInfo.class);
  try {
    ImageInfo imgInfo=Entities.uniqueResult(Images.exampleWithImageId(imageIdentifier(request.getImageId())));
    if (!ctx.hasAdministrativePrivileges() && (!imgInfo.getOwnerAccountNumber().equals(requestAccountId) || !RestrictedTypes.filterPrivileged().apply(imgInfo))) {
      throw new EucalyptusCloudException("String_Node_Str");
    }
    Images.deregisterImage(imgInfo.getDisplayName());
    return reply;
  }
 catch (  NoSuchImageException|NoSuchElementException ex) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  InstanceNotTerminatedException re) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  TransactionException ex) {
    if (ex.getCause() instanceof NoSuchElementException)     throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
 else     throw new EucalyptusCloudException(ex);
  }
 finally {
    tx.commit();
  }
}

Fixed version (ground truth):
public DeregisterImageResponseType deregister(DeregisterImageType request) throws EucalyptusCloudException {
  DeregisterImageResponseType reply=request.getReply();
  final Context ctx=Contexts.lookup();
  final String requestAccountId=ctx.getUserFullName().getAccountNumber();
  EntityTransaction tx=Entities.get(ImageInfo.class);
  try {
    ImageInfo imgInfo=Entities.uniqueResult(Images.exampleWithImageId(imageIdentifier(request.getImageId())));
    if (!ctx.hasAdministrativePrivileges() && (!imgInfo.getOwnerAccountNumber().equals(requestAccountId) || !RestrictedTypes.filterPrivileged().apply(imgInfo))) {
      throw new EucalyptusCloudException("String_Node_Str");
    }
    Images.deregisterImage(imgInfo.getDisplayName());
    tx.commit();
    return reply;
  }
 catch (  NoSuchImageException|NoSuchElementException ex) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  InstanceNotTerminatedException|ConstraintViolationException re) {
    throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
  }
catch (  TransactionException ex) {
    if (ex.getCause() instanceof NoSuchElementException)     throw new ClientComputeException("String_Node_Str","String_Node_Str" + request.getImageId() + "String_Node_Str");
 else     throw new EucalyptusCloudException(ex);
  }
}
Program: 14270
Project: 14270
Buggy source:
MetricsSubmissionScalingProcessTask(final AutoScalingGroupMetricsView group,final List<AutoScalingInstanceCoreView> autoScalingInstances){
  super(group,"String_Node_Str");
  this.autoScalingInstances=autoScalingInstances;
}

Fixed version (ground truth):
MetricsSubmissionScalingProcessTask(final AutoScalingGroupMetricsView group,final List<AutoScalingInstanceCoreView> autoScalingInstances){
  super(group.getArn() + "String_Node_Str",group,"String_Node_Str");
  this.autoScalingInstances=autoScalingInstances;
}
Program: 14274
Project: 14274
Buggy source:
public Lock getGateLock(){
  return this.gateLock;
}

Fixed version (ground truth):
public ReadWriteLock getGateLock(){
  return this.gateLock;
}
Program: 14278
Project: 14278
Buggy source:
public Lock getGateLock(){
  return this.gateLock;
}

Fixed version (ground truth):
public ReadWriteLock getGateLock(){
  return this.gateLock;
}
Program: 14280
Project: 14280
Buggy source:
public static String formatIso8601UTCLongDateMillisTimezone(final Date date){
  final SimpleDateFormat format=sdf(iso8601TimestampWithMillisAndTimezone);
  format.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  return format.format(date);
}

Fixed version (ground truth):
public static String formatIso8601UTCLongDateMillisTimezone(final Date date){
  final SimpleDateFormat format=sdf(iso8601TimestampWithMillisAndTimezone);
  return format.format(date);
}
Program: 14281
Project: 14281
Buggy source:
@Override public boolean processClass(final Class candidate) throws Exception {
  if (ComponentId.class.isAssignableFrom(candidate) && !Modifier.isAbstract(candidate.getModifiers()) && !Modifier.isInterface(candidate.getModifiers())) {
    try {
      EventRecord.here(ComponentDiscovery.class,EventType.BOOTSTRAP_INIT_COMPONENT,candidate.toString()).info();
      final Class<? extends ComponentId> idClass=candidate;
      ComponentIds.lookup(idClass);
    }
 catch (    final Throwable ex) {
      LOG.error(ex,ex);
      LOG.info("String_Node_Str" + ex.getMessage(),ex);
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean processClass(final Class candidate) throws Exception {
  if (ComponentId.class.isAssignableFrom(candidate) && !Modifier.isAbstract(candidate.getModifiers()) && !Modifier.isInterface(candidate.getModifiers())&& !candidate.isLocalClass()&& !candidate.isAnonymousClass()) {
    try {
      EventRecord.here(ComponentDiscovery.class,EventType.BOOTSTRAP_INIT_COMPONENT,candidate.toString()).info();
      final Class<? extends ComponentId> idClass=candidate;
      ComponentIds.lookup(idClass);
    }
 catch (    final Throwable ex) {
      LOG.error(ex,ex);
      LOG.info("String_Node_Str" + ex.getMessage(),ex);
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 14282
Project: 14282
Buggy source:
@Override public void fire(GetConsoleOutputResponseType reply){
  VmInstance vm=VmInstances.lookup(this.getRequest().getInstanceId());
  String output=null;
  try {
    output=new String(Base64.decode(reply.getOutput().getBytes()));
    if (!"String_Node_Str".equals(output))     vm.setConsoleOutput(new StringBuffer().append(output));
  }
 catch (  ArrayIndexOutOfBoundsException e1) {
  }
  reply.setCorrelationId(this.correlationId);
  reply.setInstanceId(this.getRequest().getInstanceId());
  reply.setTimestamp(new Date());
  reply.setOutput(vm.getConsoleOutputString());
  LOG.debug(reply.toSimpleString());
  Contexts.response(reply);
}

Fixed version (ground truth):
@Override public void fire(GetConsoleOutputResponseType reply){
  VmInstance vm=VmInstances.lookup(this.getRequest().getInstanceId());
  try {
    if (reply.getOutput() != null) {
      String output=new String(Base64.decode(reply.getOutput().getBytes()));
      if (!"String_Node_Str".equals(output))       vm.setConsoleOutput(new StringBuffer().append(output));
    }
  }
 catch (  ArrayIndexOutOfBoundsException e1) {
  }
  reply.setCorrelationId(this.correlationId);
  reply.setInstanceId(this.getRequest().getInstanceId());
  reply.setTimestamp(new Date());
  reply.setOutput(vm.getConsoleOutputString());
  LOG.debug(reply.toSimpleString());
  Contexts.response(reply);
}
Program: 14283
Project: 14283
Buggy source:
@Override public void fire(GetConsoleOutputResponseType reply){
  VmInstance vm=VmInstances.lookup(this.getRequest().getInstanceId());
  String output=null;
  try {
    output=new String(Base64.decode(reply.getOutput().getBytes()));
    if (!"String_Node_Str".equals(output))     vm.setConsoleOutput(new StringBuffer().append(output));
  }
 catch (  ArrayIndexOutOfBoundsException e1) {
  }
  GetPasswordDataResponseType rep=this.msg.getReply();
  rep.setInstanceId(this.getRequest().getInstanceId());
  rep.setTimestamp(new Date());
  if (vm.getPasswordData() != null) {
    rep.setOutput(vm.getPasswordData());
  }
 else {
    rep.setOutput(null);
  }
  try {
    Contexts.response(rep);
  }
 catch (  Exception ex1) {
    LOG.error(ex1,ex1);
  }
}

Fixed version (ground truth):
@Override public void fire(GetConsoleOutputResponseType reply){
  VmInstance vm=VmInstances.lookup(this.getRequest().getInstanceId());
  try {
    if (reply.getOutput() != null) {
      String output=new String(Base64.decode(reply.getOutput().getBytes()));
      if (!"String_Node_Str".equals(output))       vm.setConsoleOutput(new StringBuffer().append(output));
    }
  }
 catch (  ArrayIndexOutOfBoundsException e1) {
  }
  GetPasswordDataResponseType rep=this.msg.getReply();
  rep.setInstanceId(this.getRequest().getInstanceId());
  rep.setTimestamp(new Date());
  if (vm.getPasswordData() != null) {
    rep.setOutput(vm.getPasswordData());
  }
 else {
    rep.setOutput(null);
  }
  try {
    Contexts.response(rep);
  }
 catch (  Exception ex1) {
    LOG.error(ex1,ex1);
  }
}
Program: 14290
Project: 14290
Buggy source:
@Override public int hashCode(){
  final int prime=31;
  int result=super.hashCode();
  result=prime * result + ((this.vmInstance == null) ? 0 : this.vmInstance.hashCode());
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  final int prime=31;
  int result=super.hashCode();
  result=prime * result + ((this.loadbalancer == null || this.loadbalancer.getOwnerUserId() == null) ? 0 : this.loadbalancer.getOwnerUserId().hashCode());
  result=prime * result + ((this.loadbalancer == null || this.loadbalancer.getDisplayName() == null) ? 0 : this.loadbalancer.getDisplayName().hashCode());
  result=prime * result + ((this.displayName == null) ? 0 : this.displayName.hashCode());
  return result;
}
Program: 14291
Project: 14291
Buggy source:
private LoadBalancerBackendInstance(final OwnerFullName userFullName,final LoadBalancer lb,final String vmId) throws LoadBalancingException {
  super(userFullName,vmId);
  this.loadbalancer=lb;
  this.setState(STATE.OutOfService);
  this.setReasonCode("String_Node_Str");
  this.setDescription("String_Node_Str");
  if (this.getVmInstance() == null)   throw new InvalidEndPointException();
  final EntityTransaction db=Entities.get(LoadBalancerZone.class);
  try {
    final LoadBalancerZone found=Entities.uniqueResult(LoadBalancerZone.named(lb,this.vmInstance.getPlacement()));
    this.setAvailabilityZone(found);
    db.commit();
  }
 catch (  final NoSuchElementException ex) {
    db.rollback();
  }
catch (  final Exception ex) {
    db.rollback();
    throw new InternalFailure400Exception("String_Node_Str");
  }
 finally {
    if (this.zone == null)     throw new InternalFailure400Exception("String_Node_Str");
  }
}

Fixed version (ground truth):
private LoadBalancerBackendInstance(final OwnerFullName userFullName,final LoadBalancer lb,final String vmId) throws LoadBalancingException {
  super(userFullName,vmId);
  this.loadbalancer=lb;
  this.setState(STATE.OutOfService);
  this.setReasonCode("String_Node_Str");
  this.setDescription("String_Node_Str");
  if (this.getVmInstance() == null)   throw new InvalidEndPointException();
  final EntityTransaction db=Entities.get(LoadBalancerZone.class);
  try {
    final LoadBalancerZone found=Entities.uniqueResult(LoadBalancerZone.named(lb,this.vmInstance.getPlacement()));
    this.setAvailabilityZone(found);
    db.commit();
  }
 catch (  final NoSuchElementException ex) {
    db.rollback();
  }
catch (  final Exception ex) {
    db.rollback();
    throw new InternalFailure400Exception("String_Node_Str");
  }
 finally {
    if (db.isActive())     db.rollback();
    if (this.zone == null)     throw new InternalFailure400Exception("String_Node_Str");
  }
}
Program: 14293
Project: 14293
Buggy source:
public static LoadBalancerZone findZone(final LoadBalancer lb,final String zoneName){
  final EntityTransaction db=Entities.get(LoadBalancerZone.class);
  try {
    final LoadBalancerZone exist=Entities.uniqueResult(LoadBalancerZone.named(lb,zoneName));
    db.commit();
    return exist;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    throw Exceptions.toUndeclared(ex);
  }
}

Fixed version (ground truth):
public static LoadBalancerZone findZone(final LoadBalancer lb,final String zoneName){
  final EntityTransaction db=Entities.get(LoadBalancerZone.class);
  try {
    final LoadBalancerZone exist=Entities.uniqueResult(LoadBalancerZone.named(lb,zoneName));
    db.commit();
    return exist;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    throw Exceptions.toUndeclared(ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
}
Program: 14294
Project: 14294
Buggy source:
public static LoadBalancerServoInstance lookupServoInstance(final String instanceId) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancerServoInstance.class);
  try {
    LoadBalancerServoInstance sample=LoadBalancerServoInstance.named(instanceId);
    final LoadBalancerServoInstance exist=Entities.uniqueResult(sample);
    db.commit();
    return exist;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str");
  }
}

Fixed version (ground truth):
public static LoadBalancerServoInstance lookupServoInstance(final String instanceId) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancerServoInstance.class);
  try {
    LoadBalancerServoInstance sample=LoadBalancerServoInstance.named(instanceId);
    final LoadBalancerServoInstance exist=Entities.uniqueResult(sample);
    db.commit();
    return exist;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str",ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
}
Program: 14295
Project: 14295
Buggy source:
public static LoadBalancerDnsRecord getDnsRecord(final LoadBalancer lb) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancerDnsRecord.class);
  try {
    LoadBalancerDnsRecord exist=Entities.uniqueResult(LoadBalancerDnsRecord.named(lb));
    db.commit();
    return exist;
  }
 catch (  NoSuchElementException ex) {
    final LoadBalancerDnsRecord newRec=LoadBalancerDnsRecord.named(lb);
    Entities.persist(newRec);
    db.commit();
    return newRec;
  }
catch (  Exception ex) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static LoadBalancerDnsRecord getDnsRecord(final LoadBalancer lb) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancerDnsRecord.class);
  try {
    LoadBalancerDnsRecord exist=Entities.uniqueResult(LoadBalancerDnsRecord.named(lb));
    db.commit();
    return exist;
  }
 catch (  NoSuchElementException ex) {
    final LoadBalancerDnsRecord newRec=LoadBalancerDnsRecord.named(lb);
    Entities.persist(newRec);
    db.commit();
    return newRec;
  }
catch (  Exception ex) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str",ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
}
Program: 14296
Project: 14296
Buggy source:
public static void removeZone(final String lbName,final Context ctx,final Collection<String> zones) throws LoadBalancingException {
  LoadBalancer lb=null;
  try {
    lb=LoadBalancers.getLoadbalancer(ctx,lbName);
  }
 catch (  Exception ex) {
    throw new AccessPointNotFoundException();
  }
  final EntityTransaction db=Entities.get(LoadBalancerZone.class);
  for (  String zone : zones) {
    try {
      final LoadBalancerZone exist=Entities.uniqueResult(LoadBalancerZone.named(lb,zone));
      Entities.delete(exist);
      db.commit();
    }
 catch (    NoSuchElementException ex) {
      db.rollback();
      LOG.debug(String.format("String_Node_Str",zone,lbName));
    }
catch (    Exception ex) {
      db.rollback();
      LOG.error("String_Node_Str" + zone,ex);
    }
  }
}

Fixed version (ground truth):
public static void removeZone(final String lbName,final Context ctx,final Collection<String> zones) throws LoadBalancingException {
  LoadBalancer lb=null;
  try {
    lb=LoadBalancers.getLoadbalancer(ctx,lbName);
  }
 catch (  Exception ex) {
    throw new AccessPointNotFoundException();
  }
  for (  String zone : zones) {
    final EntityTransaction db=Entities.get(LoadBalancerZone.class);
    try {
      final LoadBalancerZone exist=Entities.uniqueResult(LoadBalancerZone.named(lb,zone));
      Entities.delete(exist);
      db.commit();
    }
 catch (    NoSuchElementException ex) {
      db.rollback();
      LOG.debug(String.format("String_Node_Str",zone,lbName));
    }
catch (    Exception ex) {
      db.rollback();
      LOG.error("String_Node_Str" + zone,ex);
    }
 finally {
      if (db.isActive())       db.rollback();
    }
  }
}
Program: 14297
Project: 14297
Buggy source:
private static LoadBalancer getLoadbalancer(final String accountName,final String lbName){
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  LoadBalancer lb=null;
  try {
    lb=Entities.uniqueResult(LoadBalancer.namedByAccount(accountName,lbName));
    db.commit();
    return lb;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    if (lb != null)     return lb;
 else     throw Exceptions.toUndeclared(ex);
  }
}

Fixed version (ground truth):
private static LoadBalancer getLoadbalancer(final String accountName,final String lbName){
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  LoadBalancer lb=null;
  try {
    lb=Entities.uniqueResult(LoadBalancer.namedByAccount(accountName,lbName));
    db.commit();
    return lb;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    if (lb != null)     return lb;
 else     throw Exceptions.toUndeclared(ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
}
Program: 14298
Project: 14298
Buggy source:
public static LoadBalancer addLoadbalancer(UserFullName user,String lbName,String scheme) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  try {
    try {
      if (Entities.uniqueResult(LoadBalancer.namedByAccount(user.getAccountName(),lbName)) != null)       throw new DuplicateAccessPointName();
    }
 catch (    NoSuchElementException e) {
      final LoadBalancer lb=LoadBalancer.newInstance(user,lbName);
      if (scheme != null)       lb.setScheme(scheme);
      Entities.persist(lb);
      db.commit();
      return lb;
    }
  }
 catch (  LoadBalancingException ex) {
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    LOG.error("String_Node_Str",ex);
    throw new LoadBalancingException("String_Node_Str" + ex.getMessage(),ex);
  }
  throw new LoadBalancingException("String_Node_Str");
}

Fixed version (ground truth):
public static LoadBalancer addLoadbalancer(UserFullName user,String lbName,String scheme) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  try {
    try {
      if (Entities.uniqueResult(LoadBalancer.namedByAccount(user.getAccountName(),lbName)) != null)       throw new DuplicateAccessPointName();
    }
 catch (    NoSuchElementException e) {
      final LoadBalancer lb=LoadBalancer.newInstance(user,lbName);
      if (scheme != null)       lb.setScheme(scheme);
      Entities.persist(lb);
      db.commit();
      return lb;
    }
  }
 catch (  LoadBalancingException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    LOG.error("String_Node_Str",ex);
    throw new LoadBalancingException("String_Node_Str" + ex.getMessage(),ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
  throw new LoadBalancingException("String_Node_Str");
}
Program: 14299
Project: 14299
Buggy source:
public static LoadBalancerBackendInstance lookupBackendInstance(final LoadBalancer lb,final String instanceId){
  final EntityTransaction db=Entities.get(LoadBalancerBackendInstance.class);
  try {
    final LoadBalancerBackendInstance found=Entities.uniqueResult(LoadBalancerBackendInstance.named(lb,instanceId));
    db.commit();
    return found;
  }
 catch (  final NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  final Exception ex) {
    db.rollback();
    throw Exceptions.toUndeclared(ex);
  }
}

Fixed version (ground truth):
public static LoadBalancerBackendInstance lookupBackendInstance(final LoadBalancer lb,final String instanceId){
  final EntityTransaction db=Entities.get(LoadBalancerBackendInstance.class);
  try {
    final LoadBalancerBackendInstance found=Entities.uniqueResult(LoadBalancerBackendInstance.named(lb,instanceId));
    db.commit();
    return found;
  }
 catch (  final NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  final Exception ex) {
    db.rollback();
    throw Exceptions.toUndeclared(ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
}
Program: 14300
Project: 14300
Buggy source:
public static void deleteDnsRecord(final LoadBalancerDnsRecord dns) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancerDnsRecord.class);
  try {
    LoadBalancerDnsRecord exist=Entities.uniqueResult(dns);
    Entities.delete(exist);
    db.commit();
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
  }
catch (  Exception ex) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void deleteDnsRecord(final LoadBalancerDnsRecord dns) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancerDnsRecord.class);
  try {
    LoadBalancerDnsRecord exist=Entities.uniqueResult(dns);
    Entities.delete(exist);
    db.commit();
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
  }
catch (  Exception ex) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str",ex);
  }
 finally {
    if (db.isActive())     db.rollback();
  }
}
Program: 14301
Project: 14301
Buggy source:
public GetMetricStatisticsAggregationKey(MetricEntity me,Date startTime,Integer period){
  this.accountId=me.getAccountId();
  this.namespace=me.getNamespace();
  this.metricName=me.getMetricName();
  this.units=me.getUnits();
  this.metricType=me.getMetricType();
  this.timestamp=MetricManager.getPeriodStart(me.getTimestamp(),startTime,period);
  this.dimensionHash=MetricManager.hash(me.getDimensions());
}

Fixed version (ground truth):
public GetMetricStatisticsAggregationKey(MetricEntity me,Date startTime,Integer period,String dimensionHash){
  this.accountId=me.getAccountId();
  this.namespace=me.getNamespace();
  this.metricName=me.getMetricName();
  this.units=me.getUnits();
  this.metricType=me.getMetricType();
  this.timestamp=MetricManager.getPeriodStart(me.getTimestamp(),startTime,period);
  this.dimensionHash=dimensionHash;
}
Program: 14303
Project: 14303
Buggy source:
public MetricStatistics(MetricEntity me,Date startTime,Integer period){
  this.accountId=me.getAccountId();
  this.namespace=me.getNamespace();
  this.metricName=me.getMetricName();
  this.units=me.getUnits();
  this.metricType=me.getMetricType();
  this.timestamp=MetricManager.getPeriodStart(me.getTimestamp(),startTime,period);
  this.sampleSize=me.getSampleSize();
  this.sampleMax=me.getSampleMax();
  this.sampleMin=me.getSampleMin();
  this.sampleSum=me.getSampleSum();
  this.dimensions=me.getDimensions();
}

Fixed version (ground truth):
public MetricStatistics(MetricEntity me,Date startTime,Integer period,Collection<DimensionEntity> dimensions){
  this.accountId=me.getAccountId();
  this.namespace=me.getNamespace();
  this.metricName=me.getMetricName();
  this.units=me.getUnits();
  this.metricType=me.getMetricType();
  this.timestamp=MetricManager.getPeriodStart(me.getTimestamp(),startTime,period);
  this.sampleSize=me.getSampleSize();
  this.sampleMax=me.getSampleMax();
  this.sampleMin=me.getSampleMin();
  this.sampleSum=me.getSampleSum();
  this.dimensions=dimensions;
}
Program: 14304
Project: 14304
Buggy source:
@Override public boolean apply(final Allocation allocInfo){
  try {
    EventRecord.here(ClusterAllocator.class,EventType.VM_PREPARE,LogUtil.dumpObject(allocInfo)).info();
    final ServiceConfiguration config=Topology.lookup(ClusterController.class,allocInfo.getPartition());
    final Callable<Boolean> runnable=new Callable<Boolean>(){
      @Override public Boolean call(){
        try {
          new ClusterAllocator(allocInfo).run();
        }
 catch (        final Exception ex) {
          LOG.warn("String_Node_Str" + allocInfo.getAllocationTokens());
          LOG.error("String_Node_Str" + allocInfo.getAllocationTokens(),ex);
        }
        return Boolean.TRUE;
      }
    }
;
    Threads.enqueue(config,32,runnable);
    return true;
  }
 catch (  final Exception ex) {
    throw Exceptions.toUndeclared(ex);
  }
}

Fixed version (ground truth):
@Override public boolean apply(final Allocation allocInfo){
  try {
    if (EventRecord.isDebugEnabled(ClusterAllocator.class)) {
      EventRecord.here(ClusterAllocator.class,EventType.VM_PREPARE,LogUtil.dumpObject(allocInfo)).debug();
    }
    final ServiceConfiguration config=Topology.lookup(ClusterController.class,allocInfo.getPartition());
    final Callable<Boolean> runnable=new Callable<Boolean>(){
      @Override public Boolean call(){
        try {
          new ClusterAllocator(allocInfo).run();
        }
 catch (        final Exception ex) {
          LOG.warn("String_Node_Str" + allocInfo.getAllocationTokens());
          LOG.error("String_Node_Str" + allocInfo.getAllocationTokens(),ex);
        }
        return Boolean.TRUE;
      }
    }
;
    Threads.enqueue(config,32,runnable);
    return true;
  }
 catch (  final Exception ex) {
    throw Exceptions.toUndeclared(ex);
  }
}
Program: 14306
Project: 14306
Buggy source:
private void teardown(Throwable t){
  if (t == null) {
    t=new NullPointerException("String_Node_Str");
  }
  try {
    this.logRequestFailure(t);
    if (this.connectFuture != null) {
      this.maybeCloseChannel();
    }
  }
  finally {
    this.response.setException(t);
  }
}

Fixed version (ground truth):
private void teardown(Throwable t){
  if (t == null) {
    t=new NullPointerException("String_Node_Str");
  }
  this.logRequestFailure(t);
  this.response.setException(t);
  if (this.connectFuture != null) {
    this.maybeCloseChannel();
  }
}
Program: 14308
Project: 14308
Buggy source:
private void teardown(Throwable t){
  if (t == null) {
    t=new NullPointerException("String_Node_Str");
  }
  try {
    this.logRequestFailure(t);
    if (this.connectFuture != null) {
      this.maybeCloseChannel();
    }
  }
  finally {
    this.response.setException(t);
  }
}

Fixed version (ground truth):
private void teardown(Throwable t){
  if (t == null) {
    t=new NullPointerException("String_Node_Str");
  }
  this.logRequestFailure(t);
  this.response.setException(t);
  if (this.connectFuture != null) {
    this.maybeCloseChannel();
  }
}
Program: 14310
Project: 14310
Buggy source:
static LoadBalancer named(final OwnerFullName userName,final String lbName){
  return new LoadBalancer(userName,lbName);
}

Fixed version (ground truth):
static LoadBalancer named(final String accountName,final String lbName){
  final LoadBalancer instance=new LoadBalancer(lbName);
  instance.setOwnerAccountName(accountName);
  return instance;
}
Program: 14311
Project: 14311
Buggy source:
@Override public String getPartition(){
  String localPartition=null;
  List<RunningInstancesItemType> instances=EucalyptusActivityTasks.getInstance().describeInstances(Lists.newArrayList(this.vmInstance.getInstanceId()));
  for (  RunningInstancesItemType instance : instances) {
    localPartition=instance.getPlacement();
    break;
  }
  return localPartition != null ? localPartition : null;
}

Fixed version (ground truth):
@Override public String getPartition(){
  if (this.partition != null)   return this.partition;
 else {
    String localPartition=null;
    List<RunningInstancesItemType> instances=EucalyptusActivityTasks.getInstance().describeUserInstances(this.loadbalancer.getOwnerUserId(),Lists.newArrayList(this.vmInstance.getInstanceId()));
    for (    RunningInstancesItemType instance : instances) {
      localPartition=instance.getPlacement();
      break;
    }
    return localPartition != null ? localPartition : null;
  }
}
Program: 14312
Project: 14312
Buggy source:
private LoadBalancerBackendInstance(final OwnerFullName userFullName,final LoadBalancer lb,final String vmId){
  super(userFullName,vmId);
  this.loadbalancer=lb;
  this.setState(STATE.OutOfService);
  List<RunningInstancesItemType> instanceIds=EucalyptusActivityTasks.getInstance().describeInstances(Lists.newArrayList(vmId));
  for (  RunningInstancesItemType instance : instanceIds) {
    if (instance.getInstanceId().equals(vmId)) {
      this.vmInstance=instance;
      break;
    }
  }
  if (this.vmInstance == null)   throw new IllegalArgumentException("String_Node_Str" + vmId);
  final EntityTransaction db=Entities.get(LoadBalancerBackendInstance.class);
  try {
    final LoadBalancerZone found=Entities.uniqueResult(LoadBalancerZone.named(lb,this.vmInstance.getPlacement()));
    this.setAvailabilityZone(found);
    db.commit();
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
  }
catch (  Exception ex) {
    db.rollback();
  }
 finally {
    if (this.zone == null)     throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
private LoadBalancerBackendInstance(final OwnerFullName userFullName,final LoadBalancer lb,final String vmId){
  super(userFullName,vmId);
  this.loadbalancer=lb;
  this.setState(STATE.OutOfService);
  List<RunningInstancesItemType> instanceIds=EucalyptusActivityTasks.getInstance().describeUserInstances(userFullName.getUserId(),Lists.newArrayList(vmId));
  for (  RunningInstancesItemType instance : instanceIds) {
    if (instance.getInstanceId().equals(vmId) && instance.getStateName().equals("String_Node_Str")) {
      this.vmInstance=instance;
      this.partition=instance.getPlacement();
      break;
    }
  }
  if (this.vmInstance == null)   throw new IllegalArgumentException("String_Node_Str" + vmId);
  final EntityTransaction db=Entities.get(LoadBalancerBackendInstance.class);
  try {
    final LoadBalancerZone found=Entities.uniqueResult(LoadBalancerZone.named(lb,this.vmInstance.getPlacement()));
    this.setAvailabilityZone(found);
    db.commit();
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
  }
catch (  Exception ex) {
    db.rollback();
  }
 finally {
    if (this.zone == null)     throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 14313
Project: 14313
Buggy source:
protected String createUniqueName(){
  return String.format("String_Node_Str",this.loadbalancer.getDisplayName(),this.getDnsName());
}

Fixed version (ground truth):
protected String createUniqueName(){
  return String.format("String_Node_Str",this.loadbalancer.getOwnerAccountNumber(),this.loadbalancer.getDisplayName(),this.getDnsName());
}
Program: 14314
Project: 14314
Buggy source:
public static LoadBalancerListener named(final LoadBalancer lb,int lbPort){
  LoadBalancerListener newInstance=new LoadBalancerListener();
  newInstance.loadbalancer=lb;
  newInstance.loadbalancerPort=lbPort;
  return newInstance;
}

Fixed version (ground truth):
public static LoadBalancerListener named(final LoadBalancer lb,int lbPort){
  LoadBalancerListener newInstance=new LoadBalancerListener();
  newInstance.loadbalancer=lb;
  newInstance.loadbalancerPort=lbPort;
  newInstance.uniqueName=newInstance.createUniqueName();
  return newInstance;
}
Program: 14315
Project: 14315
Buggy source:
private String createUniqueName(){
  return String.format("String_Node_Str",this.loadbalancer,this.groupName);
}

Fixed version (ground truth):
private String createUniqueName(){
  return String.format("String_Node_Str",this.loadbalancer.getOwnerAccountNumber(),this.loadbalancer.getDisplayName(),this.groupName);
}
Program: 14316
Project: 14316
Buggy source:
protected String createUniqueName(){
  return String.format("String_Node_Str",this.loadbalancer.getDisplayName(),this.zoneName);
}

Fixed version (ground truth):
protected String createUniqueName(){
  return String.format("String_Node_Str",this.loadbalancer.getOwnerAccountNumber(),this.loadbalancer.getDisplayName(),this.zoneName);
}
Program: 14317
Project: 14317
Buggy source:
public static LoadBalancer getLoadbalancer(UserFullName user,String lbName){
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  try {
    final LoadBalancer lb=Entities.uniqueResult(LoadBalancer.named(user,lbName));
    db.commit();
    return lb;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    LOG.error("String_Node_Str" + lbName,ex);
    throw Exceptions.toUndeclared(ex);
  }
}

Fixed version (ground truth):
public static LoadBalancer getLoadbalancer(UserFullName user,String lbName){
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  try {
    final LoadBalancer lb=Entities.uniqueResult(LoadBalancer.named(user.getAccountName(),lbName));
    db.commit();
    return lb;
  }
 catch (  NoSuchElementException ex) {
    db.rollback();
    throw ex;
  }
catch (  Exception ex) {
    db.rollback();
    LOG.error("String_Node_Str" + lbName,ex);
    throw Exceptions.toUndeclared(ex);
  }
}
Program: 14318
Project: 14318
Buggy source:
public static void deleteLoadbalancer(UserFullName user,String lbName) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  try {
    final LoadBalancer lb=Entities.uniqueResult(LoadBalancer.named(user,lbName));
    Entities.delete(lb);
    db.commit();
  }
 catch (  NoSuchElementException e) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str" + lbName,e);
  }
catch (  Exception e) {
    db.rollback();
    LOG.error("String_Node_Str",e);
    throw new LoadBalancingException("String_Node_Str" + lbName,e);
  }
}

Fixed version (ground truth):
public static void deleteLoadbalancer(UserFullName user,String lbName) throws LoadBalancingException {
  final EntityTransaction db=Entities.get(LoadBalancer.class);
  try {
    final LoadBalancer lb=Entities.uniqueResult(LoadBalancer.named(user.getAccountName(),lbName));
    Entities.delete(lb);
    db.commit();
  }
 catch (  NoSuchElementException e) {
    db.rollback();
    throw new LoadBalancingException("String_Node_Str" + lbName,e);
  }
catch (  Exception e) {
    db.rollback();
    LOG.error("String_Node_Str",e);
    throw new LoadBalancingException("String_Node_Str" + lbName,e);
  }
}