code: public synchronized OtpErlangPid createPid() {
          final OtpErlangPid p = new OtpErlangPid(node, pidCount, serial,
                  creation);
  
          pidCount++;
          if (pidCount > 0x7fff) {
              pidCount = 0;
  
              serial++;
              if (serial > 0x1fff) { /* 13 bits */
                  serial = 0;
              }
          }
  
          return p;
      }
docs: Create an Erlang {@link OtpErlangPid pid}. Erlang pids are based upon
  some node specific information; this method creates a pid using the
  information in this node. Each call to this method produces a unique pid.
  
  @return an Erlang pid.