docs: @Override
      public WsByteBuffer duplicate(WsByteBuffer buffer) {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "duplicate");
          }
  
          // see if we should look for leaks
          if (trackingBuffers()) {
              lookForLeaks(false);
          }
  
          WsByteBufferImpl newBuffer = new WsByteBufferImpl();
          WsByteBufferImpl srcBuffer = (WsByteBufferImpl) buffer;
  
          // update the new object with pool manager specific data
          newBuffer.setPoolManagerRef(this);
  
          PooledWsByteBufferImpl bRoot = srcBuffer.getWsBBRoot();
          if (bRoot != null) {
              newBuffer.setWsBBRoot(bRoot);
              synchronized (bRoot) {
                  bRoot.intReferenceCount++;
              }
          } else {
              RefCountWsByteBufferImpl rRoot = srcBuffer.getWsBBRefRoot();
              if (rRoot != null) {
                  newBuffer.setWsBBRefRoot(rRoot);
                  synchronized (rRoot) {
                      rRoot.intReferenceCount++;
                  }
              }
          }
  
          // have the old object update the new object with object specific data
          srcBuffer.updateDuplicate(newBuffer);
  
          if ((TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              || (trackingBuffers())) {
  
              Throwable t = new Throwable();
              StackTraceElement[] ste = t.getStackTrace();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled() && ste.length >= 3) {
                  if ((srcBuffer.getWsBBRoot() == null) || (srcBuffer.getWsBBRoot().pool == null)) {
                      Tr.debug(tc, "BUFFER OBTAINED: Duplicate: Calling Element: " + ste[2] + " Main ID: none");
                  } else {
                      Tr.debug(tc, "BUFFER OBTAINED: Duplicate: Calling Element: " + ste[2] + " Main ID: " + srcBuffer.getWsBBRoot().getID());
                  }
              }
  
              if (trackingBuffers()) {
                  String sEntry = fillOutStackTrace(" (Duplicate) ", ste);
                  newBuffer.setOwnerID(sEntry);
              }
  
              if ((newBuffer.getWsBBRoot() != null) && (newBuffer.getWsBBRoot().pool != null)) {
                  if (trackingBuffers()) {
                      newBuffer.getWsBBRoot().addWsByteBuffer(newBuffer);
                      newBuffer.getWsBBRoot().owners.put(newBuffer.getOwnerID(), newBuffer.getOwnerID());
                  }
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "duplicate");
          }
          return newBuffer;
      }