Program: 14241
Project: 14241
Buggy source:
@Override public GetObjectResponseType getObject(final GetObjectType request) throws S3Exception {
  ObjectEntity objectEntity=getObjectEntityAndCheckPermissions(request,request.getVersionId());
  if (objectEntity.getIsDeleteMarker()) {
    throw new NoSuchKeyException(request.getKey());
  }
  request.setKey(objectEntity.getObjectUuid());
  request.setBucket(objectEntity.getBucket().getBucketUuid());
  GetObjectResponseType reply;
  try {
    reply=ospClient.getObject(request);
  }
 catch (  Exception e) {
    InternalErrorException ex=new InternalErrorException(objectEntity.getResourceFullName());
    ex.initCause(e);
    throw ex;
  }
  reply.setLastModified(objectEntity.getObjectModifiedTimestamp());
  reply.setEtag(objectEntity.geteTag());
  reply.setVersionId(objectEntity.getVersionId());
  reply.setHasStreamingData(true);
  if (request.getInlineData()) {
    if (reply.getSize() * 4 > ObjectStorageProperties.MAX_INLINE_DATA_SIZE) {
      LOG.error("String_Node_Str" + reply.getSize() + "String_Node_Str"+ ObjectStorageProperties.MAX_INLINE_DATA_SIZE+ "String_Node_Str");
      throw new InlineDataTooLargeException(request.getBucket() + "String_Node_Str" + request.getKey());
    }
    byte[] buffer=new byte[ObjectStorageProperties.IO_CHUNK_SIZE];
    int readLength;
    ByteArrayOutputStream data=new ByteArrayOutputStream();
    try {
      while ((readLength=reply.getDataInputStream().read(buffer)) >= 0) {
        data.write(buffer,0,readLength);
      }
      reply.setBase64Data(B64.url.encString(data.toByteArray()));
    }
 catch (    BufferOverflowException e) {
      LOG.error("String_Node_Str" + ObjectStorageProperties.MAX_INLINE_DATA_SIZE + "String_Node_Str",e);
      throw new InlineDataTooLargeException(request.getBucket() + "String_Node_Str" + request.getKey());
    }
catch (    IOException e) {
      LOG.error("String_Node_Str",e);
      throw new InternalErrorException(request.getBucket() + "String_Node_Str" + request.getKey());
    }
 finally {
      try {
        reply.getDataInputStream().close();
      }
 catch (      IOException ex) {
        LOG.error("String_Node_Str",ex);
      }
      reply.setDataInputStream(null);
      reply.setHasStreamingData(false);
    }
  }
  return reply;
}

Fixed version (ground truth):
@Override public GetObjectResponseType getObject(final GetObjectType request) throws S3Exception {
  ObjectEntity objectEntity=getObjectEntityAndCheckPermissions(request,request.getVersionId());
  if (objectEntity.getIsDeleteMarker()) {
    throw new NoSuchKeyException(request.getKey());
  }
  request.setKey(objectEntity.getObjectUuid());
  request.setBucket(objectEntity.getBucket().getBucketUuid());
  GetObjectResponseType reply;
  final String originalVersionId=request.getVersionId();
  request.setVersionId(null);
  try {
    reply=ospClient.getObject(request);
  }
 catch (  Exception e) {
    InternalErrorException ex=new InternalErrorException(objectEntity.getResourceFullName());
    ex.initCause(e);
    throw ex;
  }
  reply.setLastModified(objectEntity.getObjectModifiedTimestamp());
  reply.setEtag(objectEntity.geteTag());
  reply.setVersionId(objectEntity.getVersionId());
  reply.setHasStreamingData(true);
  if (request.getInlineData()) {
    if (reply.getSize() * 4 > ObjectStorageProperties.MAX_INLINE_DATA_SIZE) {
      LOG.error("String_Node_Str" + reply.getSize() + "String_Node_Str"+ ObjectStorageProperties.MAX_INLINE_DATA_SIZE+ "String_Node_Str");
      throw new InlineDataTooLargeException(request.getBucket() + "String_Node_Str" + request.getKey());
    }
    byte[] buffer=new byte[ObjectStorageProperties.IO_CHUNK_SIZE];
    int readLength;
    ByteArrayOutputStream data=new ByteArrayOutputStream();
    try {
      while ((readLength=reply.getDataInputStream().read(buffer)) >= 0) {
        data.write(buffer,0,readLength);
      }
      reply.setBase64Data(B64.url.encString(data.toByteArray()));
    }
 catch (    BufferOverflowException e) {
      LOG.error("String_Node_Str" + ObjectStorageProperties.MAX_INLINE_DATA_SIZE + "String_Node_Str",e);
      throw new InlineDataTooLargeException(request.getBucket() + "String_Node_Str" + request.getKey());
    }
catch (    IOException e) {
      LOG.error("String_Node_Str",e);
      throw new InternalErrorException(request.getBucket() + "String_Node_Str" + request.getKey());
    }
 finally {
      try {
        reply.getDataInputStream().close();
      }
 catch (      IOException ex) {
        LOG.error("String_Node_Str",ex);
      }
      reply.setDataInputStream(null);
      reply.setHasStreamingData(false);
    }
  }
  return reply;
}