Program: 14779
Project: 14779
Buggy source:
public PutObjectResponseType putObject(PutObjectType request) throws EucalyptusCloudException {
  PutObjectResponseType reply=(PutObjectResponseType)request.getReply();
  Context ctx=Contexts.lookup();
  Account account=ctx.getAccount();
  String bucketName=request.getBucket();
  String objectKey=request.getKey();
  Long oldBucketSize=0L;
  String md5="String_Node_Str";
  Date lastModified=null;
  AccessControlListType accessControlList=request.getAccessControlList();
  if (accessControlList == null) {
    accessControlList=new AccessControlListType();
  }
  String key=bucketName + "String_Node_Str" + objectKey;
  String randomKey=request.getRandomKey();
  WalrusDataMessenger messenger=WalrusRESTBinding.getWriteMessenger();
  EntityWrapper<BucketInfo> db=EntityWrapper.get(BucketInfo.class);
  BucketInfo bucketInfo=new BucketInfo(bucketName);
  List<BucketInfo> bucketList=db.query(bucketInfo);
  if (bucketList.size() > 0) {
    BucketInfo bucket=bucketList.get(0);
    BucketLogData logData=bucket.getLoggingEnabled() ? request.getLogData() : null;
    long objSize=0;
    try {
      objSize=Long.valueOf(request.getContentLength());
    }
 catch (    NumberFormatException e) {
      LOG.error("String_Node_Str" + request.getContentLength());
      objSize=1L;
    }
    if (ctx.hasAdministrativePrivileges() || (bucket.canWrite(account.getAccountNumber()) && (bucket.isGlobalWrite() || Lookups.checkPrivilege(PolicySpec.S3_PUTOBJECT,PolicySpec.VENDOR_S3,PolicySpec.S3_RESOURCE_BUCKET,bucketName,null)))) {
      if (logData != null)       reply.setLogData(logData);
      String objectName;
      String versionId;
      ObjectInfo objectInfo=null;
      if (bucket.isVersioningEnabled()) {
        objectInfo=new ObjectInfo(bucketName,objectKey);
        objectInfo.setOwnerId(account.getAccountNumber());
        List<GrantInfo> grantInfos=new ArrayList<GrantInfo>();
        objectInfo.addGrants(account.getAccountNumber(),grantInfos,accessControlList);
        objectInfo.setGrants(grantInfos);
        objectName=UUID.randomUUID().toString();
        objectInfo.setObjectName(objectName);
        objectInfo.setSize(0L);
        versionId=UUID.randomUUID().toString().replaceAll("String_Node_Str","String_Node_Str");
      }
 else {
        versionId=WalrusProperties.NULL_VERSION_ID;
        ObjectInfo searchObject=new ObjectInfo(bucketName,objectKey);
        searchObject.setVersionId(versionId);
        EntityWrapper<ObjectInfo> dbObject=db.recast(ObjectInfo.class);
        try {
          ObjectInfo foundObject=dbObject.getUnique(searchObject);
          if (!foundObject.canWrite(account.getAccountNumber())) {
            db.rollback();
            messenger.removeQueue(key,randomKey);
            throw new AccessDeniedException("String_Node_Str",objectKey,logData);
          }
          objectName=foundObject.getObjectName();
        }
 catch (        AccessDeniedException ex) {
          throw ex;
        }
catch (        EucalyptusCloudException ex) {
          objectInfo=new ObjectInfo(bucketName,objectKey);
          objectInfo.setOwnerId(account.getAccountNumber());
          List<GrantInfo> grantInfos=new ArrayList<GrantInfo>();
          objectInfo.addGrants(account.getAccountNumber(),grantInfos,accessControlList);
          objectInfo.setGrants(grantInfos);
          objectName=UUID.randomUUID().toString();
          objectInfo.setObjectName(objectName);
          objectInfo.setSize(0L);
        }
      }
      if (bucket.isVersioningEnabled()) {
        reply.setVersionId(versionId);
      }
      db.commit();
      WalrusDataQueue<WalrusDataMessage> putQueue=messenger.getQueue(key,randomKey);
      try {
        WalrusDataMessage dataMessage;
        String tempObjectName=objectName;
        MessageDigest digest=null;
        long size=0;
        FileIO fileIO=null;
        while ((dataMessage=putQueue.take()) != null) {
          if (putQueue.getInterrupted()) {
            if (WalrusDataMessage.isEOF(dataMessage)) {
              WalrusMonitor monitor=messenger.getMonitor(key);
              if (monitor.getLastModified() == null) {
synchronized (monitor) {
                  monitor.wait();
                }
              }
              lastModified=monitor.getLastModified();
              md5=monitor.getMd5();
              if (fileIO != null)               fileIO.finish();
              ObjectDeleter objectDeleter=new ObjectDeleter(bucketName,tempObjectName,-1L,ctx.getUser().getName(),ctx.getUser().getUserId(),ctx.getAccount().getName(),ctx.getAccount().getAccountNumber());
              Threads.lookup(Walrus.class,WalrusManager.ObjectDeleter.class).limitTo(10).submit(objectDeleter);
              LOG.info("String_Node_Str" + key);
              messenger.removeQueue(key,randomKey);
              break;
            }
            continue;
          }
          if (WalrusDataMessage.isStart(dataMessage)) {
            tempObjectName=UUID.randomUUID().toString();
            digest=Digest.MD5.get();
            try {
              fileIO=storageManager.prepareForWrite(bucketName,tempObjectName);
            }
 catch (            Exception ex) {
              messenger.removeQueue(key,randomKey);
              throw new EucalyptusCloudException(ex);
            }
          }
 else           if (WalrusDataMessage.isEOF(dataMessage)) {
            if (digest != null)             md5=Hashes.bytesToHex(digest.digest());
            String contentMD5=request.getContentMD5();
            if (contentMD5 != null) {
              String contentMD5AsHex=Hashes.bytesToHex(Base64.decode(contentMD5));
              if (!contentMD5AsHex.equals(md5)) {
                if (fileIO != null)                 fileIO.finish();
                ObjectDeleter objectDeleter=new ObjectDeleter(bucketName,tempObjectName,-1L,ctx.getUser().getName(),ctx.getUser().getUserId(),ctx.getAccount().getName(),ctx.getAccount().getAccountNumber());
                Threads.lookup(Walrus.class,WalrusManager.ObjectDeleter.class).limitTo(10).submit(objectDeleter);
                messenger.removeQueue(key,randomKey);
                throw new ContentMismatchException(bucketName + "String_Node_Str" + objectName);
              }
            }
            try {
              if (fileIO != null)               fileIO.finish();
              storageManager.renameObject(bucketName,tempObjectName,objectName);
            }
 catch (            IOException ex) {
              LOG.error(ex);
              messenger.removeQueue(key,randomKey);
              throw new EucalyptusCloudException(objectKey);
            }
            lastModified=new Date();
            ObjectInfo searchObject=new ObjectInfo(bucketName,objectKey);
            searchObject.setVersionId(versionId);
            EntityWrapper<ObjectInfo> dbObject=EntityWrapper.get(ObjectInfo.class);
            List<ObjectInfo> objectInfos=dbObject.query(new ObjectInfo(bucketName,objectKey));
            for (            ObjectInfo objInfo : objectInfos) {
              objInfo.setLast(false);
            }
            ObjectInfo foundObject;
            try {
              foundObject=dbObject.getUnique(searchObject);
              if (ctx.hasAdministrativePrivileges() || foundObject.canWriteACP(account.getAccountNumber())) {
                List<GrantInfo> grantInfos=new ArrayList<GrantInfo>();
                foundObject.addGrants(account.getAccountNumber(),grantInfos,accessControlList);
                foundObject.setGrants(grantInfos);
              }
              if (WalrusProperties.enableTorrents) {
                EntityWrapper<TorrentInfo> dbTorrent=dbObject.recast(TorrentInfo.class);
                TorrentInfo torrentInfo=new TorrentInfo(bucketName,objectKey);
                List<TorrentInfo> torrentInfos=dbTorrent.query(torrentInfo);
                if (torrentInfos.size() > 0) {
                  TorrentInfo foundTorrentInfo=torrentInfos.get(0);
                  TorrentClient torrentClient=Torrents.getClient(bucketName + objectKey);
                  if (torrentClient != null) {
                    torrentClient.bye();
                  }
                  dbTorrent.delete(foundTorrentInfo);
                }
              }
 else {
                LOG.warn("String_Node_Str");
              }
            }
 catch (            EucalyptusCloudException ex) {
              if (objectInfo != null) {
                foundObject=objectInfo;
              }
 else {
                db.rollback();
                throw new EucalyptusCloudException("String_Node_Str" + bucketName + "String_Node_Str"+ objectKey);
              }
            }
            foundObject.setVersionId(versionId);
            foundObject.replaceMetaData(request.getMetaData());
            foundObject.setEtag(md5);
            foundObject.setSize(size);
            foundObject.setLastModified(lastModified);
            foundObject.setStorageClass("String_Node_Str");
            foundObject.setContentType(request.getContentType());
            foundObject.setContentDisposition(request.getContentDisposition());
            foundObject.setLast(true);
            foundObject.setDeleted(false);
            reply.setSize(size);
            ObjectInfo deleteMarker=new ObjectInfo(bucketName,objectKey);
            deleteMarker.setDeleted(true);
            try {
              ObjectInfo foundDeleteMarker=dbObject.getUnique(deleteMarker);
              dbObject.delete(foundDeleteMarker);
            }
 catch (            EucalyptusCloudException ex) {
              LOG.trace("String_Node_Str" + bucketName + "String_Node_Str"+ objectKey);
            }
            if (!ctx.hasAdministrativePrivileges() && !Permissions.canAllocate(PolicySpec.VENDOR_S3,PolicySpec.S3_RESOURCE_OBJECT,bucketName,PolicySpec.S3_PUTOBJECT,ctx.getUser(),oldBucketSize + size)) {
              dbObject.rollback();
              LOG.error("String_Node_Str");
              throw new EntityTooLargeException("String_Node_Str",objectKey);
            }
            boolean success=false;
            int retryCount=0;
            do {
              try {
                incrementBucketSize(bucketName,objectKey,oldBucketSize,size);
                success=true;
              }
 catch (              EntityTooLargeException ex) {
                messenger.removeQueue(key,randomKey);
                dbObject.rollback();
                throw ex;
              }
catch (              NoSuchBucketException ex) {
                dbObject.rollback();
                throw ex;
              }
catch (              RollbackException ex) {
                retryCount++;
                LOG.trace("String_Node_Str" + bucketName);
              }
catch (              EucalyptusCloudException ex) {
                dbObject.rollback();
                throw ex;
              }
            }
 while (!success && (retryCount < 5));
            if (WalrusProperties.trackUsageStatistics) {
              walrusStatistics.updateBytesIn(size);
              walrusStatistics.updateSpaceUsed(size);
            }
            if (logData != null) {
              logData.setObjectSize(size);
              updateLogData(bucket,logData);
            }
            if (objectInfo != null)             dbObject.add(foundObject);
            dbObject.commit();
            if (logData != null) {
              logData.setTurnAroundTime(Long.parseLong(new String(dataMessage.getPayload())));
            }
            WalrusMonitor monitor=messenger.getMonitor(key);
synchronized (monitor) {
              monitor.setLastModified(lastModified);
              monitor.setMd5(md5);
              monitor.notifyAll();
            }
            messenger.removeMonitor(key);
            messenger.removeQueue(key,randomKey);
            LOG.info("String_Node_Str" + key);
            QueueSender queueSender=QueueFactory.getInstance().getSender(QueueIdentifier.S3);
            queueSender.send(new S3Event(true,size / WalrusProperties.M,ctx.getUser().getUserId(),ctx.getUser().getName(),ctx.getAccount().getAccountNumber(),ctx.getAccount().getName()));
            break;
          }
 else {
            assert(WalrusDataMessage.isData(dataMessage));
            byte[] data=dataMessage.getPayload();
            try {
              if (fileIO != null)               fileIO.write(data);
            }
 catch (            IOException ex) {
              LOG.error(ex);
            }
            size+=data.length;
            if (digest != null)             digest.update(data);
          }
        }
      }
 catch (      InterruptedException ex) {
        LOG.error(ex,ex);
        messenger.removeQueue(key,randomKey);
        throw new EucalyptusCloudException("String_Node_Str" + key + "String_Node_Str"+ randomKey);
      }
    }
 else {
      db.rollback();
      messenger.removeQueue(key,randomKey);
      throw new AccessDeniedException("String_Node_Str",bucketName,logData);
    }
  }
 else {
    db.rollback();
    messenger.removeQueue(key,randomKey);
    throw new NoSuchBucketException(bucketName);
  }
  reply.setEtag(md5);
  reply.setLastModified(DateUtils.format(lastModified.getTime(),DateUtils.ISO8601_DATETIME_PATTERN) + "String_Node_Str");
  return reply;
}

