Program: 14687
Project: 14687
Buggy source:
public DeleteSnapshotResponseType delete(final DeleteSnapshotType request) throws EucalyptusCloudException {
  final DeleteSnapshotResponseType reply=(DeleteSnapshotResponseType)request.getReply();
  final Context ctx=Contexts.lookup();
  boolean result=false;
  try {
    result=Transactions.delete(Snapshot.named(ctx.getUserFullName(),request.getSnapshotId()),new Predicate<Snapshot>(){
      @Override public boolean apply(      Snapshot snap){
        if (!State.EXTANT.equals(snap.getState())) {
          return false;
        }
 else         if (!RestrictedTypes.filterPrivileged().apply(snap)) {
          throw Exceptions.toUndeclared("String_Node_Str" + request.getSnapshotId() + "String_Node_Str"+ ctx.getUser().getName(),new EucalyptusCloudException());
        }
 else {
          ServiceConfiguration sc=Partitions.lookupService(Storage.class,snap.getVolumePartition());
          try {
            DeleteStorageSnapshotResponseType scReply=ServiceDispatcher.lookup(sc).send(new DeleteStorageSnapshotType(snap.getDisplayName()));
            if (scReply.get_return()) {
              final DeleteStorageSnapshotType deleteMsg=new DeleteStorageSnapshotType(snap.getDisplayName());
              Iterables.any(Topology.enabledServices(Storage.class),new Predicate<ServiceConfiguration>(){
                @Override public boolean apply(                ServiceConfiguration arg0){
                  ServiceDispatcher.lookup(arg0).dispatch(deleteMsg);
                  return true;
                }
              }
);
              try {
                ListenerRegistry.getInstance().fireEvent(new StorageEvent(StorageEvent.EventType.EbsSnapshot,false,snap.getVolumeSize(),snap.getOwnerUserId(),snap.getOwnerUserName(),snap.getOwnerAccountNumber(),snap.getOwnerAccountName(),snap.getVolumeCluster(),snap.getVolumePartition()));
              }
 catch (              EventFailedException ex) {
                LOG.error(ex,ex);
              }
            }
 else {
              throw Exceptions.toUndeclared("String_Node_Str" + snap,new EucalyptusCloudException());
            }
          }
 catch (          EucalyptusCloudException ex1) {
            throw Exceptions.toUndeclared(ex1.getMessage(),ex1);
          }
          return true;
        }
      }
    }
);
  }
 catch (  ExecutionException ex1) {
    throw new EucalyptusCloudException(ex1.getCause());
  }
  reply.set_return(result);
  return reply;
}

Fixed version (ground truth):
public DeleteSnapshotResponseType delete(final DeleteSnapshotType request) throws EucalyptusCloudException {
  final DeleteSnapshotResponseType reply=(DeleteSnapshotResponseType)request.getReply();
  final Context ctx=Contexts.lookup();
  boolean result=false;
  try {
    result=Transactions.delete(Snapshot.named(ctx.getUserFullName(),request.getSnapshotId()),new Predicate<Snapshot>(){
      @Override public boolean apply(      Snapshot snap){
        if (!State.EXTANT.equals(snap.getState())) {
          return false;
        }
 else         if (!RestrictedTypes.filterPrivileged().apply(snap)) {
          throw Exceptions.toUndeclared("String_Node_Str" + request.getSnapshotId() + "String_Node_Str"+ ctx.getUser().getName(),new EucalyptusCloudException());
        }
 else {
          ServiceConfiguration sc=Topology.lookup(Storage.class,Partitions.lookupByName(snap.getPartition()));
          try {
            DeleteStorageSnapshotResponseType scReply=ServiceDispatcher.lookup(sc).send(new DeleteStorageSnapshotType(snap.getDisplayName()));
            if (scReply.get_return()) {
              final DeleteStorageSnapshotType deleteMsg=new DeleteStorageSnapshotType(snap.getDisplayName());
              Iterables.any(Topology.enabledServices(Storage.class),new Predicate<ServiceConfiguration>(){
                @Override public boolean apply(                ServiceConfiguration arg0){
                  ServiceDispatcher.lookup(arg0).dispatch(deleteMsg);
                  return true;
                }
              }
);
              try {
                ListenerRegistry.getInstance().fireEvent(new StorageEvent(StorageEvent.EventType.EbsSnapshot,false,snap.getVolumeSize(),snap.getOwnerUserId(),snap.getOwnerUserName(),snap.getOwnerAccountNumber(),snap.getOwnerAccountName(),snap.getVolumeCluster(),snap.getVolumePartition()));
              }
 catch (              EventFailedException ex) {
                LOG.error(ex,ex);
              }
            }
 else {
              throw Exceptions.toUndeclared("String_Node_Str" + snap,new EucalyptusCloudException());
            }
          }
 catch (          EucalyptusCloudException ex1) {
            throw Exceptions.toUndeclared(ex1.getMessage(),ex1);
          }
          return true;
        }
      }
    }
);
  }
 catch (  ExecutionException ex1) {
    throw new EucalyptusCloudException(ex1.getCause());
  }
  reply.set_return(result);
  return reply;
}