code: public synchronized OtpErlangPort createPort() {
          final OtpErlangPort p = new OtpErlangPort(node, portCount, creation);
  
          portCount++;
          if (portCount > 0xfffffff) { /* 28 bits */
              portCount = 0;
          }
  
          return p;
      }
docs: Create an Erlang {@link OtpErlangPort port}. Erlang ports are based upon
  some node specific information; this method creates a port using the
  information in this node. Each call to this method produces a unique
  port. It may not be meaningful to create a port in a non-Erlang
  environment, but this method is provided for completeness.
  
  @return an Erlang port.