#fixed code
                                @Override
    protected void onResponseReceived(final HttpResponse response) throws IOException {
        this.response = response;
    }
#vulnerable code 
                                @Override
    protected void onResponseReceived(final HttpResponse response) throws IOException {
        this.response = response;
        HttpEntity entity = this.response.getEntity();
        if (entity != null) {
            long len = entity.getContentLength();
            if (len > Integer.MAX_VALUE) {
                throw new ContentTooLongException("Entity content is too long: " + len);
            }
            if (len < 0) {
                len = 4096;
            }
            this.buf = new SimpleInputBuffer((int) len, HeapByteBufferAllocator.INSTANCE);
            response.setEntity(new ContentBufferEntity(entity, this.buf));
        }
    } 
                            #location 14 
                            #vulnerability type INTERFACE_NOT_THREAD_SAFE