Fixed version (ground truth):
public PutObjectResponseType putObject(PutObjectType request) throws EucalyptusCloudException {
  PutObjectResponseType reply=(PutObjectResponseType)request.getReply();
  Context ctx=Contexts.lookup();
  Account account=ctx.getAccount();
  String bucketName=request.getBucket();
  String objectKey=request.getKey();
  Long oldBucketSize=0L;
  String md5="String_Node_Str";
  Date lastModified=null;
  AccessControlListType accessControlList=request.getAccessControlList();
  if (accessControlList == null) {
    accessControlList=new AccessControlListType();
  }
  String key=bucketName + "String_Node_Str" + objectKey;
  String randomKey=request.getRandomKey();
  WalrusDataMessenger messenger=WalrusRESTBinding.getWriteMessenger();
  EntityWrapper<BucketInfo> db=EntityWrapper.get(BucketInfo.class);
  BucketInfo bucketInfo=new BucketInfo(bucketName);
  List<BucketInfo> bucketList=db.query(bucketInfo);
  if (bucketList.size() > 0) {
    BucketInfo bucket=bucketList.get(0);
    BucketLogData logData=bucket.getLoggingEnabled() ? request.getLogData() : null;
    long objSize=0;
    try {
      objSize=Long.valueOf(request.getContentLength());
    }
 catch (    NumberFormatException e) {
      LOG.error("String_Node_Str" + request.getContentLength());
      objSize=1L;
    }
    if (ctx.hasAdministrativePrivileges() || (bucket.canWrite(account.getAccountNumber()) && (bucket.isGlobalWrite() || Lookups.checkPrivilege(PolicySpec.S3_PUTOBJECT,PolicySpec.VENDOR_S3,PolicySpec.S3_RESOURCE_BUCKET,bucketName,null)))) {
      if (logData != null)       reply.setLogData(logData);
      String objectName;
      String versionId;
      ObjectInfo objectInfo=null;
      if (bucket.isVersioningEnabled()) {
        objectInfo=new ObjectInfo(bucketName,objectKey);
        objectInfo.setOwnerId(account.getAccountNumber());
        List<GrantInfo> grantInfos=new ArrayList<GrantInfo>();
        objectInfo.addGrants(account.getAccountNumber(),grantInfos,accessControlList);
        objectInfo.setGrants(grantInfos);
        objectName=UUID.randomUUID().toString();
        objectInfo.setObjectName(objectName);
        objectInfo.setSize(0L);
        versionId=UUID.randomUUID().toString().replaceAll("String_Node_Str","String_Node_Str");
      }
 else {
        versionId=WalrusProperties.NULL_VERSION_ID;
        ObjectInfo searchObject=new ObjectInfo(bucketName,objectKey);
        searchObject.setVersionId(versionId);
        EntityWrapper<ObjectInfo> dbObject=db.recast(ObjectInfo.class);
        try {
          ObjectInfo foundObject=dbObject.getUnique(searchObject);
          if (!foundObject.canWrite(account.getAccountNumber())) {
            db.rollback();
            messenger.removeQueue(key,randomKey);
            throw new AccessDeniedException("String_Node_Str",objectKey,logData);
          }
          objectName=foundObject.getObjectName();
        }
 catch (        AccessDeniedException ex) {
          throw ex;
        }
catch (        EucalyptusCloudException ex) {
          objectInfo=new ObjectInfo(bucketName,objectKey);
          objectInfo.setOwnerId(account.getAccountNumber());
          List<GrantInfo> grantInfos=new ArrayList<GrantInfo>();
          objectInfo.addGrants(account.getAccountNumber(),grantInfos,accessControlList);
          objectInfo.setGrants(grantInfos);
          objectName=UUID.randomUUID().toString();
          objectInfo.setObjectName(objectName);
          objectInfo.setSize(0L);
        }
      }
      if (bucket.isVersioningEnabled()) {
        reply.setVersionId(versionId);
      }
      db.commit();
      WalrusDataQueue<WalrusDataMessage> putQueue=messenger.getQueue(key,randomKey);
      try {
        WalrusDataMessage dataMessage;
        String tempObjectName=objectName;
        MessageDigest digest=null;
        long size=0;
        FileIO fileIO=null;
        while ((dataMessage=putQueue.take()) != null) {
          if (putQueue.getInterrupted()) {
            if (WalrusDataMessage.isEOF(dataMessage)) {
              WalrusMonitor monitor=messenger.getMonitor(key);
              if (monitor.getLastModified() == null) {
synchronized (monitor) {
                  monitor.wait();
                }
              }
              lastModified=monitor.getLastModified();
              md5=monitor.getMd5();
              if (fileIO != null)               fileIO.finish();
              ObjectDeleter objectDeleter=new ObjectDeleter(bucketName,tempObjectName,-1L,ctx.getUser().getName(),ctx.getUser().getUserId(),ctx.getAccount().getName(),ctx.getAccount().getAccountNumber());
              Threads.lookup(Walrus.class,WalrusManager.ObjectDeleter.class).limitTo(10).submit(objectDeleter);
              LOG.info("String_Node_Str" + key);
              messenger.removeQueue(key,randomKey);
              break;
            }
            continue;
          }
          if (WalrusDataMessage.isStart(dataMessage)) {
            tempObjectName=UUID.randomUUID().toString();
            digest=Digest.MD5.get();
            try {
              fileIO=storageManager.prepareForWrite(bucketName,tempObjectName);
            }
 catch (            Exception ex) {
              messenger.removeQueue(key,randomKey);
              throw new EucalyptusCloudException(ex);
            }
          }
 else           if (WalrusDataMessage.isEOF(dataMessage)) {
            if (digest != null)             md5=Hashes.bytesToHex(digest.digest());
            String contentMD5=request.getContentMD5();
            if (contentMD5 != null) {
              String contentMD5AsHex=Hashes.bytesToHex(Base64.decode(contentMD5));
              if (!contentMD5AsHex.equals(md5)) {
                if (fileIO != null)                 fileIO.finish();
                ObjectDeleter objectDeleter=new ObjectDeleter(bucketName,tempObjectName,-1L,ctx.getUser().getName(),ctx.getUser().getUserId(),ctx.getAccount().getName(),ctx.getAccount().getAccountNumber());
                Threads.lookup(Walrus.class,WalrusManager.ObjectDeleter.class).limitTo(10).submit(objectDeleter);
                messenger.removeQueue(key,randomKey);
                throw new ContentMismatchException(bucketName + "String_Node_Str" + objectKey);
              }
            }
            try {
              if (fileIO != null)               fileIO.finish();
              storageManager.renameObject(bucketName,tempObjectName,objectName);
            }
 catch (            IOException ex) {
              LOG.error(ex);
              messenger.removeQueue(key,randomKey);
              throw new EucalyptusCloudException(objectKey);
            }
            lastModified=new Date();
            ObjectInfo searchObject=new ObjectInfo(bucketName,objectKey);
            searchObject.setVersionId(versionId);
            EntityWrapper<ObjectInfo> dbObject=EntityWrapper.get(ObjectInfo.class);
            List<ObjectInfo> objectInfos=dbObject.query(new ObjectInfo(bucketName,objectKey));
            for (            ObjectInfo objInfo : objectInfos) {
              objInfo.setLast(false);
            }
            ObjectInfo foundObject;
            try {
              foundObject=dbObject.getUnique(searchObject);
              if (ctx.hasAdministrativePrivileges() || foundObject.canWriteACP(account.getAccountNumber())) {
                List<GrantInfo> grantInfos=new ArrayList<GrantInfo>();
                foundObject.addGrants(account.getAccountNumber(),grantInfos,accessControlList);
                foundObject.setGrants(grantInfos);
              }
              if (WalrusProperties.enableTorrents) {
                EntityWrapper<TorrentInfo> dbTorrent=dbObject.recast(TorrentInfo.class);
                TorrentInfo torrentInfo=new TorrentInfo(bucketName,objectKey);
                List<TorrentInfo> torrentInfos=dbTorrent.query(torrentInfo);
                if (torrentInfos.size() > 0) {
                  TorrentInfo foundTorrentInfo=torrentInfos.get(0);
                  TorrentClient torrentClient=Torrents.getClient(bucketName + objectKey);
                  if (torrentClient != null) {
                    torrentClient.bye();
                  }
                  dbTorrent.delete(foundTorrentInfo);
                }
              }
 else {
                LOG.warn("String_Node_Str");
              }
            }
 catch (            EucalyptusCloudException ex) {
              if (objectInfo != null) {
                foundObject=objectInfo;
              }
 else {
                db.rollback();
                throw new EucalyptusCloudException("String_Node_Str" + bucketName + "String_Node_Str"+ objectKey);
              }
            }
            foundObject.setVersionId(versionId);
            foundObject.replaceMetaData(request.getMetaData());
            foundObject.setEtag(md5);
            foundObject.setSize(size);
            foundObject.setLastModified(lastModified);
            foundObject.setStorageClass("String_Node_Str");
            foundObject.setContentType(request.getContentType());
            foundObject.setContentDisposition(request.getContentDisposition());
            foundObject.setLast(true);
            foundObject.setDeleted(false);
            reply.setSize(size);
            ObjectInfo deleteMarker=new ObjectInfo(bucketName,objectKey);
            deleteMarker.setDeleted(true);
            try {
              ObjectInfo foundDeleteMarker=dbObject.getUnique(deleteMarker);
              dbObject.delete(foundDeleteMarker);
            }
 catch (            EucalyptusCloudException ex) {
              LOG.trace("String_Node_Str" + bucketName + "String_Node_Str"+ objectKey);
            }
            if (!ctx.hasAdministrativePrivileges() && !Permissions.canAllocate(PolicySpec.VENDOR_S3,PolicySpec.S3_RESOURCE_OBJECT,bucketName,PolicySpec.S3_PUTOBJECT,ctx.getUser(),oldBucketSize + size)) {
              dbObject.rollback();
              LOG.error("String_Node_Str");
              throw new EntityTooLargeException("String_Node_Str",objectKey);
            }
            boolean success=false;
            int retryCount=0;
            do {
              try {
                incrementBucketSize(bucketName,objectKey,oldBucketSize,size);
                success=true;
              }
 catch (              EntityTooLargeException ex) {
                messenger.removeQueue(key,randomKey);
                dbObject.rollback();
                throw ex;
              }
catch (              NoSuchBucketException ex) {
                dbObject.rollback();
                throw ex;
              }
catch (              RollbackException ex) {
                retryCount++;
                LOG.trace("String_Node_Str" + bucketName);
              }
catch (              EucalyptusCloudException ex) {
                dbObject.rollback();
                throw ex;
              }
            }
 while (!success && (retryCount < 5));
            if (WalrusProperties.trackUsageStatistics) {
              walrusStatistics.updateBytesIn(size);
              walrusStatistics.updateSpaceUsed(size);
            }
            if (logData != null) {
              logData.setObjectSize(size);
              updateLogData(bucket,logData);
            }
            if (objectInfo != null)             dbObject.add(foundObject);
            dbObject.commit();
            if (logData != null) {
              logData.setTurnAroundTime(Long.parseLong(new String(dataMessage.getPayload())));
            }
            WalrusMonitor monitor=messenger.getMonitor(key);
synchronized (monitor) {
              monitor.setLastModified(lastModified);
              monitor.setMd5(md5);
              monitor.notifyAll();
            }
            messenger.removeMonitor(key);
            messenger.removeQueue(key,randomKey);
            LOG.info("String_Node_Str" + key);
            QueueSender queueSender=QueueFactory.getInstance().getSender(QueueIdentifier.S3);
            queueSender.send(new S3Event(true,size / WalrusProperties.M,ctx.getUser().getUserId(),ctx.getUser().getName(),ctx.getAccount().getAccountNumber(),ctx.getAccount().getName()));
            break;
          }
 else {
            assert(WalrusDataMessage.isData(dataMessage));
            byte[] data=dataMessage.getPayload();
            try {
              if (fileIO != null)               fileIO.write(data);
            }
 catch (            IOException ex) {
              LOG.error(ex);
            }
            size+=data.length;
            if (digest != null)             digest.update(data);
          }
        }
      }
 catch (      InterruptedException ex) {
        LOG.error(ex,ex);
        messenger.removeQueue(key,randomKey);
        throw new EucalyptusCloudException("String_Node_Str" + key + "String_Node_Str"+ randomKey);
      }
    }
 else {
      db.rollback();
      messenger.removeQueue(key,randomKey);
      throw new AccessDeniedException("String_Node_Str",bucketName,logData);
    }
  }
 else {
    db.rollback();
    messenger.removeQueue(key,randomKey);
    throw new NoSuchBucketException(bucketName);
  }
  reply.setEtag(md5);
  reply.setLastModified(DateUtils.format(lastModified.getTime(),DateUtils.ISO8601_DATETIME_PATTERN) + "String_Node_Str");
  return reply;
}